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 */
52 Package() {0x0000ffff, 0, LNKD, 0},
53 Package() {0x0000ffff, 1, LNKA, 0},
54 Package() {0x0000ffff, 2, LNKB, 0},
55 Package() {0x0000ffff, 3, LNKC, 0},
58 Package() {0x0001ffff, 0, LNKA, 0},
59 Package() {0x0001ffff, 1, LNKB, 0},
60 Package() {0x0001ffff, 2, LNKC, 0},
61 Package() {0x0001ffff, 3, LNKD, 0},
64 Package() {0x0002ffff, 0, LNKB, 0},
65 Package() {0x0002ffff, 1, LNKC, 0},
66 Package() {0x0002ffff, 2, LNKD, 0},
67 Package() {0x0002ffff, 3, LNKA, 0},
70 Package() {0x0003ffff, 0, LNKC, 0},
71 Package() {0x0003ffff, 1, LNKD, 0},
72 Package() {0x0003ffff, 2, LNKA, 0},
73 Package() {0x0003ffff, 3, LNKB, 0},
76 Package() {0x0004ffff, 0, LNKD, 0},
77 Package() {0x0004ffff, 1, LNKA, 0},
78 Package() {0x0004ffff, 2, LNKB, 0},
79 Package() {0x0004ffff, 3, LNKC, 0},
82 Package() {0x0005ffff, 0, LNKA, 0},
83 Package() {0x0005ffff, 1, LNKB, 0},
84 Package() {0x0005ffff, 2, LNKC, 0},
85 Package() {0x0005ffff, 3, LNKD, 0},
88 Name (_CRS, ResourceTemplate ()
90 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
91 0x0000, // Address Space Granularity
92 0x0000, // Address Range Minimum
93 0x00FF, // Address Range Maximum
94 0x0000, // Address Translation Offset
95 0x0100, // Address Length
98 0x0CF8, // Address Range Minimum
99 0x0CF8, // Address Range Maximum
100 0x01, // Address Alignment
101 0x08, // Address Length
103 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
104 0x0000, // Address Space Granularity
105 0x0000, // Address Range Minimum
106 0x0CF7, // Address Range Maximum
107 0x0000, // Address Translation Offset
108 0x0CF8, // Address Length
110 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
111 0x0000, // Address Space Granularity
112 0x0D00, // Address Range Minimum
113 0xFFFF, // Address Range Maximum
114 0x0000, // Address Translation Offset
115 0xF300, // Address Length
117 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
118 0x00000000, // Address Space Granularity
119 0x000A0000, // Address Range Minimum
120 0x000BFFFF, // Address Range Maximum
121 0x00000000, // Address Translation Offset
122 0x00020000, // Address Length
123 ,, , AddressRangeMemory, TypeStatic)
124 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
125 0x00000000, // Address Space Granularity
126 0xE0000000, // Address Range Minimum
127 0xFEBFFFFF, // Address Range Maximum
128 0x00000000, // Address Translation Offset
129 0x1EC00000, // Address Length
130 ,, , AddressRangeMemory, TypeStatic)
137 /* PIIX3 ISA bridge */
139 Name (_ADR, 0x00010000)
141 /* PIIX PCI to ISA irq remapping */
142 OperationRegion (P40C, PCI_Config, 0x60, 0x04)
144 /* Real-time clock */
147 Name (_HID, EisaId ("PNP0B00"))
148 Name (_CRS, ResourceTemplate ()
150 IO (Decode16, 0x0070, 0x0070, 0x10, 0x02)
152 IO (Decode16, 0x0072, 0x0072, 0x02, 0x06)
156 /* Keyboard seems to be important for WinXP install */
159 Name (_HID, EisaId ("PNP0303"))
160 Method (_STA, 0, NotSerialized)
165 Method (_CRS, 0, NotSerialized)
167 Name (TMP, ResourceTemplate ()
170 0x0060, // Address Range Minimum
171 0x0060, // Address Range Maximum
172 0x01, // Address Alignment
173 0x01, // Address Length
176 0x0064, // Address Range Minimum
177 0x0064, // Address Range Maximum
178 0x01, // Address Alignment
179 0x01, // Address Length
191 Name (_HID, EisaId ("PNP0F13"))
192 Method (_STA, 0, NotSerialized)
197 Method (_CRS, 0, NotSerialized)
199 Name (TMP, ResourceTemplate ()
207 /* PS/2 floppy controller */
210 Name (_HID, EisaId ("PNP0700"))
211 Method (_STA, 0, NotSerialized)
215 Method (_CRS, 0, NotSerialized)
217 Name (BUF0, ResourceTemplate ()
219 IO (Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
220 IO (Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
222 DMA (Compatibility, NotBusMaster, Transfer8) {2}
231 Name (_HID, EisaId ("PNP0400"))
232 Method (_STA, 0, NotSerialized)
234 Store (\_SB.PCI0.PX13.DRSA, Local0)
235 And (Local0, 0x80000000, Local0)
236 If (LEqual (Local0, 0))
245 Method (_CRS, 0, NotSerialized)
247 Name (BUF0, ResourceTemplate ()
249 IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
259 Name (_HID, EisaId ("PNP0501"))
261 Method (_STA, 0, NotSerialized)
263 Store (\_SB.PCI0.PX13.DRSC, Local0)
264 And (Local0, 0x08000000, Local0)
265 If (LEqual (Local0, 0))
274 Method (_CRS, 0, NotSerialized)
276 Name (BUF0, ResourceTemplate ()
278 IO (Decode16, 0x03F8, 0x03F8, 0x00, 0x08)
287 Name (_HID, EisaId ("PNP0501"))
289 Method (_STA, 0, NotSerialized)
291 Store (\_SB.PCI0.PX13.DRSC, Local0)
292 And (Local0, 0x80000000, Local0)
293 If (LEqual (Local0, 0))
302 Method (_CRS, 0, NotSerialized)
304 Name (BUF0, ResourceTemplate ()
306 IO (Decode16, 0x02F8, 0x02F8, 0x00, 0x08)
316 Name (_ADR, 0x00010003)
318 OperationRegion (P13C, PCI_Config, 0x5c, 0x24)
319 Field (P13C, DWordAcc, NoLock, Preserve)
336 Field (\_SB.PCI0.ISA.P40C, ByteAcc, NoLock, Preserve)
345 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
347 Name(_PRS, ResourceTemplate(){
348 IRQ (Level, ActiveLow, Shared)
349 {3,4,5,6,7,9,10,11,12}
351 Method (_STA, 0, NotSerialized)
354 If (And (0x80, PRQ0, Local1))
360 Method (_DIS, 0, NotSerialized)
362 Or (PRQ0, 0x80, PRQ0)
364 Method (_CRS, 0, NotSerialized)
366 Name (PRR0, ResourceTemplate ()
368 IRQ (Level, ActiveLow, Shared)
371 CreateWordField (PRR0, 0x01, TMP)
373 If (LLess (Local0, 0x80))
375 ShiftLeft (One, Local0, TMP)
383 Method (_SRS, 1, NotSerialized)
385 CreateWordField (Arg0, 0x01, TMP)
386 FindSetRightBit (TMP, Local0)
392 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
394 Name(_PRS, ResourceTemplate(){
395 IRQ (Level, ActiveLow, Shared)
396 {3,4,5,6,7,9,10,11,12}
398 Method (_STA, 0, NotSerialized)
401 If (And (0x80, PRQ1, Local1))
407 Method (_DIS, 0, NotSerialized)
409 Or (PRQ1, 0x80, PRQ1)
411 Method (_CRS, 0, NotSerialized)
413 Name (PRR0, ResourceTemplate ()
415 IRQ (Level, ActiveLow, Shared)
418 CreateWordField (PRR0, 0x01, TMP)
420 If (LLess (Local0, 0x80))
422 ShiftLeft (One, Local0, TMP)
430 Method (_SRS, 1, NotSerialized)
432 CreateWordField (Arg0, 0x01, TMP)
433 FindSetRightBit (TMP, Local0)
439 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
441 Name(_PRS, ResourceTemplate(){
442 IRQ (Level, ActiveLow, Shared)
443 {3,4,5,6,7,9,10,11,12}
445 Method (_STA, 0, NotSerialized)
448 If (And (0x80, PRQ2, Local1))
454 Method (_DIS, 0, NotSerialized)
456 Or (PRQ2, 0x80, PRQ2)
458 Method (_CRS, 0, NotSerialized)
460 Name (PRR0, ResourceTemplate ()
462 IRQ (Level, ActiveLow, Shared)
465 CreateWordField (PRR0, 0x01, TMP)
467 If (LLess (Local0, 0x80))
469 ShiftLeft (One, Local0, TMP)
477 Method (_SRS, 1, NotSerialized)
479 CreateWordField (Arg0, 0x01, TMP)
480 FindSetRightBit (TMP, Local0)
486 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
488 Name(_PRS, ResourceTemplate(){
489 IRQ (Level, ActiveLow, Shared)
490 {3,4,5,6,7,9,10,11,12}
492 Method (_STA, 0, NotSerialized)
495 If (And (0x80, PRQ3, Local1))
501 Method (_DIS, 0, NotSerialized)
503 Or (PRQ3, 0x80, PRQ3)
505 Method (_CRS, 0, NotSerialized)
507 Name (PRR0, ResourceTemplate ()
509 IRQ (Level, ActiveLow, Shared)
512 CreateWordField (PRR0, 0x01, TMP)
514 If (LLess (Local0, 0x80))
516 ShiftLeft (One, Local0, TMP)
524 Method (_SRS, 1, NotSerialized)
526 CreateWordField (Arg0, 0x01, TMP)
527 FindSetRightBit (TMP, Local0)
534 /* S5 = power off state */
535 Name (_S5, Package (4) {
536 0x00, // PM1a_CNT.SLP_TYP
537 0x00, // PM2a_CNT.SLP_TYP