blob: b666a4f35091c800ea04370fa6b69b0e1f3e5ded [file] [log] [blame]
Mike Loptienba7ed4b2013-03-29 13:33:39 -06001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2011 Advanced Micro Devices, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
Mike Loptienba7ed4b2013-03-29 13:33:39 -060014 */
15
16/* Data to be patched by the BIOS during POST */
17/* FIXME the patching is not done yet! */
18/* Memory related values */
19Name(LOMH, 0x0) /* Start of unused memory in C0000-E0000 range */
20Name(PBAD, 0x0) /* Address of BIOS area (If TOM2 != 0, Addr >> 16) */
21Name(PBLN, 0x0) /* Length of BIOS area */
22
23Name(PCBA, CONFIG_MMCONF_BASE_ADDRESS) /* Base address of PCIe config space */
24Name(HPBA, 0xFED00000) /* Base address of HPET table */
25
26Name(SSFG, 0x0D) /* S1 support: bit 0, S2 Support: bit 1, etc. S0 & S5 assumed */
27
28/* Some global data */
Edward O'Callaghanf7d8f092014-05-31 13:57:52 +100029Name(OSVR, 3) /* Assume nothing. WinXp = 1, Vista = 2, Linux = 3, WinCE = 4 */
Mike Loptienba7ed4b2013-03-29 13:33:39 -060030Name(OSV, Ones) /* Assume nothing */
31Name(PMOD, One) /* Assume APIC */
32
33Scope(\_SB) {
Edward O'Callaghanf7d8f092014-05-31 13:57:52 +100034 Method(OSFL, 0){
Mike Loptienba7ed4b2013-03-29 13:33:39 -060035
Edward O'Callaghanf7d8f092014-05-31 13:57:52 +100036 if(LNotEqual(OSVR, Ones)) {Return(OSVR)} /* OS version was already detected */
Mike Loptienba7ed4b2013-03-29 13:33:39 -060037
Martin Roth91d9cbc2015-12-08 15:04:23 -070038 if(CondRefOf(\_OSI))
Mike Loptienba7ed4b2013-03-29 13:33:39 -060039 {
Edward O'Callaghanf7d8f092014-05-31 13:57:52 +100040 Store(1, OSVR) /* Assume some form of XP */
Mike Loptienba7ed4b2013-03-29 13:33:39 -060041 if (\_OSI("Windows 2006")) /* Vista */
42 {
Edward O'Callaghanf7d8f092014-05-31 13:57:52 +100043 Store(2, OSVR)
Mike Loptienba7ed4b2013-03-29 13:33:39 -060044 }
45 } else {
46 If(WCMP(\_OS,"Linux")) {
Edward O'Callaghanf7d8f092014-05-31 13:57:52 +100047 Store(3, OSVR) /* Linux */
Mike Loptienba7ed4b2013-03-29 13:33:39 -060048 } Else {
Edward O'Callaghanf7d8f092014-05-31 13:57:52 +100049 Store(4, OSVR) /* Gotta be WinCE */
Mike Loptienba7ed4b2013-03-29 13:33:39 -060050 }
51 }
Edward O'Callaghanf7d8f092014-05-31 13:57:52 +100052 Return(OSVR)
Mike Loptienba7ed4b2013-03-29 13:33:39 -060053 }
54}
55
56Scope(\_SI) {
57 Method(_SST, 1) {
58 /* DBGO("\\_SI\\_SST\n") */
59 /* DBGO(" New Indicator state: ") */
60 /* DBGO(Arg0) */
61 /* DBGO("\n") */
62 }
63} /* End Scope SI */