direct-io.hg

view tools/firmware/acpi/acpi_dsdt.asl @ 10942:c908f4c9150d

[hvm firmware] Update hvm acpi dsdt table.
1)Code style clean up
2)Mininor fix for pci bus 0, dev 4 apic IRQ number
3)Add support for HCT "unreported IO and Memory" test by reporting low
640 MB mem as motherboard resource

Signed-off-by: Winston Wang <winston.l.wang@intel.com>
author chris@kneesaa.uk.xensource.com
date Fri Aug 04 11:03:17 2006 +0100 (2006-08-04)
parents e1c8212d78c3
children 54a905c6c84d
line source
1 //**********************************************************************//
2 //*
3 //* Copyright (c) 2004, Intel Corporation.
4 //*
5 //* This program is free software; you can redistribute it and/or modify it
6 //* under the terms and conditions of the GNU General Public License,
7 //* version 2, as published by the Free Software Foundation.
8 //*
9 //* This program is distributed in the hope it will be useful, but WITHOUT
10 //* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 //* more details.
13 //*
14 //* You should have received a copy of the GNU General Public License along with
15 //* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16 //* Place - Suite 330, Boston, MA 02111-1307 USA.
18 //**
19 //** DSDT for Xen with Qemu device model
20 //**
21 //**
23 DefinitionBlock ("DSDT.aml", "DSDT", 1, "INTEL","int-xen", 2006)
24 {
25 Name (\PMBS, 0x0C00)
26 Name (\PMLN, 0x08)
27 Name (\IOB1, 0x00)
28 Name (\IOL1, 0x00)
29 Name (\APCB, 0xFEC00000)
30 Name (\APCL, 0x00010000)
31 Name (\PUID, 0x00)
33 Scope (\_PR)
34 {
35 Processor (CPU0, 0x00, 0x00000000, 0x00) {}
36 Processor (CPU1, 0x01, 0x00000000, 0x00) {}
37 Processor (CPU2, 0x02, 0x00000000, 0x00) {}
38 Processor (CPU3, 0x03, 0x00000000, 0x00) {}
40 }
42 /* Poweroff support - ties in with qemu emulation */
44 Name (\_S5, Package (0x04)
45 {
46 0x07,
47 0x07,
48 0x00,
49 0x00
50 })
53 Name(PICD, 0)
55 Method(_PIC, 1) {
57 Store(Arg0, PICD)
58 }
59 Scope (\_SB)
60 {
61 /* Fix HCT test for 0x400 pci memory - need to report low 640 MB mem as motherboard resource */
63 Device(MEM0) {
64 Name(_HID, EISAID("PNP0C02"))
65 Name(_CRS, ResourceTemplate() {
66 QWordMemory (ResourceConsumer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
67 0x00000000,
68 0x00000000,
69 0x0009ffff,
70 0x00000000,
71 0x000a0000)
72 }
73 )
74 }
76 Device (PCI0)
77 {
78 Name (_HID, EisaId ("PNP0A03"))
79 Name (_UID, 0x00)
80 Name (_ADR, 0x00)
81 Name (_BBN, 0x00)
82 OperationRegion (PIRP, PCI_Config, 0x3c, 0x10)
83 Field(PIRP, ByteAcc, NoLock, Preserve){
84 IRQ3,3,
85 IRQ5,5,
86 IRQ7,7,
87 IRQ9,9,
88 IRQA,10,
89 IRQB,11
90 }
92 Method (_CRS, 0, NotSerialized)
93 {
95 Name (PRT0, ResourceTemplate ()
96 {
97 /* bus number is from 0 - 255*/
98 WordBusNumber (ResourceConsumer, MinFixed, MaxFixed, SubDecode,
99 0x0000,
100 0x0000,
101 0x00FF,
102 0x0000,
103 0x0100)
104 IO (Decode16, 0x0CF8, 0x0CF8, 0x01, 0x08)
105 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
106 0x0000,
107 0x0000,
108 0x0CF7,
109 0x0000,
110 0x0CF8)
111 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
112 0x0000,
113 0x0D00,
114 0x0FFF,
115 0x0000,
116 0x0300)
118 /* reserve what device model consumed for IDE and acpi pci device */
119 WordIO (ResourceConsumer, MinFixed, MaxFixed, PosDecode, EntireRange,
120 0x0000,
121 0xc000,
122 0xc01f,
123 0x0000,
124 0x0020)
125 /* reserve what device model consumed for Ethernet controller pci device */
126 WordIO (ResourceConsumer, MinFixed, MaxFixed, PosDecode, EntireRange,
127 0x0000,
128 0xc020,
129 0xc03f,
130 0x0000,
131 0x0010)
133 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadOnly,
134 0x00000000,
135 0x000c0000,
136 0x000FFFFF,
137 0x00000000,
138 0x00030000)
140 /* reserve what device model consumed for PCI VGA device */
142 DWordMemory (ResourceConsumer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
143 0x00000000,
144 0xF0000000,
145 0xF1FFFFFF,
146 0x00000000,
147 0x02000000)
148 DWordMemory (ResourceConsumer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
149 0x00000000,
150 0xF2000000,
151 0xF2000FFF,
152 0x00000000,
153 0x00001000)
154 /* reserve what device model consumed for Ethernet controller pci device */
155 DWordMemory (ResourceConsumer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
156 0x00000000,
157 0xF2001000,
158 0xF200101F,
159 0x00000000,
160 0x00000020)
161 })
162 Return (PRT0)
163 }
164 Name(BUFA, ResourceTemplate() {
165 IRQ(Level, ActiveLow, Shared) {
166 3,4,5,6,7,10,11,12,14,15}
167 })
169 Name(BUFB, Buffer(){
170 0x23, 0x00, 0x00, 0x18,
171 0x79, 0})
173 CreateWordField(BUFB, 0x01, IRQV)
175 Name(BUFC, Buffer(){
176 5, 7, 10, 11
177 })
179 CreateByteField(BUFC, 0x01, PIQA)
180 CreateByteField(BUFC, 0x01, PIQB)
181 CreateByteField(BUFC, 0x01, PIQC)
182 CreateByteField(BUFC, 0x01, PIQD)
184 Device(LNKA) {
185 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
186 Name(_UID, 1)
187 Method(_STA, 0) {
188 And(PIRA, 0x80, Local0)
189 If(LEqual(Local0, 0x80)) {
190 Return(0x09)
191 }
192 Else {
193 Return(0x0B)
194 }
195 }
197 Method(_PRS) {
199 Return(BUFA)
200 } // Method(_PRS)
202 Method(_DIS) {
203 Or(PIRA, 0x80, PIRA)
204 }
206 Method(_CRS) {
207 And(PIRB, 0x0f, Local0)
208 ShiftLeft(0x1, Local0, IRQV)
209 Return(BUFB)
210 }
212 Method(_SRS, 1) {
213 CreateWordField(ARG0, 0x01, IRQ1)
214 FindSetRightBit(IRQ1, Local0)
215 Decrement(Local0)
216 Store(Local0, PIRA)
217 } // Method(_SRS)
218 }
220 Device(LNKB){
221 Name(_HID, EISAID("PNP0C0F"))
222 Name(_UID, 2)
223 Method(_STA, 0) {
224 And(PIRB, 0x80, Local0)
225 If(LEqual(Local0, 0x80)) {
226 Return(0x09)
227 }
228 Else {
229 Return(0x0B)
230 }
231 }
233 Method(_PRS) {
234 Return(BUFA)
235 } // Method(_PRS)
237 Method(_DIS) {
239 Or(PIRB, 0x80, PIRB)
240 }
242 Method(_CRS) {
243 And(PIRB, 0x0f, Local0)
244 ShiftLeft(0x1, Local0, IRQV)
245 Return(BUFB)
246 } // Method(_CRS)
248 Method(_SRS, 1) {
249 CreateWordField(ARG0, 0x01, IRQ1)
250 FindSetRightBit(IRQ1, Local0)
251 Decrement(Local0)
252 Store(Local0, PIRB)
253 } // Method(_SRS)
254 }
256 Device(LNKC){
257 Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
258 Name(_UID, 3)
259 Method(_STA, 0) {
260 And(PIRC, 0x80, Local0)
261 If(LEqual(Local0, 0x80)) {
262 Return(0x09)
263 }
264 Else {
265 Return(0x0B)
266 }
267 }
269 Method(_PRS) {
270 Return(BUFA)
271 } // Method(_PRS)
273 Method(_DIS) {
275 Or(PIRC, 0x80, PIRC)
276 }
278 Method(_CRS) {
279 And(PIRC, 0x0f, Local0)
280 ShiftLeft(0x1, Local0, IRQV)
281 Return(BUFB)
282 } // Method(_CRS)
284 Method(_SRS, 1) {
285 CreateWordField(ARG0, 0x01, IRQ1)
286 FindSetRightBit(IRQ1, Local0)
287 Decrement(Local0)
288 Store(Local0, PIRC)
289 } // Method(_SRS)
290 }
292 Device(LNKD) {
293 Name(_HID, EISAID("PNP0C0F"))
294 Name(_UID, 4)
295 Method(_STA, 0) {
296 And(PIRD, 0x80, Local0)
297 If(LEqual(Local0, 0x80)) {
298 Return(0x09)
299 }
300 Else {
301 Return(0x0B)
302 }
303 }
305 Method(_PRS) {
306 Return(BUFA)
307 } // Method(_PRS)
309 Method(_DIS) {
310 Or(PIRD, 0x80, PIRD)
311 }
313 Method(_CRS) {
314 And(PIRD, 0x0f, Local0)
315 ShiftLeft(0x1, Local0, IRQV)
316 Return(BUFB)
317 } // Method(_CRS)
319 Method(_SRS, 1) {
320 CreateWordField(ARG0, 0x01, IRQ1)
321 FindSetRightBit(IRQ1, Local0)
322 Decrement(Local0)
323 Store(Local0, PIRD)
324 } // Method(_SRS)
325 }
326 Method(_PRT,0) {
327 If(PICD) {Return(PRTA)}
328 Return (PRTP)
329 } // end _PRT
331 Name(PRTP, Package(){
332 Package(){0x0000ffff, 0, \_SB.PCI0.LNKA, 0}, // Slot 1, INTA
333 Package(){0x0000ffff, 1, \_SB.PCI0.LNKB, 0}, // Slot 1, INTB
334 Package(){0x0000ffff, 2, \_SB.PCI0.LNKC, 0}, // Slot 1, INTC
335 Package(){0x0000ffff, 3, \_SB.PCI0.LNKD, 0}, // Slot 1, INTD
337 Package(){0x0001ffff, 0, \_SB.PCI0.LNKB, 0}, // Slot 2, INTB
338 Package(){0x0001ffff, 1, \_SB.PCI0.LNKC, 0}, // Slot 2, INTC
339 Package(){0x0001ffff, 2, \_SB.PCI0.LNKD, 0}, // Slot 2, INTD
340 Package(){0x0001ffff, 3, \_SB.PCI0.LNKA, 0}, // Slot 2, INTA
342 Package(){0x0002ffff, 0, \_SB.PCI0.LNKC, 0}, // Slot 3, INTC
343 Package(){0x0002ffff, 1, \_SB.PCI0.LNKD, 0}, // Slot 3, INTD
344 Package(){0x0002ffff, 2, \_SB.PCI0.LNKA, 0}, // Slot 3, INTA
345 Package(){0x0002ffff, 3, \_SB.PCI0.LNKB, 0}, // Slot 3, INTB
347 Package(){0x0003ffff, 0, \_SB.PCI0.LNKD, 0}, // Slot 2, INTD
348 Package(){0x0003ffff, 1, \_SB.PCI0.LNKA, 0}, // Slot 2, INTA
349 Package(){0x0003ffff, 2, \_SB.PCI0.LNKB, 0}, // Slot 2, INTB
350 Package(){0x0003ffff, 3, \_SB.PCI0.LNKC, 0}, // Slot 2, INTC
352 }
353 )
354 Name(PRTA, Package(){
355 Package(){0x0001ffff, 0, 0, 5}, // Device 1, INTA
357 Package(){0x0002ffff, 0, 0, 7}, // Device 2, INTA
359 Package(){0x0003ffff, 0, 0, 10}, // Device 3, INTA
361 Package(){0x0004ffff, 0, 0, 11}, // Device 4, INTA
363 }
364 )
366 Device (ISA)
367 {
368 Name (_ADR, 0x00000000) /* device id, PCI bus num, ... */
370 OperationRegion(PIRQ, PCI_Config, 0x60, 0x4)
371 Scope(\) {
372 Field (\_SB.PCI0.ISA.PIRQ, ByteAcc, NoLock, Preserve) {
373 PIRA, 8,
374 PIRB, 8,
375 PIRC, 8,
376 PIRD, 8
377 }
378 }
379 Device (SYSR)
380 {
381 Name (_HID, EisaId ("PNP0C02"))
382 Name (_UID, 0x01)
383 Name (CRS, ResourceTemplate ()
384 {
385 /* TODO: list hidden resources */
386 IO (Decode16, 0x0010, 0x0010, 0x00, 0x10)
387 IO (Decode16, 0x0022, 0x0022, 0x00, 0x0C)
388 IO (Decode16, 0x0030, 0x0030, 0x00, 0x10)
389 IO (Decode16, 0x0044, 0x0044, 0x00, 0x1C)
390 IO (Decode16, 0x0062, 0x0062, 0x00, 0x02)
391 IO (Decode16, 0x0065, 0x0065, 0x00, 0x0B)
392 IO (Decode16, 0x0072, 0x0072, 0x00, 0x0E)
393 IO (Decode16, 0x0080, 0x0080, 0x00, 0x01)
394 IO (Decode16, 0x0084, 0x0084, 0x00, 0x03)
395 IO (Decode16, 0x0088, 0x0088, 0x00, 0x01)
396 IO (Decode16, 0x008C, 0x008C, 0x00, 0x03)
397 IO (Decode16, 0x0090, 0x0090, 0x00, 0x10)
398 IO (Decode16, 0x00A2, 0x00A2, 0x00, 0x1C)
399 IO (Decode16, 0x00E0, 0x00E0, 0x00, 0x10)
400 IO (Decode16, 0x08A0, 0x08A0, 0x00, 0x04)
401 IO (Decode16, 0x0CC0, 0x0CC0, 0x00, 0x10)
402 IO (Decode16, 0x04D0, 0x04D0, 0x00, 0x02)
403 })
404 Method (_CRS, 0, NotSerialized)
405 {
406 Return (CRS)
407 }
408 }
410 Device (PIC)
411 {
412 Name (_HID, EisaId ("PNP0000"))
413 Name (_CRS, ResourceTemplate ()
414 {
415 IO (Decode16, 0x0020, 0x0020, 0x01, 0x02)
416 IO (Decode16, 0x00A0, 0x00A0, 0x01, 0x02)
417 IRQNoFlags () {2}
418 })
419 }
421 Device (DMA0)
422 {
423 Name (_HID, EisaId ("PNP0200"))
424 Name (_CRS, ResourceTemplate ()
425 {
426 DMA (Compatibility, BusMaster, Transfer8) {4}
427 IO (Decode16, 0x0000, 0x0000, 0x00, 0x10)
428 IO (Decode16, 0x0081, 0x0081, 0x00, 0x03)
429 IO (Decode16, 0x0087, 0x0087, 0x00, 0x01)
430 IO (Decode16, 0x0089, 0x0089, 0x00, 0x03)
431 IO (Decode16, 0x008F, 0x008F, 0x00, 0x01)
432 IO (Decode16, 0x00C0, 0x00C0, 0x00, 0x20)
433 IO (Decode16, 0x0480, 0x0480, 0x00, 0x10)
434 })
435 }
437 Device (TMR)
438 {
439 Name (_HID, EisaId ("PNP0100"))
440 Name (_CRS, ResourceTemplate ()
441 {
442 IO (Decode16, 0x0040, 0x0040, 0x00, 0x04)
443 IRQNoFlags () {0}
444 })
445 }
447 Device (RTC)
448 {
449 Name (_HID, EisaId ("PNP0B00"))
450 Name (_CRS, ResourceTemplate ()
451 {
452 IO (Decode16, 0x0070, 0x0070, 0x00, 0x02)
453 IRQNoFlags () {8}
454 })
455 }
457 Device (SPKR)
458 {
459 Name (_HID, EisaId ("PNP0800"))
460 Name (_CRS, ResourceTemplate ()
461 {
462 IO (Decode16, 0x0061, 0x0061, 0x00, 0x01)
463 })
464 }
466 Device (PS2M)
467 {
468 Name (_HID, EisaId ("PNP0F13"))
469 Name (_CID, 0x130FD041)
470 Method (_STA, 0, NotSerialized)
471 {
472 Return (0x0F)
473 }
475 Name (_CRS, ResourceTemplate ()
476 {
477 IRQNoFlags () {12}
478 })
479 }
481 Device (PS2K)
482 {
483 Name (_HID, EisaId ("PNP0303"))
484 Name (_CID, 0x0B03D041)
485 Method (_STA, 0, NotSerialized)
486 {
487 Return (0x0F)
488 }
490 Name (_CRS, ResourceTemplate ()
491 {
492 IO (Decode16, 0x0060, 0x0060, 0x00, 0x01)
493 IO (Decode16, 0x0064, 0x0064, 0x00, 0x01)
494 IRQNoFlags () {1}
495 })
496 }
498 Device (FDC0)
499 {
500 Name (_HID, EisaId ("PNP0700"))
501 Method (_STA, 0, NotSerialized)
502 {
503 Return (0x0F)
504 }
506 Name (_CRS, ResourceTemplate ()
507 {
508 IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
509 IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
510 IRQNoFlags () {6}
511 DMA (Compatibility, NotBusMaster, Transfer8) {2}
512 })
513 }
515 Device (UAR1)
516 {
517 Name (_HID, EisaId ("PNP0501"))
518 Name (_UID, 0x01)
519 Method (_STA, 0, NotSerialized)
520 {
521 Return (0x0F)
522 }
524 Name (_CRS, ResourceTemplate()
525 {
526 IO (Decode16, 0x03F8, 0x03F8, 0x01, 0x08)
527 IRQNoFlags () {4}
528 })
529 }
531 Device (UAR2)
532 {
533 Name (_HID, EisaId ("PNP0501"))
534 Name (_UID, 0x02)
535 Method (_STA, 0, NotSerialized)
536 {
537 Return (0x0F)
538 }
540 Name (_CRS, ResourceTemplate()
541 {
542 IO (Decode16, 0x02F8, 0x02F8, 0x01, 0x08)
543 IRQNoFlags () {3}
544 })
545 }
546 }
547 }
548 }
549 }