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 modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 /* The APM port can be used for generating software SMIs */
22 OperationRegion (APMP, SystemIO, 0xb2, 2)
23 Field (APMP, ByteAcc, NoLock, Preserve)
25 APMC, 8, // APM command
31 OperationRegion (POST, SystemIO, 0x80, 1)
32 Field (POST, ByteAcc, Lock, Preserve)
38 Method(TRAP, 1, Serialized)
40 Store (Arg0, SMIF) // SMI Function
41 Store (0, TRP0) // Generate trap
42 Return (SMIF) // Return value of SMI handler
45 /* The _PIC method is called by the OS to choose between interrupt
46 * routing via the i8259 interrupt controller or the APIC.
48 * _PIC is called with a parameter of 0 for i8259 configuration and
49 * with a parameter of 1 for Local Apic/IOAPIC configuration.
54 // Remember the OS' IRQ routing choice.
58 /* The _PTS method (Prepare To Sleep) is called before the OS is
59 * entering a sleep state. The sleep state number is passed in Arg0
64 // Call a trap so SMI can prepare for Sleep as well.
68 /* The _WAK method is called on system wakeup */
74 // Notify PCI Express slots in case a card
75 // was inserted while a sleep state was active.
77 // Are we going to S3?
78 If (LEqual(Arg0, 3)) {
82 // Are we going to S4?
83 If (LEqual(Arg0, 4)) {
87 // TODO: Windows XP SP2 P-State restore
89 Return(Package(){0,0})