2 * Bochs/QEMU ACPI DSDT ASL definition
4 * Copyright (c) 2006 Fabrice Bellard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License version 2 as published by the Free Software Foundation.
10 * This library 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 GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 ACPI_EXTRACT_ALL_CODE AcpiDsdtAmlCode
23 "acpi-dsdt.aml", // Output Filename
25 0x01, // DSDT Compliance Revision
34 Name(_HID, EisaId("PNP0A03"))
38 // External(PX13, DeviceObj)
42 /****************************************************************
44 ****************************************************************/
47 OperationRegion(PCST, SystemIO, 0xae00, 0x08)
48 Field(PCST, DWordAcc, NoLock, WriteAsZeros) {
53 OperationRegion(SEJ, SystemIO, 0xae08, 0x04)
54 Field(SEJ, DWordAcc, NoLock, WriteAsZeros) {
58 OperationRegion(BNMR, SystemIO, 0xae10, 0x04)
59 Field(BNMR, DWordAcc, NoLock, WriteAsZeros) {
63 /* Lock to protect access to fields above. */
66 /* Methods called by bulk generated PCI devices below */
68 /* Methods called by hotplug devices */
69 Method(PCEJ, 2, NotSerialized) {
70 // _EJ0 method - eject callback
73 Store(ShiftLeft(1, Arg1), B0EJ)
78 /* Hotplug notification method supplied by SSDT */
79 External(\_SB.PCI0.PCNT, MethodObj)
83 /****************************************************************
85 ****************************************************************/
90 Store(Package(128) {}, Local0)
92 While(LLess(Local1, 128)) {
94 Store(ShiftRight(Local1, 2), Local2)
96 // lnk = (slot + pin) & 3
97 Store(And(Add(Local1, Local2), 3), Local3)
98 If (LEqual(Local3, 0)) {
99 Store(Package(4) { Zero, Zero, LNKD, Zero }, Local4)
101 If (LEqual(Local3, 1)) {
102 // device 1 is the power-management device, needs SCI
103 If (LEqual(Local1, 4)) {
104 Store(Package(4) { Zero, Zero, LNKS, Zero }, Local4)
106 Store(Package(4) { Zero, Zero, LNKA, Zero }, Local4)
109 If (LEqual(Local3, 2)) {
110 Store(Package(4) { Zero, Zero, LNKB, Zero }, Local4)
112 If (LEqual(Local3, 3)) {
113 Store(Package(4) { Zero, Zero, LNKC, Zero }, Local4)
116 // Complete the interrupt routing entry:
117 // Package(4) { 0x[slot]FFFF, [pin], [link], 0) }
119 Store(Or(ShiftLeft(Local2, 16), 0xFFFF), Index(Local4, 0))
120 Store(And(Local1, 3), Index(Local4, 1))
121 Store(Local4, Index(Local0, Local1))
131 External(PRQ0, FieldUnitObj)
132 External(PRQ1, FieldUnitObj)
133 External(PRQ2, FieldUnitObj)
134 External(PRQ3, FieldUnitObj)
135 External(LNKA, DeviceObj)
136 External(LNKB, DeviceObj)
137 External(LNKC, DeviceObj)
138 External(LNKD, DeviceObj)
139 External(LNKS, DeviceObj)