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 AmlCode
23 "acpi-dsdt.aml", // Output Filename
25 0x01, // DSDT Compliance Revision
32 #include "acpi-dsdt-dbug.dsl"
35 /****************************************************************
37 ****************************************************************/
41 Name(_HID, EisaId("PNP0A03"))
47 #include "acpi-dsdt-pci-crs.dsl"
48 #include "acpi-dsdt-hpet.dsl"
51 /****************************************************************
53 ****************************************************************/
57 Name(_ADR, 0x00020000)
58 OperationRegion(PCIC, PCI_Config, Zero, 0x4)
59 Field(PCIC, DWordAcc, NoLock, Preserve) {
62 Method(_S1D, 0, NotSerialized) {
65 Method(_S2D, 0, NotSerialized) {
68 Method(_S3D, 0, NotSerialized) {
69 If (LEqual(VEND, 0x1001b36)) {
79 /****************************************************************
81 ****************************************************************/
85 Name(_ADR, 0x00010003)
86 OperationRegion(P13C, PCI_Config, 0x00, 0xff)
91 /****************************************************************
93 ****************************************************************/
97 Name(_ADR, 0x00010000)
99 /* PIIX PCI to ISA irq remapping */
100 OperationRegion(P40C, PCI_Config, 0x60, 0x04)
103 Field(\_SB.PCI0.PX13.P13C, AnyAcc, NoLock, Preserve) {
117 #include "acpi-dsdt-isa.dsl"
120 /****************************************************************
122 ****************************************************************/
125 OperationRegion(PCST, SystemIO, 0xae00, 0x08)
126 Field(PCST, DWordAcc, NoLock, WriteAsZeros) {
131 OperationRegion(SEJ, SystemIO, 0xae08, 0x04)
132 Field(SEJ, DWordAcc, NoLock, WriteAsZeros) {
136 /* Methods called by bulk generated PCI devices below */
138 /* Methods called by hotplug devices */
139 Method(PCEJ, 1, NotSerialized) {
140 // _EJ0 method - eject callback
141 Store(ShiftLeft(1, Arg0), B0EJ)
144 /* Hotplug notification method supplied by SSDT */
145 External(\_SB.PCI0.PCNT, MethodObj)
147 /* PCI hotplug notify method */
151 While (LLess(Local0, 31)) {
153 If (And(PCIU, ShiftLeft(1, Local0))) {
156 If (And(PCID, ShiftLeft(1, Local0))) {
164 /****************************************************************
166 ****************************************************************/
170 Name(_PRT, Package() {
171 /* PCI IRQ routing table, example from ACPI 2.0a specification,
173 /* Note: we provide the same info as the PCI routing
174 table of the Bochs BIOS */
176 #define prt_slot(nr, lnk0, lnk1, lnk2, lnk3) \
177 Package() { nr##ffff, 0, lnk0, 0 }, \
178 Package() { nr##ffff, 1, lnk1, 0 }, \
179 Package() { nr##ffff, 2, lnk2, 0 }, \
180 Package() { nr##ffff, 3, lnk3, 0 }
182 #define prt_slot0(nr) prt_slot(nr, LNKD, LNKA, LNKB, LNKC)
183 #define prt_slot1(nr) prt_slot(nr, LNKA, LNKB, LNKC, LNKD)
184 #define prt_slot2(nr) prt_slot(nr, LNKB, LNKC, LNKD, LNKA)
185 #define prt_slot3(nr) prt_slot(nr, LNKC, LNKD, LNKA, LNKB)
188 /* Device 1 is power mgmt device, and can only use irq 9 */
189 prt_slot(0x0001, LNKS, LNKB, LNKC, LNKD),
223 Field(PCI0.ISA.P40C, ByteAcc, NoLock, Preserve) {
230 Method(IQST, 1, NotSerialized) {
231 // _STA method - get status
232 If (And(0x80, Arg0)) {
237 Method(IQCR, 1, Serialized) {
238 // _CRS method - get current settings
239 Name(PRR0, ResourceTemplate() {
240 Interrupt(, Level, ActiveHigh, Shared) { 0 }
242 CreateDWordField(PRR0, 0x05, PRRI)
243 If (LLess(Arg0, 0x80)) {
249 #define define_link(link, uid, reg) \
251 Name(_HID, EISAID("PNP0C0F")) \
253 Name(_PRS, ResourceTemplate() { \
254 Interrupt(, Level, ActiveHigh, Shared) { \
258 Method(_STA, 0, NotSerialized) { \
261 Method(_DIS, 0, NotSerialized) { \
264 Method(_CRS, 0, NotSerialized) { \
267 Method(_SRS, 1, NotSerialized) { \
268 CreateDWordField(Arg0, 0x05, PRRI) \
273 define_link(LNKA, 0, PRQ0)
274 define_link(LNKB, 1, PRQ1)
275 define_link(LNKC, 2, PRQ2)
276 define_link(LNKD, 3, PRQ3)
279 Name(_HID, EISAID("PNP0C0F"))
281 Name(_PRS, ResourceTemplate() {
282 Interrupt(, Level, ActiveHigh, Shared) { 9 }
285 // The SCI cannot be disabled and is always attached to GSI 9,
286 // so these are no-ops. We only need this link to override the
287 // polarity to active high and match the content of the MADT.
288 Method(_STA, 0, NotSerialized) { Return (0x0b) }
289 Method(_DIS, 0, NotSerialized) { }
290 Method(_CRS, 0, NotSerialized) { Return (_PRS) }
291 Method(_SRS, 1, NotSerialized) { }
295 #include "acpi-dsdt-cpu-hotplug.dsl"
298 /****************************************************************
299 * General purpose events
300 ****************************************************************/
303 Name(_HID, "ACPI0006")