mainboard: New port Packard Bell LM85.
[coreboot.git] / src / mainboard / packardbell / ms2290 / acpi / platform.asl
blob3ca9dc524e9aaf8d83ad61e515c02cd76fcd1951
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  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
19  * MA 02110-1301 USA
20  */
22 /* These come from the dynamically created CPU SSDT */
23 External(PDC0)
24 External(PDC1)
26 /* The APM port can be used for generating software SMIs */
28 OperationRegion (APMP, SystemIO, 0xb2, 2)
29 Field (APMP, ByteAcc, NoLock, Preserve)
31         APMC, 8,        /* APM command */
32         APMS, 8         /* APM status */
35 /* SMI I/O Trap */
36 Method(TRAP, 1, Serialized)
38         Store (Arg0, SMIF)      /* SMI Function */
39         Store (0, TRP0)         /* Generate trap */
40         Return (SMIF)           /* Return value of SMI handler */
43 /* The _PIC method is called by the OS to choose between interrupt
44  * routing via the i8259 interrupt controller or the APIC.
45  *
46  * _PIC is called with a parameter of 0 for i8259 configuration and
47  * with a parameter of 1 for Local Apic/IOAPIC configuration.
48  */
50 Method(_PIC, 1)
52         /* Remember the OS' IRQ routing choice.  */
53         Store(Arg0, PICM)
56 /* The _PTS method (Prepare To Sleep) is called before the OS is
57  * entering a sleep state. The sleep state number is passed in Arg0
58  */
60 Method(_PTS,1)
64 /* The _WAK method is called on system wakeup */
66 Method(_WAK,1)
68         /* Not implemented.  */
69         Return(Package(){0,0})
72 /* System Bus */
74 Scope(\_SB)
76         /* This method is placed on the top level, so we can make sure it's the
77          * first executed _INI method.
78          */
79         Method(_INI, 0)
80         {
81                 /* The DTS data in NVS is probably not up to date.
82                  * Update temperature values and make sure AP thermal
83                  * interrupts can happen
84                  */
86                 /* TRAP(71) */ /* TODO  */
88                 /* Determine the Operating System and save the value in OSYS.
89                  * We have to do this in order to be able to work around
90                  * certain windows bugs.
91                  *
92                  *    OSYS value | Operating System
93                  *    -----------+------------------
94                  *       2000    | Windows 2000
95                  *       2001    | Windows XP(+SP1)
96                  *       2002    | Windows XP SP2
97                  *       2006    | Windows Vista
98                  *       ????    | Windows 7
99                  */
101                 /* Let's assume we're running at least Windows 2000 */
102                 Store (2000, OSYS)
104                 If (CondRefOf(_OSI, Local0)) {
105                         If (_OSI("Windows 2001")) {
106                                 Store (2001, OSYS)
107                         }
109                         If (_OSI("Windows 2001 SP1")) {
110                                 Store (2001, OSYS)
111                         }
113                         If (_OSI("Windows 2001 SP2")) {
114                                 Store (2002, OSYS)
115                         }
117                         If (_OSI("Windows 2001.1")) {
118                                 Store (2001, OSYS)
119                         }
121                         If (_OSI("Windows 2001.1 SP1")) {
122                                 Store (2001, OSYS)
123                         }
125                         If (_OSI("Windows 2006")) {
126                                 Store (2006, OSYS)
127                         }
129                         If (_OSI("Windows 2006.1")) {
130                                 Store (2006, OSYS)
131                         }
133                         If (_OSI("Windows 2006 SP1")) {
134                                 Store (2006, OSYS)
135                         }
137                         If (_OSI("Windows 2009")) {
138                                 Store (2009, OSYS)
139                         }
141                         If (_OSI("Windows 2012")) {
142                                 Store (2012, OSYS)
143                         }
144                 }
145         }