Debian Codegraph @

src/southbridge/intel/common/acpi/platform.asl

raw
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 /* The APM port can be used for generating software SMIs */
4
5 OperationRegion (APMP, SystemIO, 0xb2, 2)
6 Field (APMP, ByteAcc, NoLock, Preserve)
7 {
8 APMC, 8, // APM command
9 APMS, 8 // APM status
10 }
11
12 #include <arch/x86/acpi/post.asl>
13
14 Method(GOS, 0)
15 {
16 /* Determine the Operating System and save the value in OSYS.
17 * We have to do this in order to be able to work around
18 * certain windows bugs.
19 *
20 * OSYS value | Operating System
21 * -----------+------------------
22 * 2000 | Windows 2000
23 * 2001 | Windows XP(+SP1)
24 * 2002 | Windows XP SP2
25 * 2006 | Windows Vista
26 * ???? | Windows 7
27 */
28
29 /* Let's assume we're running at least Windows 2000 */
30 OSYS = 2000
31
32 If (CondRefOf(_OSI)) {
33 If (_OSI("Windows 2001")) {
34 OSYS = 2001
35 }
36
37 If (_OSI("Windows 2001 SP1")) {
38 OSYS = 2001
39 }
40
41 If (_OSI("Windows 2001 SP2")) {
42 OSYS = 2002
43 }
44
45 If (_OSI("Windows 2006")) {
46 OSYS = 2006
47 }
48 }
49 }
50
51 /* Arg0 is state of HPET hardware enablement. */
52 Method (HPTS, 1)
53 {
54 /* HPET hardware disabled. */
55 If (!Arg0) {
56 Return (0x0)
57 }
58
59 /* Ancient versions of Windows don't want to see the HPET. */
60 If (OSYS < 2001) {
61 Return (0xb)
62 }
63
64 Return (0xf)
65 }