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-dsdt.aml", // Output Filename
22 0x01, // DSDT Compliance Revision
31 OperationRegion (DBG, SystemIO, 0xb044, 0x04)
32 Field (DBG, DWordAcc, NoLock, Preserve)
39 /* PCI Bus definition */
42 Name (_HID, EisaId ("PNP0A03"))
45 Name(_PRT, Package() {
46 /* PCI IRQ routing table, example from ACPI 2.0a specification,
48 /* Note: we provide the same info as the PCI routing
49 table of the Bochs BIOS */
50 #define prt_slot(nr, lnk0, lnk1, lnk2, lnk3) \
51 Package() { nr##ffff, 0, lnk0, 0 }, \
52 Package() { nr##ffff, 1, lnk1, 0 }, \
53 Package() { nr##ffff, 2, lnk2, 0 }, \
54 Package() { nr##ffff, 3, lnk3, 0 }
56 #define prt_slot0(nr) prt_slot(nr, LNKD, LNKA, LNKB, LNKC)
57 #define prt_slot1(nr) prt_slot(nr, LNKA, LNKB, LNKC, LNKD)
58 #define prt_slot2(nr) prt_slot(nr, LNKB, LNKC, LNKD, LNKA)
59 #define prt_slot3(nr) prt_slot(nr, LNKC, LNKD, LNKA, LNKB)
68 Name (_CRS, ResourceTemplate ()
70 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
71 0x0000, // Address Space Granularity
72 0x0000, // Address Range Minimum
73 0x00FF, // Address Range Maximum
74 0x0000, // Address Translation Offset
75 0x0100, // Address Length
78 0x0CF8, // Address Range Minimum
79 0x0CF8, // Address Range Maximum
80 0x01, // Address Alignment
81 0x08, // Address Length
83 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
84 0x0000, // Address Space Granularity
85 0x0000, // Address Range Minimum
86 0x0CF7, // Address Range Maximum
87 0x0000, // Address Translation Offset
88 0x0CF8, // Address Length
90 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
91 0x0000, // Address Space Granularity
92 0x0D00, // Address Range Minimum
93 0xFFFF, // Address Range Maximum
94 0x0000, // Address Translation Offset
95 0xF300, // Address Length
97 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
98 0x00000000, // Address Space Granularity
99 0x000A0000, // Address Range Minimum
100 0x000BFFFF, // Address Range Maximum
101 0x00000000, // Address Translation Offset
102 0x00020000, // Address Length
103 ,, , AddressRangeMemory, TypeStatic)
104 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
105 0x00000000, // Address Space Granularity
106 0xE0000000, // Address Range Minimum
107 0xFEBFFFFF, // Address Range Maximum
108 0x00000000, // Address Translation Offset
109 0x1EC00000, // Address Length
110 ,, , AddressRangeMemory, TypeStatic)
117 Name (_ADR, 0x00020000)
118 Method (_S1D, 0, NotSerialized)
122 Method (_S2D, 0, NotSerialized)
126 Method (_S3D, 0, NotSerialized)
132 /* PIIX3 ISA bridge */
134 Name (_ADR, 0x00010000)
136 /* PIIX PCI to ISA irq remapping */
137 OperationRegion (P40C, PCI_Config, 0x60, 0x04)
139 /* Real-time clock */
142 Name (_HID, EisaId ("PNP0B00"))
143 Name (_CRS, ResourceTemplate ()
145 IO (Decode16, 0x0070, 0x0070, 0x10, 0x02)
147 IO (Decode16, 0x0072, 0x0072, 0x02, 0x06)
151 /* Keyboard seems to be important for WinXP install */
154 Name (_HID, EisaId ("PNP0303"))
155 Method (_STA, 0, NotSerialized)
160 Method (_CRS, 0, NotSerialized)
162 Name (TMP, ResourceTemplate ()
165 0x0060, // Address Range Minimum
166 0x0060, // Address Range Maximum
167 0x01, // Address Alignment
168 0x01, // Address Length
171 0x0064, // Address Range Minimum
172 0x0064, // Address Range Maximum
173 0x01, // Address Alignment
174 0x01, // Address Length
186 Name (_HID, EisaId ("PNP0F13"))
187 Method (_STA, 0, NotSerialized)
192 Method (_CRS, 0, NotSerialized)
194 Name (TMP, ResourceTemplate ()
202 /* PS/2 floppy controller */
205 Name (_HID, EisaId ("PNP0700"))
206 Method (_STA, 0, NotSerialized)
210 Method (_CRS, 0, NotSerialized)
212 Name (BUF0, ResourceTemplate ()
214 IO (Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
215 IO (Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
217 DMA (Compatibility, NotBusMaster, Transfer8) {2}
226 Name (_HID, EisaId ("PNP0400"))
227 Method (_STA, 0, NotSerialized)
229 Store (\_SB.PCI0.PX13.DRSA, Local0)
230 And (Local0, 0x80000000, Local0)
231 If (LEqual (Local0, 0))
240 Method (_CRS, 0, NotSerialized)
242 Name (BUF0, ResourceTemplate ()
244 IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
254 Name (_HID, EisaId ("PNP0501"))
256 Method (_STA, 0, NotSerialized)
258 Store (\_SB.PCI0.PX13.DRSC, Local0)
259 And (Local0, 0x08000000, Local0)
260 If (LEqual (Local0, 0))
269 Method (_CRS, 0, NotSerialized)
271 Name (BUF0, ResourceTemplate ()
273 IO (Decode16, 0x03F8, 0x03F8, 0x00, 0x08)
282 Name (_HID, EisaId ("PNP0501"))
284 Method (_STA, 0, NotSerialized)
286 Store (\_SB.PCI0.PX13.DRSC, Local0)
287 And (Local0, 0x80000000, Local0)
288 If (LEqual (Local0, 0))
297 Method (_CRS, 0, NotSerialized)
299 Name (BUF0, ResourceTemplate ()
301 IO (Decode16, 0x02F8, 0x02F8, 0x00, 0x08)
311 Name (_ADR, 0x00010003)
313 OperationRegion (P13C, PCI_Config, 0x5c, 0x24)
314 Field (P13C, DWordAcc, NoLock, Preserve)
331 Field (\_SB.PCI0.ISA.P40C, ByteAcc, NoLock, Preserve)
340 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
342 Name(_PRS, ResourceTemplate(){
343 Interrupt (, Level, ActiveHigh, Shared)
346 Method (_STA, 0, NotSerialized)
349 If (And (0x80, PRQ0, Local1))
355 Method (_DIS, 0, NotSerialized)
357 Or (PRQ0, 0x80, PRQ0)
359 Method (_CRS, 0, NotSerialized)
361 Name (PRR0, ResourceTemplate ()
363 Interrupt (, Level, ActiveHigh, Shared)
366 CreateDWordField (PRR0, 0x05, TMP)
368 If (LLess (Local0, 0x80))
378 Method (_SRS, 1, NotSerialized)
380 CreateDWordField (Arg0, 0x05, TMP)
385 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
387 Name(_PRS, ResourceTemplate(){
388 Interrupt (, Level, ActiveHigh, Shared)
391 Method (_STA, 0, NotSerialized)
394 If (And (0x80, PRQ1, Local1))
400 Method (_DIS, 0, NotSerialized)
402 Or (PRQ1, 0x80, PRQ1)
404 Method (_CRS, 0, NotSerialized)
406 Name (PRR0, ResourceTemplate ()
408 Interrupt (, Level, ActiveHigh, Shared)
411 CreateDWordField (PRR0, 0x05, TMP)
413 If (LLess (Local0, 0x80))
423 Method (_SRS, 1, NotSerialized)
425 CreateDWordField (Arg0, 0x05, TMP)
430 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
432 Name(_PRS, ResourceTemplate(){
433 Interrupt (, Level, ActiveHigh, Shared)
436 Method (_STA, 0, NotSerialized)
439 If (And (0x80, PRQ2, Local1))
445 Method (_DIS, 0, NotSerialized)
447 Or (PRQ2, 0x80, PRQ2)
449 Method (_CRS, 0, NotSerialized)
451 Name (PRR0, ResourceTemplate ()
453 Interrupt (, Level, ActiveHigh, Shared)
456 CreateDWordField (PRR0, 0x05, TMP)
458 If (LLess (Local0, 0x80))
468 Method (_SRS, 1, NotSerialized)
470 CreateDWordField (Arg0, 0x05, TMP)
475 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
477 Name(_PRS, ResourceTemplate(){
478 Interrupt (, Level, ActiveHigh, Shared)
481 Method (_STA, 0, NotSerialized)
484 If (And (0x80, PRQ3, Local1))
490 Method (_DIS, 0, NotSerialized)
492 Or (PRQ3, 0x80, PRQ3)
494 Method (_CRS, 0, NotSerialized)
496 Name (PRR0, ResourceTemplate ()
498 Interrupt (, Level, ActiveHigh, Shared)
501 CreateDWordField (PRR0, 0x05, TMP)
503 If (LLess (Local0, 0x80))
513 Method (_SRS, 1, NotSerialized)
515 CreateDWordField (Arg0, 0x05, TMP)
522 * S3 (suspend-to-ram), S4 (suspend-to-disk) and S5 (power-off) type codes:
523 * must match piix4 emulation.
525 Name (\_S3, Package (0x04)
527 0x01, /* PM1a_CNT.SLP_TYP */
528 0x01, /* PM1b_CNT.SLP_TYP */
532 Name (\_S4, Package (0x04)
534 Zero, /* PM1a_CNT.SLP_TYP */
535 Zero, /* PM1b_CNT.SLP_TYP */
539 Name (\_S5, Package (0x04)
541 Zero, /* PM1a_CNT.SLP_TYP */
542 Zero, /* PM1b_CNT.SLP_TYP */
549 Name(_HID, "ACPI0006")