Support Intel SCH (Poulsbo) and add iwave/iWRainbowG6 board
[coreboot.git] / src / mainboard / iwave / iWRainbowG6 / acpi / platform.asl
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  */
21
22 /* The APM port can be used for generating software SMIs */
23
24 OperationRegion (APMP, SystemIO, 0xb2, 2)
25 Field (APMP, ByteAcc, NoLock, Preserve)
26 {
27         APMC, 8,        // APM command
28         APMS, 8         // APM status
29 }
30
31 /* Port 80 POST */
32
33 OperationRegion (POST, SystemIO, 0x80, 1)
34 Field (POST, ByteAcc, Lock, Preserve)
35 {
36         DBG0, 8
37 }
38
39 /* SMI I/O Trap */
40 Method(TRAP, 1, Serialized)
41 {
42         Store (Arg0, SMIF)      // SMI Function
43         //Store (0, TRP0)               // Generate trap
44         Return (SMIF)           // Return value of SMI handler
45 }
46
47 /* The _PIC method is called by the OS to choose between interrupt
48  * routing via the i8259 interrupt controller or the APIC.
49  *
50  * _PIC is called with a parameter of 0 for i8259 configuration and
51  * with a parameter of 1 for Local Apic/IOAPIC configuration.
52  */
53
54 Method(_PIC, 1)
55 {
56         // Remember the OS' IRQ routing choice.
57         Store(Arg0, PICM)
58 }
59
60 /* The _PTS method (Prepare To Sleep) is called before the OS is
61  * entering a sleep state. The sleep state number is passed in Arg0
62  */
63
64 Method(_PTS,1)
65 {
66         // Call a trap so SMI can prepare for Sleep as well.
67         // TRAP(0x55)
68 }
69
70 /* The _WAK method is called on system wakeup */
71
72 Method(_WAK,1)
73 {
74         // CPU specific part
75
76         // Notify PCI Express slots in case a card
77         // was inserted while a sleep state was active.
78
79         // Are we going to S3?
80         If (LEqual(Arg0, 3)) {
81                 // ..
82         }
83
84         // Are we going to S4?
85         If (LEqual(Arg0, 4)) {
86                 // ..
87         }
88
89         // TODO: Windows XP SP2 P-State restore
90
91         Return(Package(){0,0})
92 }
93