2 * This file is part of the coreboot project.
4 * Copyright (C) 2007-2009 coresystems GmbH
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
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.
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,
22 /* The APM port can be used for generating software SMIs */
24 OperationRegion (APMP, SystemIO, 0xb2, 2)
25 Field (APMP, ByteAcc, NoLock, Preserve)
27 APMC, 8, // APM command
33 OperationRegion (POST, SystemIO, 0x80, 1)
34 Field (POST, ByteAcc, Lock, Preserve)
40 Method(TRAP, 1, Serialized)
42 Store (Arg0, SMIF) // SMI Function
43 //Store (0, TRP0) // Generate trap
44 Return (SMIF) // Return value of SMI handler
47 /* The _PIC method is called by the OS to choose between interrupt
48 * routing via the i8259 interrupt controller or the APIC.
50 * _PIC is called with a parameter of 0 for i8259 configuration and
51 * with a parameter of 1 for Local Apic/IOAPIC configuration.
56 // Remember the OS' IRQ routing choice.
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
66 // Call a trap so SMI can prepare for Sleep as well.
70 /* The _WAK method is called on system wakeup */
76 // Notify PCI Express slots in case a card
77 // was inserted while a sleep state was active.
79 // Are we going to S3?
80 If (LEqual(Arg0, 3)) {
84 // Are we going to S4?
85 If (LEqual(Arg0, 4)) {
89 // TODO: Windows XP SP2 P-State restore
91 Return(Package(){0,0})