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