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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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)
135 Name(_HID, EISAID("PNP0103"))
137 Method (_STA, 0, NotSerialized) {
140 Name(_CRS, ResourceTemplate() {
142 ResourceConsumer, PosDecode, MinFixed, MaxFixed,
143 NonCacheable, ReadWrite,
148 0x00000400 /* 1K memory: FED00000 - FED003FF */
157 Name (_ADR, 0x00020000)
158 Method (_S1D, 0, NotSerialized)
162 Method (_S2D, 0, NotSerialized)
166 Method (_S3D, 0, NotSerialized)
172 /* PIIX3 ISA bridge */
174 Name (_ADR, 0x00010000)
176 /* PIIX PCI to ISA irq remapping */
177 OperationRegion (P40C, PCI_Config, 0x60, 0x04)
179 /* Real-time clock */
182 Name (_HID, EisaId ("PNP0B00"))
183 Name (_CRS, ResourceTemplate ()
185 IO (Decode16, 0x0070, 0x0070, 0x10, 0x02)
187 IO (Decode16, 0x0072, 0x0072, 0x02, 0x06)
191 /* Keyboard seems to be important for WinXP install */
194 Name (_HID, EisaId ("PNP0303"))
195 Method (_STA, 0, NotSerialized)
200 Method (_CRS, 0, NotSerialized)
202 Name (TMP, ResourceTemplate ()
205 0x0060, // Address Range Minimum
206 0x0060, // Address Range Maximum
207 0x01, // Address Alignment
208 0x01, // Address Length
211 0x0064, // Address Range Minimum
212 0x0064, // Address Range Maximum
213 0x01, // Address Alignment
214 0x01, // Address Length
226 Name (_HID, EisaId ("PNP0F13"))
227 Method (_STA, 0, NotSerialized)
232 Method (_CRS, 0, NotSerialized)
234 Name (TMP, ResourceTemplate ()
242 /* PS/2 floppy controller */
245 Name (_HID, EisaId ("PNP0700"))
246 Method (_STA, 0, NotSerialized)
250 Method (_CRS, 0, NotSerialized)
252 Name (BUF0, ResourceTemplate ()
254 IO (Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
255 IO (Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
257 DMA (Compatibility, NotBusMaster, Transfer8) {2}
266 Name (_HID, EisaId ("PNP0400"))
267 Method (_STA, 0, NotSerialized)
269 Store (\_SB.PCI0.PX13.DRSA, Local0)
270 And (Local0, 0x80000000, Local0)
271 If (LEqual (Local0, 0))
280 Method (_CRS, 0, NotSerialized)
282 Name (BUF0, ResourceTemplate ()
284 IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
294 Name (_HID, EisaId ("PNP0501"))
296 Method (_STA, 0, NotSerialized)
298 Store (\_SB.PCI0.PX13.DRSC, Local0)
299 And (Local0, 0x08000000, Local0)
300 If (LEqual (Local0, 0))
309 Method (_CRS, 0, NotSerialized)
311 Name (BUF0, ResourceTemplate ()
313 IO (Decode16, 0x03F8, 0x03F8, 0x00, 0x08)
322 Name (_HID, EisaId ("PNP0501"))
324 Method (_STA, 0, NotSerialized)
326 Store (\_SB.PCI0.PX13.DRSC, Local0)
327 And (Local0, 0x80000000, Local0)
328 If (LEqual (Local0, 0))
337 Method (_CRS, 0, NotSerialized)
339 Name (BUF0, ResourceTemplate ()
341 IO (Decode16, 0x02F8, 0x02F8, 0x00, 0x08)
351 Name (_ADR, 0x00010003)
353 OperationRegion (P13C, PCI_Config, 0x5c, 0x24)
354 Field (P13C, DWordAcc, NoLock, Preserve)
371 Field (\_SB.PCI0.ISA.P40C, ByteAcc, NoLock, Preserve)
380 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
382 Name(_PRS, ResourceTemplate(){
383 IRQ (Level, ActiveLow, Shared)
384 {3,4,5,6,7,9,10,11,12}
386 Method (_STA, 0, NotSerialized)
389 If (And (0x80, PRQ0, Local1))
395 Method (_DIS, 0, NotSerialized)
397 Or (PRQ0, 0x80, PRQ0)
399 Method (_CRS, 0, NotSerialized)
401 Name (PRR0, ResourceTemplate ()
403 IRQ (Level, ActiveLow, Shared)
406 CreateWordField (PRR0, 0x01, TMP)
408 If (LLess (Local0, 0x80))
410 ShiftLeft (One, Local0, TMP)
418 Method (_SRS, 1, NotSerialized)
420 CreateWordField (Arg0, 0x01, TMP)
421 FindSetRightBit (TMP, Local0)
427 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
429 Name(_PRS, ResourceTemplate(){
430 IRQ (Level, ActiveLow, Shared)
431 {3,4,5,6,7,9,10,11,12}
433 Method (_STA, 0, NotSerialized)
436 If (And (0x80, PRQ1, Local1))
442 Method (_DIS, 0, NotSerialized)
444 Or (PRQ1, 0x80, PRQ1)
446 Method (_CRS, 0, NotSerialized)
448 Name (PRR0, ResourceTemplate ()
450 IRQ (Level, ActiveLow, Shared)
453 CreateWordField (PRR0, 0x01, TMP)
455 If (LLess (Local0, 0x80))
457 ShiftLeft (One, Local0, TMP)
465 Method (_SRS, 1, NotSerialized)
467 CreateWordField (Arg0, 0x01, TMP)
468 FindSetRightBit (TMP, Local0)
474 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
476 Name(_PRS, ResourceTemplate(){
477 IRQ (Level, ActiveLow, Shared)
478 {3,4,5,6,7,9,10,11,12}
480 Method (_STA, 0, NotSerialized)
483 If (And (0x80, PRQ2, Local1))
489 Method (_DIS, 0, NotSerialized)
491 Or (PRQ2, 0x80, PRQ2)
493 Method (_CRS, 0, NotSerialized)
495 Name (PRR0, ResourceTemplate ()
497 IRQ (Level, ActiveLow, Shared)
500 CreateWordField (PRR0, 0x01, TMP)
502 If (LLess (Local0, 0x80))
504 ShiftLeft (One, Local0, TMP)
512 Method (_SRS, 1, NotSerialized)
514 CreateWordField (Arg0, 0x01, TMP)
515 FindSetRightBit (TMP, Local0)
521 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
523 Name(_PRS, ResourceTemplate(){
524 IRQ (Level, ActiveLow, Shared)
525 {3,4,5,6,7,9,10,11,12}
527 Method (_STA, 0, NotSerialized)
530 If (And (0x80, PRQ3, Local1))
536 Method (_DIS, 0, NotSerialized)
538 Or (PRQ3, 0x80, PRQ3)
540 Method (_CRS, 0, NotSerialized)
542 Name (PRR0, ResourceTemplate ()
544 IRQ (Level, ActiveLow, Shared)
547 CreateWordField (PRR0, 0x01, TMP)
549 If (LLess (Local0, 0x80))
551 ShiftLeft (One, Local0, TMP)
559 Method (_SRS, 1, NotSerialized)
561 CreateWordField (Arg0, 0x01, TMP)
562 FindSetRightBit (TMP, Local0)
570 * S3 (suspend-to-ram), S4 (suspend-to-disk) and S5 (power-off) type codes:
571 * must match piix4 emulation.
573 Name (\_S3, Package (0x04)
575 0x01, /* PM1a_CNT.SLP_TYP */
576 0x01, /* PM1b_CNT.SLP_TYP */
580 Name (\_S4, Package (0x04)
582 Zero, /* PM1a_CNT.SLP_TYP */
583 Zero, /* PM1b_CNT.SLP_TYP */
587 Name (\_S5, Package (0x04)
589 Zero, /* PM1a_CNT.SLP_TYP */
590 Zero, /* PM1b_CNT.SLP_TYP */