Edward O'Callaghan (eocallaghan@alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5886
-gerrit
commit 2e035abe32a83e0318b016f5fe031ffa23573324 Author: Edward O'Callaghan eocallaghan@alterapraxis.com Date: Sat May 31 07:41:14 2014 +1000
mainboard/jetway/nf81-t56n-lf: Rewrite ACPI OS detection
Rewrite the ACPI OS detection method to support modern versions of Windows and consider FreeBSD also.
Change-Id: Ied6a300fc17e455db1a51368fea238a53df657a8 Signed-off-by: Edward O'Callaghan eocallaghan@alterapraxis.com --- .../jetway/nf81-t56n-lf/acpi/mainboard.asl | 47 ++++++++++++++++------ 1 file changed, 34 insertions(+), 13 deletions(-)
diff --git a/src/mainboard/jetway/nf81-t56n-lf/acpi/mainboard.asl b/src/mainboard/jetway/nf81-t56n-lf/acpi/mainboard.asl index 49ea44f..47c17df 100644 --- a/src/mainboard/jetway/nf81-t56n-lf/acpi/mainboard.asl +++ b/src/mainboard/jetway/nf81-t56n-lf/acpi/mainboard.asl @@ -2,6 +2,7 @@ * This file is part of the coreboot project. * * Copyright (C) 2011 Advanced Micro Devices, Inc. + * Copyright (C) 2014 Edward O'Callaghan eocallaghan@alterapraxis.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,27 +31,47 @@ Name(HPBA, 0xFED00000) /* Base address of HPET table */ Name(SSFG, 0x0D) /* S1 support: bit 0, S2 Support: bit 1, etc. S0 & S5 assumed */
/* Some global data */ -Name(OSTP, 3) /* Assume nothing. WinXp = 1, Vista = 2, Linux = 3, WinCE = 4 */ +Name(OSTP, 3) Name(OSV, Ones) /* Assume nothing */ Name(PMOD, One) /* Assume APIC */
Scope(_SB) { - Method(CkOT, 0){ - - if(LNotEqual(OSTP, Ones)) {Return(OSTP)} /* OS version was already detected */ + Method(CkOT, 0, NotSerialized) + { + If (LNotEqual (OSTP, Ones)) + { + Return (OSTP) /* OS version was already detected */ + }
- if(CondRefOf(_OSI,Local1)) + Store (One, OSTP) /* Assume some form of XP */ + If (CondRefOf (_OSI, Local1)) + { + If (_OSI ("Linux")) + { + Store (0x03, OSTP) + } + If (_OSI ("FreeBSD")) + { + Store (0x06, OSTP) + } + If (_OSI("Windows 2009")) + { + Store(0x0E, OSTP) + } + } + Else { - Store(1, OSTP) /* Assume some form of XP */ - if (_OSI("Windows 2006")) /* Vista */ + If (WCMP (_OS, "Microsoft Windows")) { - Store(2, OSTP) + Store(One, OSTP) } - } else { - If(WCMP(_OS,"Linux")) { - Store(3, OSTP) /* Linux */ - } Else { - Store(4, OSTP) /* Gotta be WinCE */ + If (WCMP (_OS, "Linux")) + { + Store(0x03, OSTP) + } + If (WCMP (_OS, "FreeBSD")) + { + Store(0x06, OSTP) } } Return(OSTP)