blob: 22a13b24d84c2d0b70c8526738d67d291f7fa2a5 [file] [log] [blame]
Aaron Durbinf6933a62012-10-30 09:09:39 -05001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2007-2009 coresystems GmbH
5 * Copyright (C) 2012 The Chromium OS Authors. All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of 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.
Aaron Durbinf6933a62012-10-30 09:09:39 -050015 */
16
17/* The APM port can be used for generating software SMIs */
18
19OperationRegion (APMP, SystemIO, 0xb2, 2)
20Field (APMP, ByteAcc, NoLock, Preserve)
21{
22 APMC, 8, // APM command
23 APMS, 8 // APM status
24}
25
26/* Port 80 POST */
27
28OperationRegion (POST, SystemIO, 0x80, 1)
29Field (POST, ByteAcc, Lock, Preserve)
30{
31 DBG0, 8
32}
33
34/* SMI I/O Trap */
35Method(TRAP, 1, Serialized)
36{
37 Store (Arg0, SMIF) // SMI Function
38 Store (0, TRP0) // Generate trap
39 Return (SMIF) // Return value of SMI handler
40}
41
42/* The _PIC method is called by the OS to choose between interrupt
43 * routing via the i8259 interrupt controller or the APIC.
44 *
45 * _PIC is called with a parameter of 0 for i8259 configuration and
46 * with a parameter of 1 for Local Apic/IOAPIC configuration.
47 */
48
49Method(_PIC, 1)
50{
51 // Remember the OS' IRQ routing choice.
52 Store(Arg0, PICM)
53}
54
55/* The _PTS method (Prepare To Sleep) is called before the OS is
56 * entering a sleep state. The sleep state number is passed in Arg0
57 */
58
59Method(_PTS,1)
60{
Aaron Durbinf6933a62012-10-30 09:09:39 -050061}
62
63/* The _WAK method is called on system wakeup */
64
65Method(_WAK,1)
66{
67 Return(Package(){0,0})
68}