1 | /** @file
|
---|
2 | Contains root level name space objects for the platform
|
---|
3 |
|
---|
4 | Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
|
---|
5 | This program and the accompanying materials are
|
---|
6 | licensed and made available under the terms and conditions of the BSD License
|
---|
7 | which accompanies this distribution. The full text of the license may be found at
|
---|
8 | http://opensource.org/licenses/bsd-license.php
|
---|
9 |
|
---|
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
---|
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
---|
12 |
|
---|
13 | **/
|
---|
14 |
|
---|
15 | DefinitionBlock ("Dsdt.aml", "DSDT", 1, "INTEL ", "OVMF ", 3) {
|
---|
16 | //
|
---|
17 | // System Sleep States
|
---|
18 | //
|
---|
19 | Name (\_S0, Package () {5, 0, 0, 0})
|
---|
20 | Name (\_S4, Package () {1, 0, 0, 0})
|
---|
21 | Name (\_S5, Package () {0, 0, 0, 0})
|
---|
22 |
|
---|
23 | //
|
---|
24 | // System Bus
|
---|
25 | //
|
---|
26 | Scope (\_SB) {
|
---|
27 | //
|
---|
28 | // PCI Root Bridge
|
---|
29 | //
|
---|
30 | Device (PCI0) {
|
---|
31 | Name (_HID, EISAID ("PNP0A03"))
|
---|
32 | Name (_ADR, 0x00000000)
|
---|
33 | Name (_BBN, 0x00)
|
---|
34 | Name (_UID, 0x00)
|
---|
35 |
|
---|
36 | //
|
---|
37 | // BUS, I/O, and MMIO resources
|
---|
38 | //
|
---|
39 | Name (_CRS, ResourceTemplate () {
|
---|
40 | WORDBusNumber ( // Bus number resource (0); the bridge produces bus numbers for its subsequent buses
|
---|
41 | ResourceProducer, // bit 0 of general flags is 1
|
---|
42 | MinFixed, // Range is fixed
|
---|
43 | MaxFixed, // Range is fixed
|
---|
44 | PosDecode, // PosDecode
|
---|
45 | 0x0000, // Granularity
|
---|
46 | 0x0000, // Min
|
---|
47 | 0x00FF, // Max
|
---|
48 | 0x0000, // Translation
|
---|
49 | 0x0100 // Range Length = Max-Min+1
|
---|
50 | )
|
---|
51 |
|
---|
52 | IO (Decode16, 0xCF8, 0xCF8, 0x01, 0x08) //Consumed resource (0xCF8-0xCFF)
|
---|
53 |
|
---|
54 | WORDIO ( // Consumed-and-produced resource (all I/O below CF8)
|
---|
55 | ResourceProducer, // bit 0 of general flags is 0
|
---|
56 | MinFixed, // Range is fixed
|
---|
57 | MaxFixed, // Range is fixed
|
---|
58 | PosDecode,
|
---|
59 | EntireRange,
|
---|
60 | 0x0000, // Granularity
|
---|
61 | 0x0000, // Min
|
---|
62 | 0x0CF7, // Max
|
---|
63 | 0x0000, // Translation
|
---|
64 | 0x0CF8 // Range Length
|
---|
65 | )
|
---|
66 |
|
---|
67 | WORDIO ( // Consumed-and-produced resource (all I/O above CFF)
|
---|
68 | ResourceProducer, // bit 0 of general flags is 0
|
---|
69 | MinFixed, // Range is fixed
|
---|
70 | MaxFixed, // Range is fixed
|
---|
71 | PosDecode,
|
---|
72 | EntireRange,
|
---|
73 | 0x0000, // Granularity
|
---|
74 | 0x0D00, // Min
|
---|
75 | 0xFFFF, // Max
|
---|
76 | 0x0000, // Translation
|
---|
77 | 0xF300 // Range Length
|
---|
78 | )
|
---|
79 |
|
---|
80 | DWORDMEMORY ( // Descriptor for legacy VGA video RAM
|
---|
81 | ResourceProducer, // bit 0 of general flags is 0
|
---|
82 | PosDecode,
|
---|
83 | MinFixed, // Range is fixed
|
---|
84 | MaxFixed, // Range is Fixed
|
---|
85 | Cacheable,
|
---|
86 | ReadWrite,
|
---|
87 | 0x00000000, // Granularity
|
---|
88 | 0x000A0000, // Min
|
---|
89 | 0x000BFFFF, // Max
|
---|
90 | 0x00000000, // Translation
|
---|
91 | 0x00020000 // Range Length
|
---|
92 | )
|
---|
93 |
|
---|
94 | DWORDMEMORY ( // Descriptor for linear frame buffer video RAM
|
---|
95 | ResourceProducer, // bit 0 of general flags is 0
|
---|
96 | PosDecode,
|
---|
97 | MinFixed, // Range is fixed
|
---|
98 | MaxFixed, // Range is Fixed
|
---|
99 | Cacheable,
|
---|
100 | ReadWrite,
|
---|
101 | 0x00000000, // Granularity
|
---|
102 | 0xF8000000, // Min
|
---|
103 | 0xFFFBFFFF, // Max
|
---|
104 | 0x00000000, // Translation
|
---|
105 | 0x07FC0000 // Range Length
|
---|
106 | )
|
---|
107 | })
|
---|
108 |
|
---|
109 | //
|
---|
110 | // PCI Interrupt Routing Table - PIC Mode Only
|
---|
111 | //
|
---|
112 | Method (_PRT, 0, NotSerialized) {
|
---|
113 | Return (
|
---|
114 | Package () {
|
---|
115 | //
|
---|
116 | // Bus 0, Device 1
|
---|
117 | //
|
---|
118 | Package () {0x0001FFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00},
|
---|
119 | Package () {0x0001FFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00},
|
---|
120 | Package () {0x0001FFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00},
|
---|
121 | Package () {0x0001FFFF, 0x03, \_SB.PCI0.LPC.LNKD, 0x00},
|
---|
122 | //
|
---|
123 | // Bus 0, Device 3
|
---|
124 | //
|
---|
125 | Package () {0x0003FFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00},
|
---|
126 | Package () {0x0003FFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00},
|
---|
127 | Package () {0x0003FFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00},
|
---|
128 | Package () {0x0003FFFF, 0x03, \_SB.PCI0.LPC.LNKD, 0x00},
|
---|
129 | }
|
---|
130 | )
|
---|
131 | }
|
---|
132 |
|
---|
133 | //
|
---|
134 | // PCI to ISA Bridge (Bus 0, Device 1, Function 0)
|
---|
135 | //
|
---|
136 | Device (LPC) {
|
---|
137 | Name (_ADR, 0x00010000)
|
---|
138 |
|
---|
139 | //
|
---|
140 | // PCI Interrupt Routing Configuration Registers
|
---|
141 | //
|
---|
142 | OperationRegion (PRR0, PCI_Config, 0x60, 0x04)
|
---|
143 | Field (PRR0, ANYACC, NOLOCK, PRESERVE) {
|
---|
144 | PIRA, 8,
|
---|
145 | PIRB, 8,
|
---|
146 | PIRC, 8,
|
---|
147 | PIRD, 8
|
---|
148 | }
|
---|
149 |
|
---|
150 | //
|
---|
151 | // _STA method for LNKA, LNKB, LNKC, LNKD
|
---|
152 | //
|
---|
153 | Method (PSTA, 1, NotSerialized) {
|
---|
154 | If (And (Arg0, 0x80)) {
|
---|
155 | Return (0x9)
|
---|
156 | } Else {
|
---|
157 | Return (0xB)
|
---|
158 | }
|
---|
159 | }
|
---|
160 |
|
---|
161 | //
|
---|
162 | // _DIS method for LNKA, LNKB, LNKC, LNKD
|
---|
163 | //
|
---|
164 | Method (PDIS, 1, NotSerialized) {
|
---|
165 | Or (Arg0, 0x80, Arg0)
|
---|
166 | }
|
---|
167 |
|
---|
168 | //
|
---|
169 | // _CRS method for LNKA, LNKB, LNKC, LNKD
|
---|
170 | //
|
---|
171 | Method (PCRS, 1, NotSerialized) {
|
---|
172 | Name (BUF0, ResourceTemplate () {IRQ (Level, ActiveLow, Shared){0}})
|
---|
173 | //
|
---|
174 | // Define references to buffer elements
|
---|
175 | //
|
---|
176 | CreateWordField (BUF0, 0x01, IRQW) // IRQ low
|
---|
177 | //
|
---|
178 | // Write current settings into IRQ descriptor
|
---|
179 | //
|
---|
180 | If (And (Arg0, 0x80)) {
|
---|
181 | Store (Zero, Local0)
|
---|
182 | } Else {
|
---|
183 | Store (One, Local0)
|
---|
184 | }
|
---|
185 | //
|
---|
186 | // Shift 1 by value in register 70
|
---|
187 | //
|
---|
188 | ShiftLeft (Local0, And (Arg0, 0x0F), IRQW) // Save in buffer
|
---|
189 | Return (BUF0) // Return Buf0
|
---|
190 | }
|
---|
191 |
|
---|
192 | //
|
---|
193 | // _PRS resource for LNKA, LNKB, LNKC, LNKD
|
---|
194 | //
|
---|
195 | Name (PPRS, ResourceTemplate () {
|
---|
196 | IRQ (Level, ActiveLow, Shared) {3, 4, 5, 7, 9, 10, 11, 12, 14, 15}
|
---|
197 | })
|
---|
198 |
|
---|
199 | //
|
---|
200 | // _SRS method for LNKA, LNKB, LNKC, LNKD
|
---|
201 | //
|
---|
202 | Method (PSRS, 2, NotSerialized) {
|
---|
203 | CreateWordField (Arg1, 0x01, IRQW) // IRQ low
|
---|
204 | FindSetRightBit (IRQW, Local0) // Set IRQ
|
---|
205 | If (LNotEqual (IRQW, Zero)) {
|
---|
206 | And (Local0, 0x7F, Local0)
|
---|
207 | Decrement (Local0)
|
---|
208 | } Else {
|
---|
209 | Or (Local0, 0x80, Local0)
|
---|
210 | }
|
---|
211 | Store (Local0, Arg0)
|
---|
212 | }
|
---|
213 |
|
---|
214 | //
|
---|
215 | // PCI IRQ Link A
|
---|
216 | //
|
---|
217 | Device (LNKA) {
|
---|
218 | Name (_HID, EISAID("PNP0C0F"))
|
---|
219 | Name (_UID, 1)
|
---|
220 |
|
---|
221 | Method (_STA, 0, NotSerialized) { Return (PSTA (PIRA)) }
|
---|
222 | Method (_DIS, 0, NotSerialized) { PDIS (PIRA) }
|
---|
223 | Method (_CRS, 0, NotSerialized) { Return (PCRS (PIRA)) }
|
---|
224 | Method (_PRS, 0, NotSerialized) { Return (PPRS) }
|
---|
225 | Method (_SRS, 1, NotSerialized) { PSRS (PIRA, Arg0) }
|
---|
226 | }
|
---|
227 |
|
---|
228 | //
|
---|
229 | // PCI IRQ Link B
|
---|
230 | //
|
---|
231 | Device (LNKB) {
|
---|
232 | Name (_HID, EISAID("PNP0C0F"))
|
---|
233 | Name (_UID, 2)
|
---|
234 |
|
---|
235 | Method (_STA, 0, NotSerialized) { Return (PSTA (PIRB)) }
|
---|
236 | Method (_DIS, 0, NotSerialized) { PDIS (PIRB) }
|
---|
237 | Method (_CRS, 0, NotSerialized) { Return (PCRS (PIRB)) }
|
---|
238 | Method (_PRS, 0, NotSerialized) { Return (PPRS) }
|
---|
239 | Method (_SRS, 1, NotSerialized) { PSRS (PIRB, Arg0) }
|
---|
240 | }
|
---|
241 |
|
---|
242 | //
|
---|
243 | // PCI IRQ Link C
|
---|
244 | //
|
---|
245 | Device (LNKC) {
|
---|
246 | Name (_HID, EISAID("PNP0C0F"))
|
---|
247 | Name (_UID, 3)
|
---|
248 |
|
---|
249 | Method (_STA, 0, NotSerialized) { Return (PSTA (PIRC)) }
|
---|
250 | Method (_DIS, 0, NotSerialized) { PDIS (PIRC) }
|
---|
251 | Method (_CRS, 0, NotSerialized) { Return (PCRS (PIRC)) }
|
---|
252 | Method (_PRS, 0, NotSerialized) { Return (PPRS) }
|
---|
253 | Method (_SRS, 1, NotSerialized) { PSRS (PIRC, Arg0) }
|
---|
254 | }
|
---|
255 |
|
---|
256 | //
|
---|
257 | // PCI IRQ Link D
|
---|
258 | //
|
---|
259 | Device (LNKD) {
|
---|
260 | Name (_HID, EISAID("PNP0C0F"))
|
---|
261 | Name (_UID, 1)
|
---|
262 |
|
---|
263 | Method (_STA, 0, NotSerialized) { Return (PSTA (PIRD)) }
|
---|
264 | Method (_DIS, 0, NotSerialized) { PDIS (PIRD) }
|
---|
265 | Method (_CRS, 0, NotSerialized) { Return (PCRS (PIRD)) }
|
---|
266 | Method (_PRS, 0, NotSerialized) { Return (PPRS) }
|
---|
267 | Method (_SRS, 1, NotSerialized) { PSRS (PIRD, Arg0) }
|
---|
268 | }
|
---|
269 |
|
---|
270 | //
|
---|
271 | // Programmable Interrupt Controller (PIC)
|
---|
272 | //
|
---|
273 | Device(PIC) {
|
---|
274 | Name (_HID, EISAID ("PNP0000"))
|
---|
275 | Name (_CRS, ResourceTemplate () {
|
---|
276 | IO (Decode16, 0x020, 0x020, 0x00, 0x02)
|
---|
277 | IO (Decode16, 0x0A0, 0x0A0, 0x00, 0x02)
|
---|
278 | IO (Decode16, 0x4D0, 0x4D0, 0x00, 0x02)
|
---|
279 | IRQNoFlags () {2}
|
---|
280 | })
|
---|
281 | }
|
---|
282 |
|
---|
283 | //
|
---|
284 | // ISA DMA
|
---|
285 | //
|
---|
286 | Device (DMAC) {
|
---|
287 | Name (_HID, EISAID ("PNP0200"))
|
---|
288 | Name (_CRS, ResourceTemplate () {
|
---|
289 | IO (Decode16, 0x00, 0x00, 0, 0x10)
|
---|
290 | IO (Decode16, 0x81, 0x81, 0, 0x03)
|
---|
291 | IO (Decode16, 0x87, 0x87, 0, 0x01)
|
---|
292 | IO (Decode16, 0x89, 0x89, 0, 0x03)
|
---|
293 | IO (Decode16, 0x8f, 0x8f, 0, 0x01)
|
---|
294 | IO (Decode16, 0xc0, 0xc0, 0, 0x20)
|
---|
295 | DMA (Compatibility, NotBusMaster, Transfer8) {4}
|
---|
296 | })
|
---|
297 | }
|
---|
298 |
|
---|
299 | //
|
---|
300 | // 8254 Timer
|
---|
301 | //
|
---|
302 | Device(TMR) {
|
---|
303 | Name(_HID,EISAID("PNP0100"))
|
---|
304 | Name(_CRS, ResourceTemplate () {
|
---|
305 | IO (Decode16, 0x40, 0x40, 0x00, 0x04)
|
---|
306 | IRQNoFlags () {0}
|
---|
307 | })
|
---|
308 | }
|
---|
309 |
|
---|
310 | //
|
---|
311 | // Real Time Clock
|
---|
312 | //
|
---|
313 | Device (RTC) {
|
---|
314 | Name (_HID, EISAID ("PNP0B00"))
|
---|
315 | Name (_CRS, ResourceTemplate () {
|
---|
316 | IO (Decode16, 0x70, 0x70, 0x00, 0x02)
|
---|
317 | IRQNoFlags () {8}
|
---|
318 | })
|
---|
319 | }
|
---|
320 |
|
---|
321 | //
|
---|
322 | // PCAT Speaker
|
---|
323 | //
|
---|
324 | Device(SPKR) {
|
---|
325 | Name (_HID, EISAID("PNP0800"))
|
---|
326 | Name (_CRS, ResourceTemplate () {
|
---|
327 | IO (Decode16, 0x61, 0x61, 0x01, 0x01)
|
---|
328 | })
|
---|
329 | }
|
---|
330 |
|
---|
331 | //
|
---|
332 | // Floating Point Coprocessor
|
---|
333 | //
|
---|
334 | Device(FPU) {
|
---|
335 | Name (_HID, EISAID("PNP0C04"))
|
---|
336 | Name (_CRS, ResourceTemplate () {
|
---|
337 | IO (Decode16, 0xF0, 0xF0, 0x00, 0x10)
|
---|
338 | IRQNoFlags () {13}
|
---|
339 | })
|
---|
340 | }
|
---|
341 |
|
---|
342 | //
|
---|
343 | // Generic motherboard devices and pieces that don't fit anywhere else
|
---|
344 | //
|
---|
345 | Device(XTRA) {
|
---|
346 | Name (_HID, EISAID ("PNP0C02"))
|
---|
347 | Name (_UID, 0x01)
|
---|
348 | Name (_CRS, ResourceTemplate () {
|
---|
349 | IO (Decode16, 0x010, 0x010, 0x00, 0x10)
|
---|
350 | IO (Decode16, 0x022, 0x022, 0x00, 0x1E)
|
---|
351 | IO (Decode16, 0x044, 0x044, 0x00, 0x1C)
|
---|
352 | IO (Decode16, 0x062, 0x062, 0x00, 0x02)
|
---|
353 | IO (Decode16, 0x065, 0x065, 0x00, 0x0B)
|
---|
354 | IO (Decode16, 0x072, 0x072, 0x00, 0x0E)
|
---|
355 | IO (Decode16, 0x080, 0x080, 0x00, 0x01)
|
---|
356 | IO (Decode16, 0x084, 0x084, 0x00, 0x03)
|
---|
357 | IO (Decode16, 0x088, 0x088, 0x00, 0x01)
|
---|
358 | IO (Decode16, 0x08c, 0x08c, 0x00, 0x03)
|
---|
359 | IO (Decode16, 0x090, 0x090, 0x00, 0x10)
|
---|
360 | IO (Decode16, 0x0A2, 0x0A2, 0x00, 0x1E)
|
---|
361 | IO (Decode16, 0x0E0, 0x0E0, 0x00, 0x10)
|
---|
362 | IO (Decode16, 0x1E0, 0x1E0, 0x00, 0x10)
|
---|
363 | IO (Decode16, 0x160, 0x160, 0x00, 0x10)
|
---|
364 | IO (Decode16, 0x278, 0x278, 0x00, 0x08)
|
---|
365 | IO (Decode16, 0x370, 0x370, 0x00, 0x02)
|
---|
366 | IO (Decode16, 0x378, 0x378, 0x00, 0x08)
|
---|
367 | IO (Decode16, 0x400, 0x400, 0x00, 0x40) // PMBLK1
|
---|
368 | IO (Decode16, 0x440, 0x440, 0x00, 0x10)
|
---|
369 | IO (Decode16, 0x678, 0x678, 0x00, 0x08)
|
---|
370 | IO (Decode16, 0x778, 0x778, 0x00, 0x08)
|
---|
371 | Memory32Fixed (ReadOnly, 0xFEC00000, 0x1000) // IO APIC
|
---|
372 | Memory32Fixed (ReadOnly, 0xFEE00000, 0x1000)
|
---|
373 | })
|
---|
374 | }
|
---|
375 |
|
---|
376 | //
|
---|
377 | // PS/2 Keyboard and PC/AT Enhanced Keyboard 101/102
|
---|
378 | //
|
---|
379 | Device (PS2K) {
|
---|
380 | Name (_HID, EISAID ("PNP0303"))
|
---|
381 | Name (_CID, EISAID ("PNP030B"))
|
---|
382 | Name(_CRS,ResourceTemplate() {
|
---|
383 | IO (Decode16, 0x60, 0x60, 0x00, 0x01)
|
---|
384 | IO (Decode16, 0x64, 0x64, 0x00, 0x01)
|
---|
385 | IRQNoFlags () {1}
|
---|
386 | })
|
---|
387 | }
|
---|
388 |
|
---|
389 | //
|
---|
390 | // PS/2 Mouse and Microsoft Mouse
|
---|
391 | //
|
---|
392 | Device (PS2M) { // PS/2 stype mouse port
|
---|
393 | Name (_HID, EISAID ("PNP0F03"))
|
---|
394 | Name (_CID, EISAID ("PNP0F13"))
|
---|
395 | Name (_CRS, ResourceTemplate() {
|
---|
396 | IRQNoFlags () {12}
|
---|
397 | })
|
---|
398 | }
|
---|
399 |
|
---|
400 | //
|
---|
401 | // UART Serial Port - COM1
|
---|
402 | //
|
---|
403 | Device (UAR1) {
|
---|
404 | Name (_HID, EISAID ("PNP0501"))
|
---|
405 | Name (_DDN, "COM1")
|
---|
406 | Name (_UID, 0x01)
|
---|
407 | Name(_CRS,ResourceTemplate() {
|
---|
408 | IO (Decode16, 0x3F8, 0x3F8, 0x01, 0x08)
|
---|
409 | IRQ (Edge, ActiveHigh, Exclusive, ) {4}
|
---|
410 | })
|
---|
411 | }
|
---|
412 |
|
---|
413 | //
|
---|
414 | // UART Serial Port - COM2
|
---|
415 | //
|
---|
416 | Device (UAR2) {
|
---|
417 | Name (_HID, EISAID ("PNP0501"))
|
---|
418 | Name (_DDN, "COM2")
|
---|
419 | Name (_UID, 0x02)
|
---|
420 | Name(_CRS,ResourceTemplate() {
|
---|
421 | IO (Decode16, 0x2F8, 0x2F8, 0x01, 0x08)
|
---|
422 | IRQ (Edge, ActiveHigh, Exclusive, ) {3}
|
---|
423 | })
|
---|
424 | }
|
---|
425 |
|
---|
426 | //
|
---|
427 | // Floppy Disk Controller
|
---|
428 | //
|
---|
429 | Device (FDC) {
|
---|
430 | Name (_HID, EISAID ("PNP0700"))
|
---|
431 | Name (_CRS,ResourceTemplate() {
|
---|
432 | IO (Decode16, 0x3F0, 0x3F0, 0x01, 0x06)
|
---|
433 | IO (Decode16, 0x3F7, 0x3F7, 0x01, 0x01)
|
---|
434 | IRQNoFlags () {6}
|
---|
435 | DMA (Compatibility, NotBusMaster, Transfer8) {2}
|
---|
436 | })
|
---|
437 | }
|
---|
438 | }
|
---|
439 | }
|
---|
440 | }
|
---|
441 | }
|
---|
442 |
|
---|