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
30 /* CMOS memory access */
31 OperationRegion (CMS, SystemIO, 0x70, 0x02)
32 Field (CMS, ByteAcc, NoLock, Preserve)
37 Method (CMRD, 1, NotSerialized)
45 OperationRegion (DBG, SystemIO, 0xb044, 0x04)
46 Field (DBG, DWordAcc, NoLock, Preserve)
53 /* PCI Bus definition */
56 Name (_HID, EisaId ("PNP0A03"))
59 Name(_PRT, Package() {
60 /* PCI IRQ routing table, example from ACPI 2.0a specification,
62 /* Note: we provide the same info as the PCI routing
63 table of the Bochs BIOS */
66 Package() {0x0000ffff, 0, LNKD, 0},
67 Package() {0x0000ffff, 1, LNKA, 0},
68 Package() {0x0000ffff, 2, LNKB, 0},
69 Package() {0x0000ffff, 3, LNKC, 0},
72 Package() {0x0001ffff, 0, LNKA, 0},
73 Package() {0x0001ffff, 1, LNKB, 0},
74 Package() {0x0001ffff, 2, LNKC, 0},
75 Package() {0x0001ffff, 3, LNKD, 0},
78 Package() {0x0002ffff, 0, LNKB, 0},
79 Package() {0x0002ffff, 1, LNKC, 0},
80 Package() {0x0002ffff, 2, LNKD, 0},
81 Package() {0x0002ffff, 3, LNKA, 0},
84 Package() {0x0003ffff, 0, LNKC, 0},
85 Package() {0x0003ffff, 1, LNKD, 0},
86 Package() {0x0003ffff, 2, LNKA, 0},
87 Package() {0x0003ffff, 3, LNKB, 0},
90 Package() {0x0004ffff, 0, LNKD, 0},
91 Package() {0x0004ffff, 1, LNKA, 0},
92 Package() {0x0004ffff, 2, LNKB, 0},
93 Package() {0x0004ffff, 3, LNKC, 0},
96 Package() {0x0005ffff, 0, LNKA, 0},
97 Package() {0x0005ffff, 1, LNKB, 0},
98 Package() {0x0005ffff, 2, LNKC, 0},
99 Package() {0x0005ffff, 3, LNKD, 0},
102 Method (_CRS, 0, NotSerialized)
104 Name (MEMP, ResourceTemplate ()
106 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
107 0x0000, // Address Space Granularity
108 0x0000, // Address Range Minimum
109 0x00FF, // Address Range Maximum
110 0x0000, // Address Translation Offset
111 0x0100, // Address Length
114 0x0CF8, // Address Range Minimum
115 0x0CF8, // Address Range Maximum
116 0x01, // Address Alignment
117 0x08, // Address Length
119 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
120 0x0000, // Address Space Granularity
121 0x0000, // Address Range Minimum
122 0x0CF7, // Address Range Maximum
123 0x0000, // Address Translation Offset
124 0x0CF8, // Address Length
126 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
127 0x0000, // Address Space Granularity
128 0x0D00, // Address Range Minimum
129 0xFFFF, // Address Range Maximum
130 0x0000, // Address Translation Offset
131 0xF300, // Address Length
133 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
134 0x00000000, // Address Space Granularity
135 0x000A0000, // Address Range Minimum
136 0x000BFFFF, // Address Range Maximum
137 0x00000000, // Address Translation Offset
138 0x00020000, // Address Length
139 ,, , AddressRangeMemory, TypeStatic)
140 DWordMemory (ResourceProducer, PosDecode, MinNotFixed, MaxFixed, NonCacheable, ReadWrite,
141 0x00000000, // Address Space Granularity
142 0x00000000, // Address Range Minimum
143 0xFEBFFFFF, // Address Range Maximum
144 0x00000000, // Address Translation Offset
145 0x00000000, // Address Length
146 ,, MEMF, AddressRangeMemory, TypeStatic)
148 CreateDWordField (MEMP, \_SB.PCI0._CRS.MEMF._MIN, PMIN)
149 CreateDWordField (MEMP, \_SB.PCI0._CRS.MEMF._MAX, PMAX)
150 CreateDWordField (MEMP, \_SB.PCI0._CRS.MEMF._LEN, PLEN)
151 /* compute available RAM */
152 Add(CMRD(0x34), ShiftLeft(CMRD(0x35), 8), Local0)
153 ShiftLeft(Local0, 16, Local0)
154 Add(Local0, 0x1000000, Local0)
155 /* update field of last region */
157 Subtract (PMAX, PMIN, PLEN)
166 /* PIIX3 ISA bridge */
168 Name (_ADR, 0x00010000)
170 /* PIIX PCI to ISA irq remapping */
171 OperationRegion (P40C, PCI_Config, 0x60, 0x04)
173 /* Real-time clock */
176 Name (_HID, EisaId ("PNP0B00"))
177 Name (_CRS, ResourceTemplate ()
179 IO (Decode16, 0x0070, 0x0070, 0x10, 0x02)
181 IO (Decode16, 0x0072, 0x0072, 0x02, 0x06)
185 /* Keyboard seems to be important for WinXP install */
188 Name (_HID, EisaId ("PNP0303"))
189 Method (_STA, 0, NotSerialized)
194 Method (_CRS, 0, NotSerialized)
196 Name (TMP, ResourceTemplate ()
199 0x0060, // Address Range Minimum
200 0x0060, // Address Range Maximum
201 0x01, // Address Alignment
202 0x01, // Address Length
205 0x0064, // Address Range Minimum
206 0x0064, // Address Range Maximum
207 0x01, // Address Alignment
208 0x01, // Address Length
220 Name (_HID, EisaId ("PNP0F13"))
221 Method (_STA, 0, NotSerialized)
226 Method (_CRS, 0, NotSerialized)
228 Name (TMP, ResourceTemplate ()
236 /* PS/2 floppy controller */
239 Name (_HID, EisaId ("PNP0700"))
240 Method (_STA, 0, NotSerialized)
244 Method (_CRS, 0, NotSerialized)
246 Name (BUF0, ResourceTemplate ()
248 IO (Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
249 IO (Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
251 DMA (Compatibility, NotBusMaster, Transfer8) {2}
260 Name (_HID, EisaId ("PNP0400"))
261 Method (_STA, 0, NotSerialized)
263 Store (\_SB.PCI0.PX13.DRSA, Local0)
264 And (Local0, 0x80000000, Local0)
265 If (LEqual (Local0, 0))
274 Method (_CRS, 0, NotSerialized)
276 Name (BUF0, ResourceTemplate ()
278 IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
288 Name (_HID, EisaId ("PNP0501"))
290 Method (_STA, 0, NotSerialized)
292 Store (\_SB.PCI0.PX13.DRSC, Local0)
293 And (Local0, 0x08000000, Local0)
294 If (LEqual (Local0, 0))
303 Method (_CRS, 0, NotSerialized)
305 Name (BUF0, ResourceTemplate ()
307 IO (Decode16, 0x03F8, 0x03F8, 0x00, 0x08)
316 Name (_HID, EisaId ("PNP0501"))
318 Method (_STA, 0, NotSerialized)
320 Store (\_SB.PCI0.PX13.DRSC, Local0)
321 And (Local0, 0x80000000, Local0)
322 If (LEqual (Local0, 0))
331 Method (_CRS, 0, NotSerialized)
333 Name (BUF0, ResourceTemplate ()
335 IO (Decode16, 0x02F8, 0x02F8, 0x00, 0x08)
345 Name (_ADR, 0x00010003)
347 OperationRegion (P13C, PCI_Config, 0x5c, 0x24)
348 Field (P13C, DWordAcc, NoLock, Preserve)
365 Field (\_SB.PCI0.ISA.P40C, ByteAcc, NoLock, Preserve)
374 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
376 Name(_PRS, ResourceTemplate(){
377 IRQ (Level, ActiveLow, Shared)
378 {3,4,5,6,7,9,10,11,12}
380 Method (_STA, 0, NotSerialized)
383 If (And (0x80, PRQ0, Local1))
389 Method (_DIS, 0, NotSerialized)
391 Or (PRQ0, 0x80, PRQ0)
393 Method (_CRS, 0, NotSerialized)
395 Name (PRR0, ResourceTemplate ()
397 IRQ (Level, ActiveLow, Shared)
400 CreateWordField (PRR0, 0x01, TMP)
402 If (LLess (Local0, 0x80))
404 ShiftLeft (One, Local0, TMP)
412 Method (_SRS, 1, NotSerialized)
414 CreateWordField (Arg0, 0x01, TMP)
415 FindSetRightBit (TMP, Local0)
421 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
423 Name(_PRS, ResourceTemplate(){
424 IRQ (Level, ActiveLow, Shared)
425 {3,4,5,6,7,9,10,11,12}
427 Method (_STA, 0, NotSerialized)
430 If (And (0x80, PRQ1, Local1))
436 Method (_DIS, 0, NotSerialized)
438 Or (PRQ1, 0x80, PRQ1)
440 Method (_CRS, 0, NotSerialized)
442 Name (PRR0, ResourceTemplate ()
444 IRQ (Level, ActiveLow, Shared)
447 CreateWordField (PRR0, 0x01, TMP)
449 If (LLess (Local0, 0x80))
451 ShiftLeft (One, Local0, TMP)
459 Method (_SRS, 1, NotSerialized)
461 CreateWordField (Arg0, 0x01, TMP)
462 FindSetRightBit (TMP, Local0)
468 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
470 Name(_PRS, ResourceTemplate(){
471 IRQ (Level, ActiveLow, Shared)
472 {3,4,5,6,7,9,10,11,12}
474 Method (_STA, 0, NotSerialized)
477 If (And (0x80, PRQ2, Local1))
483 Method (_DIS, 0, NotSerialized)
485 Or (PRQ2, 0x80, PRQ2)
487 Method (_CRS, 0, NotSerialized)
489 Name (PRR0, ResourceTemplate ()
491 IRQ (Level, ActiveLow, Shared)
494 CreateWordField (PRR0, 0x01, TMP)
496 If (LLess (Local0, 0x80))
498 ShiftLeft (One, Local0, TMP)
506 Method (_SRS, 1, NotSerialized)
508 CreateWordField (Arg0, 0x01, TMP)
509 FindSetRightBit (TMP, Local0)
515 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
517 Name(_PRS, ResourceTemplate(){
518 IRQ (Level, ActiveLow, Shared)
519 {3,4,5,6,7,9,10,11,12}
521 Method (_STA, 0, NotSerialized)
524 If (And (0x80, PRQ3, Local1))
530 Method (_DIS, 0, NotSerialized)
532 Or (PRQ3, 0x80, PRQ3)
534 Method (_CRS, 0, NotSerialized)
536 Name (PRR0, ResourceTemplate ()
538 IRQ (Level, ActiveLow, Shared)
541 CreateWordField (PRR0, 0x01, TMP)
543 If (LLess (Local0, 0x80))
545 ShiftLeft (One, Local0, TMP)
553 Method (_SRS, 1, NotSerialized)
555 CreateWordField (Arg0, 0x01, TMP)
556 FindSetRightBit (TMP, Local0)
563 /* S5 = power off state */
564 Name (_S5, Package (4) {
565 0x00, // PM1a_CNT.SLP_TYP
566 0x00, // PM2a_CNT.SLP_TYP