From 05af850b281f203de4bcf87e7864eaef78d2bff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Wed, 3 Feb 2021 14:37:35 +0200 Subject: sb/amd/cimx/sb800: Move common OSFL method in ASL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We deal with mb/lippert/frontrunner-af later since it currently does not include . Change-Id: I30b611fc1fb01777223d7222adc96308a247a35c Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/50591 Reviewed-by: Angel Pons Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/southbridge/amd/cimx/sb800/acpi/fch.asl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/southbridge/amd/cimx/sb800') diff --git a/src/southbridge/amd/cimx/sb800/acpi/fch.asl b/src/southbridge/amd/cimx/sb800/acpi/fch.asl index 59b556b5b0..ee9b125f2b 100644 --- a/src/southbridge/amd/cimx/sb800/acpi/fch.asl +++ b/src/southbridge/amd/cimx/sb800/acpi/fch.asl @@ -134,6 +134,30 @@ Method(_CRS, 0) { Return (CRES) /* note to change the Name buffer */ } /* end of Method(_SB.PCI0._CRS) */ +/* Some global data */ +Name(OSVR, 3) /* Assume nothing. WinXp = 1, Vista = 2, Linux = 3, WinCE = 4 */ + +Method(OSFL, 0){ + + if (OSVR != Ones) {Return (OSVR)} /* OS version was already detected */ + + if(CondRefOf(\_OSI)) + { + OSVR = 1 /* Assume some form of XP */ + if (\_OSI("Windows 2006")) /* Vista */ + { + OSVR = 2 + } + } else { + If (WCMP(\_OS,"Linux")) { + OSVR = 3 /* Linux */ + } Else { + OSVR = 4 /* Gotta be WinCE */ + } + } + Return(OSVR) +} + /* * * FIRST METHOD CALLED UPON BOOT -- cgit v1.2.3