Aaron Durbin | f6933a6 | 2012-10-30 09:09:39 -0500 | [diff] [blame] | 1 | /* |
| 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 Durbin | f6933a6 | 2012-10-30 09:09:39 -0500 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | /* The APM port can be used for generating software SMIs */ |
| 18 | |
| 19 | OperationRegion (APMP, SystemIO, 0xb2, 2) |
| 20 | Field (APMP, ByteAcc, NoLock, Preserve) |
| 21 | { |
| 22 | APMC, 8, // APM command |
| 23 | APMS, 8 // APM status |
| 24 | } |
| 25 | |
| 26 | /* Port 80 POST */ |
| 27 | |
| 28 | OperationRegion (POST, SystemIO, 0x80, 1) |
| 29 | Field (POST, ByteAcc, Lock, Preserve) |
| 30 | { |
| 31 | DBG0, 8 |
| 32 | } |
| 33 | |
| 34 | /* SMI I/O Trap */ |
| 35 | Method(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 | |
| 49 | Method(_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 | |
| 59 | Method(_PTS,1) |
| 60 | { |
Aaron Durbin | f6933a6 | 2012-10-30 09:09:39 -0500 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | /* The _WAK method is called on system wakeup */ |
| 64 | |
| 65 | Method(_WAK,1) |
| 66 | { |
| 67 | Return(Package(){0,0}) |
| 68 | } |