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 Processor (CPU0, 0x00, 0x0000b010, 0x06) {}
31 Processor (CPU1, 0x01, 0x0000b010, 0x06) {}
32 Processor (CPU2, 0x02, 0x0000b010, 0x06) {}
33 Processor (CPU3, 0x03, 0x0000b010, 0x06) {}
34 Processor (CPU4, 0x04, 0x0000b010, 0x06) {}
35 Processor (CPU5, 0x05, 0x0000b010, 0x06) {}
36 Processor (CPU6, 0x06, 0x0000b010, 0x06) {}
37 Processor (CPU7, 0x07, 0x0000b010, 0x06) {}
38 Processor (CPU8, 0x08, 0x0000b010, 0x06) {}
39 Processor (CPU9, 0x09, 0x0000b010, 0x06) {}
40 Processor (CPUA, 0x0a, 0x0000b010, 0x06) {}
41 Processor (CPUB, 0x0b, 0x0000b010, 0x06) {}
42 Processor (CPUC, 0x0c, 0x0000b010, 0x06) {}
43 Processor (CPUD, 0x0d, 0x0000b010, 0x06) {}
44 Processor (CPUE, 0x0e, 0x0000b010, 0x06) {}
49 /* CMOS memory access */
50 OperationRegion (CMS, SystemIO, 0x70, 0x02)
51 Field (CMS, ByteAcc, NoLock, Preserve)
56 Method (CMRD, 1, NotSerialized)
64 OperationRegion (DBG, SystemIO, 0xb044, 0x04)
65 Field (DBG, DWordAcc, NoLock, Preserve)
72 /* PCI Bus definition */
75 Name (_HID, EisaId ("PNP0A03"))
78 Name(_PRT, Package() {
79 /* PCI IRQ routing table, example from ACPI 2.0a specification,
81 /* Note: we provide the same info as the PCI routing
82 table of the Bochs BIOS */
85 Package() {0x0000ffff, 0, LNKD, 0},
86 Package() {0x0000ffff, 1, LNKA, 0},
87 Package() {0x0000ffff, 2, LNKB, 0},
88 Package() {0x0000ffff, 3, LNKC, 0},
91 Package() {0x0001ffff, 0, LNKA, 0},
92 Package() {0x0001ffff, 1, LNKB, 0},
93 Package() {0x0001ffff, 2, LNKC, 0},
94 Package() {0x0001ffff, 3, LNKD, 0},
97 Package() {0x0002ffff, 0, LNKB, 0},
98 Package() {0x0002ffff, 1, LNKC, 0},
99 Package() {0x0002ffff, 2, LNKD, 0},
100 Package() {0x0002ffff, 3, LNKA, 0},
103 Package() {0x0003ffff, 0, LNKC, 0},
104 Package() {0x0003ffff, 1, LNKD, 0},
105 Package() {0x0003ffff, 2, LNKA, 0},
106 Package() {0x0003ffff, 3, LNKB, 0},
109 Package() {0x0004ffff, 0, LNKD, 0},
110 Package() {0x0004ffff, 1, LNKA, 0},
111 Package() {0x0004ffff, 2, LNKB, 0},
112 Package() {0x0004ffff, 3, LNKC, 0},
115 Package() {0x0005ffff, 0, LNKA, 0},
116 Package() {0x0005ffff, 1, LNKB, 0},
117 Package() {0x0005ffff, 2, LNKC, 0},
118 Package() {0x0005ffff, 3, LNKD, 0},
121 Method (_CRS, 0, NotSerialized)
123 Name (MEMP, ResourceTemplate ()
125 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
126 0x0000, // Address Space Granularity
127 0x0000, // Address Range Minimum
128 0x00FF, // Address Range Maximum
129 0x0000, // Address Translation Offset
130 0x0100, // Address Length
133 0x0CF8, // Address Range Minimum
134 0x0CF8, // Address Range Maximum
135 0x01, // Address Alignment
136 0x08, // Address Length
138 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
139 0x0000, // Address Space Granularity
140 0x0000, // Address Range Minimum
141 0x0CF7, // Address Range Maximum
142 0x0000, // Address Translation Offset
143 0x0CF8, // Address Length
145 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
146 0x0000, // Address Space Granularity
147 0x0D00, // Address Range Minimum
148 0xFFFF, // Address Range Maximum
149 0x0000, // Address Translation Offset
150 0xF300, // Address Length
152 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
153 0x00000000, // Address Space Granularity
154 0x000A0000, // Address Range Minimum
155 0x000BFFFF, // Address Range Maximum
156 0x00000000, // Address Translation Offset
157 0x00020000, // Address Length
158 ,, , AddressRangeMemory, TypeStatic)
159 DWordMemory (ResourceProducer, PosDecode, MinNotFixed, MaxFixed, NonCacheable, ReadWrite,
160 0x00000000, // Address Space Granularity
161 0x00000000, // Address Range Minimum
162 0xFEBFFFFF, // Address Range Maximum
163 0x00000000, // Address Translation Offset
164 0x00000000, // Address Length
165 ,, MEMF, AddressRangeMemory, TypeStatic)
167 CreateDWordField (MEMP, \_SB.PCI0._CRS.MEMF._MIN, PMIN)
168 CreateDWordField (MEMP, \_SB.PCI0._CRS.MEMF._MAX, PMAX)
169 CreateDWordField (MEMP, \_SB.PCI0._CRS.MEMF._LEN, PLEN)
170 /* compute available RAM */
171 Add(CMRD(0x34), ShiftLeft(CMRD(0x35), 8), Local0)
172 ShiftLeft(Local0, 16, Local0)
173 Add(Local0, 0x1000000, Local0)
174 /* update field of last region */
176 Subtract (PMAX, PMIN, PLEN)
185 /* PIIX3 ISA bridge */
187 Name (_ADR, 0x00010000)
189 /* PIIX PCI to ISA irq remapping */
190 OperationRegion (P40C, PCI_Config, 0x60, 0x04)
193 /* Keyboard seems to be important for WinXP install */
196 Name (_HID, EisaId ("PNP0303"))
197 Method (_STA, 0, NotSerialized)
202 Method (_CRS, 0, NotSerialized)
204 Name (TMP, ResourceTemplate ()
207 0x0060, // Address Range Minimum
208 0x0060, // Address Range Maximum
209 0x01, // Address Alignment
210 0x01, // Address Length
213 0x0064, // Address Range Minimum
214 0x0064, // Address Range Maximum
215 0x01, // Address Alignment
216 0x01, // Address Length
228 Name (_HID, EisaId ("PNP0F13"))
229 Method (_STA, 0, NotSerialized)
234 Method (_CRS, 0, NotSerialized)
236 Name (TMP, ResourceTemplate ()
244 /* PS/2 floppy controller */
247 Name (_HID, EisaId ("PNP0700"))
248 Method (_STA, 0, NotSerialized)
252 Method (_CRS, 0, NotSerialized)
254 Name (BUF0, ResourceTemplate ()
256 IO (Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
257 IO (Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
259 DMA (Compatibility, NotBusMaster, Transfer8) {2}
268 Name (_HID, EisaId ("PNP0400"))
269 Method (_STA, 0, NotSerialized)
271 Store (\_SB.PCI0.PX13.DRSA, Local0)
272 And (Local0, 0x80000000, Local0)
273 If (LEqual (Local0, 0))
282 Method (_CRS, 0, NotSerialized)
284 Name (BUF0, ResourceTemplate ()
286 IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
296 Name (_HID, EisaId ("PNP0501"))
298 Method (_STA, 0, NotSerialized)
300 Store (\_SB.PCI0.PX13.DRSC, Local0)
301 And (Local0, 0x08000000, Local0)
302 If (LEqual (Local0, 0))
311 Method (_CRS, 0, NotSerialized)
313 Name (BUF0, ResourceTemplate ()
315 IO (Decode16, 0x03F8, 0x03F8, 0x00, 0x08)
324 Name (_HID, EisaId ("PNP0501"))
326 Method (_STA, 0, NotSerialized)
328 Store (\_SB.PCI0.PX13.DRSC, Local0)
329 And (Local0, 0x80000000, Local0)
330 If (LEqual (Local0, 0))
339 Method (_CRS, 0, NotSerialized)
341 Name (BUF0, ResourceTemplate ()
343 IO (Decode16, 0x02F8, 0x02F8, 0x00, 0x08)
353 Name (_ADR, 0x00010003)
355 OperationRegion (P13C, PCI_Config, 0x5c, 0x24)
356 Field (P13C, DWordAcc, NoLock, Preserve)
373 Field (\_SB.PCI0.ISA.P40C, ByteAcc, NoLock, Preserve)
382 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
384 Name(_PRS, ResourceTemplate(){
385 Interrupt (, Level, ActiveHigh, Shared)
388 Method (_STA, 0, NotSerialized)
391 If (And (0x80, PRQ0, Local1))
397 Method (_DIS, 0, NotSerialized)
399 Or (PRQ0, 0x80, PRQ0)
401 Method (_CRS, 0, NotSerialized)
403 Name (PRR0, ResourceTemplate ()
405 Interrupt (, Level, ActiveHigh, Shared)
408 CreateDWordField (PRR0, 0x05, TMP)
410 If (LLess (Local0, 0x80))
420 Method (_SRS, 1, NotSerialized)
422 CreateDWordField (Arg0, 0x05, TMP)
427 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
429 Name(_PRS, ResourceTemplate(){
430 Interrupt (, Level, ActiveHigh, Shared)
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 Interrupt (, Level, ActiveHigh, Shared)
453 CreateDWordField (PRR0, 0x05, TMP)
455 If (LLess (Local0, 0x80))
465 Method (_SRS, 1, NotSerialized)
467 CreateDWordField (Arg0, 0x05, TMP)
472 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
474 Name(_PRS, ResourceTemplate(){
475 Interrupt (, Level, ActiveHigh, Shared)
478 Method (_STA, 0, NotSerialized)
481 If (And (0x80, PRQ2, Local1))
487 Method (_DIS, 0, NotSerialized)
489 Or (PRQ2, 0x80, PRQ2)
491 Method (_CRS, 0, NotSerialized)
493 Name (PRR0, ResourceTemplate ()
495 Interrupt (, Level, ActiveHigh, Shared)
498 CreateDWordField (PRR0, 0x05, TMP)
500 If (LLess (Local0, 0x80))
510 Method (_SRS, 1, NotSerialized)
512 CreateDWordField (Arg0, 0x05, TMP)
517 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
519 Name(_PRS, ResourceTemplate(){
520 Interrupt (, Level, ActiveHigh, Shared)
523 Method (_STA, 0, NotSerialized)
526 If (And (0x80, PRQ3, Local1))
532 Method (_DIS, 0, NotSerialized)
534 Or (PRQ3, 0x80, PRQ3)
536 Method (_CRS, 0, NotSerialized)
538 Name (PRR0, ResourceTemplate ()
540 Interrupt (, Level, ActiveHigh, Shared)
543 CreateDWordField (PRR0, 0x05, TMP)
545 If (LLess (Local0, 0x80))
555 Method (_SRS, 1, NotSerialized)
557 CreateDWordField (Arg0, 0x05, TMP)
563 /* S5 = power off state */
564 Name (_S5, Package (4) {
565 0x00, // PM1a_CNT.SLP_TYP
566 0x00, // PM2a_CNT.SLP_TYP