Saturday, June 13, 2009

Spoofing the OS to the BIOS

I used to use a Tyan MP2466 dual-processor motherboard and I had noticed something odd about it over the years. I have instability problems where it locks up so that only cycling the power switch will restore it to function. It seems related to video and USB devices and IRQ's, but maybe not. I've also dual-booted to WinXP to play some of my games that won't run in Linux and noticed that I never had the same instability problems with WinXP on the very same hardware.

All that seems over now. A kernel command line option, acpi_osi=, will spoof the Operating System to the BIOS. The available choices are found in uteval.c in the kernel source. Here is the current list:

"Microsoft Windows" will spoof for Windows98
"Windows 2000", /* Windows 2000 */
"Windows 2001", /* Windows XP */
"Windows 2001 SP1", /* Windows XP SP1 */
"Windows 2001 SP2", /* Windows XP SP2 */
"Windows 2001.1", /* Windows Server 2003 */
"Windows 2001.1 SP1", /* Windows Server 2003 SP1 - Added 03/2006
"Windows 2006", /* Windows Vista - Added 03/2006 */
"Windows 2009" will spoof for Windows 7 
"Windows 2012" should spoof for Windows 8
"Windows 2013" should spoof for Windows 8.1

Quotes are required!

Additional values for more recent version of Windows can be found in my other blog post.

While it's pretty esoteric stuff, the identity of the OS can determine how the BIOS identifies hardware to the OS.

Interestingly, using acpi_os_name=Linux as a default is not allowed since hard-coded work-arounds for Linux in the BIOS cannot be undone even if the  error is fixed in a BIOS update.

Using the de-compile method from here, I can see that my current system supports Windows 98, NT, XP, Vista and 7.

I now pass acpi_os_name="Windows 2009" to the kernel .

This general use of this option seems to be most likely useful for Linux laptop owners who would spoof to the version of Windows that the manufacturer shipped with the laptop.

Microsoft Hardware Developer Doc

ACPI BIOS Guideline for Linux

ACPI provides two mechanisms for determining the OS


No comments: