tree: drop last paragraph of GPL copyright header
[coreboot.git] / src / mainboard / packardbell / ms2290 / acpi / platform.asl
blob4d5b5c01df588003d74b33f222fa7ff7a8c242f6
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2007-2009 coresystems GmbH
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; version 2 of
9  * the License.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  */
17 /* These come from the dynamically created CPU SSDT */
18 External(PDC0)
19 External(PDC1)
21 /* The APM port can be used for generating software SMIs */
23 OperationRegion (APMP, SystemIO, 0xb2, 2)
24 Field (APMP, ByteAcc, NoLock, Preserve)
26         APMC, 8,        /* APM command */
27         APMS, 8         /* APM status */
30 /* SMI I/O Trap */
31 Method(TRAP, 1, Serialized)
33         Store (Arg0, SMIF)      /* SMI Function */
34         Store (0, TRP0)         /* Generate trap */
35         Return (SMIF)           /* Return value of SMI handler */
38 /* The _PIC method is called by the OS to choose between interrupt
39  * routing via the i8259 interrupt controller or the APIC.
40  *
41  * _PIC is called with a parameter of 0 for i8259 configuration and
42  * with a parameter of 1 for Local Apic/IOAPIC configuration.
43  */
45 Method(_PIC, 1)
47         /* Remember the OS' IRQ routing choice.  */
48         Store(Arg0, PICM)
51 /* The _PTS method (Prepare To Sleep) is called before the OS is
52  * entering a sleep state. The sleep state number is passed in Arg0
53  */
55 Method(_PTS,1)
59 /* The _WAK method is called on system wakeup */
61 Method(_WAK,1)
63         /* Not implemented.  */
64         Return(Package(){0,0})
67 /* System Bus */
69 Scope(\_SB)
71         /* This method is placed on the top level, so we can make sure it's the
72          * first executed _INI method.
73          */
74         Method(_INI, 0)
75         {
76                 /* The DTS data in NVS is probably not up to date.
77                  * Update temperature values and make sure AP thermal
78                  * interrupts can happen
79                  */
81                 /* TRAP(71) */ /* TODO  */
83                 /* Determine the Operating System and save the value in OSYS.
84                  * We have to do this in order to be able to work around
85                  * certain windows bugs.
86                  *
87                  *    OSYS value | Operating System
88                  *    -----------+------------------
89                  *       2000    | Windows 2000
90                  *       2001    | Windows XP(+SP1)
91                  *       2002    | Windows XP SP2
92                  *       2006    | Windows Vista
93                  *       ????    | Windows 7
94                  */
96                 /* Let's assume we're running at least Windows 2000 */
97                 Store (2000, OSYS)
99                 If (CondRefOf(_OSI, Local0)) {
100                         If (_OSI("Windows 2001")) {
101                                 Store (2001, OSYS)
102                         }
104                         If (_OSI("Windows 2001 SP1")) {
105                                 Store (2001, OSYS)
106                         }
108                         If (_OSI("Windows 2001 SP2")) {
109                                 Store (2002, OSYS)
110                         }
112                         If (_OSI("Windows 2001.1")) {
113                                 Store (2001, OSYS)
114                         }
116                         If (_OSI("Windows 2001.1 SP1")) {
117                                 Store (2001, OSYS)
118                         }
120                         If (_OSI("Windows 2006")) {
121                                 Store (2006, OSYS)
122                         }
124                         If (_OSI("Windows 2006.1")) {
125                                 Store (2006, OSYS)
126                         }
128                         If (_OSI("Windows 2006 SP1")) {
129                                 Store (2006, OSYS)
130                         }
132                         If (_OSI("Windows 2009")) {
133                                 Store (2009, OSYS)
134                         }
136                         If (_OSI("Windows 2012")) {
137                                 Store (2012, OSYS)
138                         }
139                 }
140         }