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 Name (_ADR, 0x00020000)
138 Method (_S1D, 0, NotSerialized)
142 Method (_S2D, 0, NotSerialized)
146 Method (_S3D, 0, NotSerialized)
152 /* PIIX3 ISA bridge */
154 Name (_ADR, 0x00010000)
156 /* PIIX PCI to ISA irq remapping */
157 OperationRegion (P40C, PCI_Config, 0x60, 0x04)
159 /* Real-time clock */
162 Name (_HID, EisaId ("PNP0B00"))
163 Name (_CRS, ResourceTemplate ()
165 IO (Decode16, 0x0070, 0x0070, 0x10, 0x02)
167 IO (Decode16, 0x0072, 0x0072, 0x02, 0x06)
171 /* Keyboard seems to be important for WinXP install */
174 Name (_HID, EisaId ("PNP0303"))
175 Method (_STA, 0, NotSerialized)
180 Method (_CRS, 0, NotSerialized)
182 Name (TMP, ResourceTemplate ()
185 0x0060, // Address Range Minimum
186 0x0060, // Address Range Maximum
187 0x01, // Address Alignment
188 0x01, // Address Length
191 0x0064, // Address Range Minimum
192 0x0064, // Address Range Maximum
193 0x01, // Address Alignment
194 0x01, // Address Length
206 Name (_HID, EisaId ("PNP0F13"))
207 Method (_STA, 0, NotSerialized)
212 Method (_CRS, 0, NotSerialized)
214 Name (TMP, ResourceTemplate ()
222 /* PS/2 floppy controller */
225 Name (_HID, EisaId ("PNP0700"))
226 Method (_STA, 0, NotSerialized)
230 Method (_CRS, 0, NotSerialized)
232 Name (BUF0, ResourceTemplate ()
234 IO (Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
235 IO (Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
237 DMA (Compatibility, NotBusMaster, Transfer8) {2}
246 Name (_HID, EisaId ("PNP0400"))
247 Method (_STA, 0, NotSerialized)
249 Store (\_SB.PCI0.PX13.DRSA, Local0)
250 And (Local0, 0x80000000, Local0)
251 If (LEqual (Local0, 0))
260 Method (_CRS, 0, NotSerialized)
262 Name (BUF0, ResourceTemplate ()
264 IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
274 Name (_HID, EisaId ("PNP0501"))
276 Method (_STA, 0, NotSerialized)
278 Store (\_SB.PCI0.PX13.DRSC, Local0)
279 And (Local0, 0x08000000, Local0)
280 If (LEqual (Local0, 0))
289 Method (_CRS, 0, NotSerialized)
291 Name (BUF0, ResourceTemplate ()
293 IO (Decode16, 0x03F8, 0x03F8, 0x00, 0x08)
302 Name (_HID, EisaId ("PNP0501"))
304 Method (_STA, 0, NotSerialized)
306 Store (\_SB.PCI0.PX13.DRSC, Local0)
307 And (Local0, 0x80000000, Local0)
308 If (LEqual (Local0, 0))
317 Method (_CRS, 0, NotSerialized)
319 Name (BUF0, ResourceTemplate ()
321 IO (Decode16, 0x02F8, 0x02F8, 0x00, 0x08)
331 Name (_ADR, 0x00010003)
333 OperationRegion (P13C, PCI_Config, 0x5c, 0x24)
334 Field (P13C, DWordAcc, NoLock, Preserve)
351 Field (\_SB.PCI0.ISA.P40C, ByteAcc, NoLock, Preserve)
360 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
362 Name(_PRS, ResourceTemplate(){
363 IRQ (Level, ActiveLow, Shared)
364 {3,4,5,6,7,9,10,11,12}
366 Method (_STA, 0, NotSerialized)
369 If (And (0x80, PRQ0, Local1))
375 Method (_DIS, 0, NotSerialized)
377 Or (PRQ0, 0x80, PRQ0)
379 Method (_CRS, 0, NotSerialized)
381 Name (PRR0, ResourceTemplate ()
383 IRQ (Level, ActiveLow, Shared)
386 CreateWordField (PRR0, 0x01, TMP)
388 If (LLess (Local0, 0x80))
390 ShiftLeft (One, Local0, TMP)
398 Method (_SRS, 1, NotSerialized)
400 CreateWordField (Arg0, 0x01, TMP)
401 FindSetRightBit (TMP, Local0)
407 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
409 Name(_PRS, ResourceTemplate(){
410 IRQ (Level, ActiveLow, Shared)
411 {3,4,5,6,7,9,10,11,12}
413 Method (_STA, 0, NotSerialized)
416 If (And (0x80, PRQ1, Local1))
422 Method (_DIS, 0, NotSerialized)
424 Or (PRQ1, 0x80, PRQ1)
426 Method (_CRS, 0, NotSerialized)
428 Name (PRR0, ResourceTemplate ()
430 IRQ (Level, ActiveLow, Shared)
433 CreateWordField (PRR0, 0x01, TMP)
435 If (LLess (Local0, 0x80))
437 ShiftLeft (One, Local0, TMP)
445 Method (_SRS, 1, NotSerialized)
447 CreateWordField (Arg0, 0x01, TMP)
448 FindSetRightBit (TMP, Local0)
454 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
456 Name(_PRS, ResourceTemplate(){
457 IRQ (Level, ActiveLow, Shared)
458 {3,4,5,6,7,9,10,11,12}
460 Method (_STA, 0, NotSerialized)
463 If (And (0x80, PRQ2, Local1))
469 Method (_DIS, 0, NotSerialized)
471 Or (PRQ2, 0x80, PRQ2)
473 Method (_CRS, 0, NotSerialized)
475 Name (PRR0, ResourceTemplate ()
477 IRQ (Level, ActiveLow, Shared)
480 CreateWordField (PRR0, 0x01, TMP)
482 If (LLess (Local0, 0x80))
484 ShiftLeft (One, Local0, TMP)
492 Method (_SRS, 1, NotSerialized)
494 CreateWordField (Arg0, 0x01, TMP)
495 FindSetRightBit (TMP, Local0)
501 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
503 Name(_PRS, ResourceTemplate(){
504 IRQ (Level, ActiveLow, Shared)
505 {3,4,5,6,7,9,10,11,12}
507 Method (_STA, 0, NotSerialized)
510 If (And (0x80, PRQ3, Local1))
516 Method (_DIS, 0, NotSerialized)
518 Or (PRQ3, 0x80, PRQ3)
520 Method (_CRS, 0, NotSerialized)
522 Name (PRR0, ResourceTemplate ()
524 IRQ (Level, ActiveLow, Shared)
527 CreateWordField (PRR0, 0x01, TMP)
529 If (LLess (Local0, 0x80))
531 ShiftLeft (One, Local0, TMP)
539 Method (_SRS, 1, NotSerialized)
541 CreateWordField (Arg0, 0x01, TMP)
542 FindSetRightBit (TMP, Local0)
550 * S3 (suspend-to-ram), S4 (suspend-to-disk) and S5 (power-off) type codes:
551 * must match piix4 emulation.
553 Name (\_S3, Package (0x04)
555 0x01, /* PM1a_CNT.SLP_TYP */
556 0x01, /* PM1b_CNT.SLP_TYP */
560 Name (\_S4, Package (0x04)
562 Zero, /* PM1a_CNT.SLP_TYP */
563 Zero, /* PM1b_CNT.SLP_TYP */
567 Name (\_S5, Package (0x04)
569 Zero, /* PM1a_CNT.SLP_TYP */
570 Zero, /* PM1b_CNT.SLP_TYP */