]>
Commit | Line | Data |
---|---|---|
3cbfba02 DW |
1 | /**************************************************************************;\r |
2 | ;* *;\r | |
3 | ;* *;\r | |
4 | ;* Intel Corporation - ACPI Reference Code for the Baytrail *;\r | |
5 | ;* Family of Customer Reference Boards. *;\r | |
6 | ;* *;\r | |
7 | ;* *;\r | |
8 | ;* Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved *;\r | |
9 | ;\r | |
10 | ; This program and the accompanying materials are licensed and made available under\r | |
11 | ; the terms and conditions of the BSD License that accompanies this distribution.\r | |
12 | ; The full text of the license may be found at\r | |
13 | ; http://opensource.org/licenses/bsd-license.php.\r | |
14 | ;\r | |
15 | ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
16 | ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
17 | ;\r | |
18 | ;* *;\r | |
19 | ;* *;\r | |
20 | ;**************************************************************************/\r | |
21 | \r | |
22 | \r | |
23 | \r | |
24 | // Use this information when determining the Possible IRQs that can be\r | |
25 | // used in a given system.\r | |
26 | //\r | |
27 | // The following IRQs are always in use by legacy devices:\r | |
28 | // 0 = System Timer\r | |
29 | // 2 = 8259 PIC\r | |
30 | // 8 = RTC\r | |
31 | // 9 = SCI Interrupt (It may be used, we choose not to)\r | |
32 | // 13 = Co-processor Error\r | |
33 | //\r | |
34 | // The following may be in use by legacy devices:\r | |
35 | // 1 = If using PS/2 Keyboard\r | |
36 | // 3 = If COMx Port Enabled and IRQ = 3\r | |
37 | // 4 = If COMx Port Enabled and IRQ = 4\r | |
38 | // 5 = If LPT Port Enabled and IRQ = 5\r | |
39 | // 6 = If FDC Enabled\r | |
40 | // 7 = If LPT Port Enabled and IRQ = 7\r | |
41 | // 12 = If using PS/2 Mouse\r | |
42 | // 14 = Primary IDE (If populated and in Compatibility Mode)\r | |
43 | // 15 = Secondary IDE (If populated and in Compatibility Mode)\r | |
44 | //\r | |
45 | // The following will never be in use by legacy devices:\r | |
46 | // 10 = Assign to PARC, PCRC, PERC, PGRC\r | |
47 | // 11 = Assign to PBRC, PDRC, PFRC, PHRC\r | |
48 | \r | |
49 | Device(LNKA) // PARC Routing Resource\r | |
50 | {\r | |
51 | Name(_HID,EISAID("PNP0C0F")) // PCI Interrupt Link Device\r | |
52 | \r | |
53 | Name(_UID,1) // Unique to other Link Devices\r | |
54 | \r | |
55 | // Disable the PCI IRQ.\r | |
56 | \r | |
57 | Method(_DIS,0,Serialized)\r | |
58 | {\r | |
59 | Or(PARC,0x80,PARC)\r | |
60 | }\r | |
61 | \r | |
62 | // Possible IRQ Resource Setting.\r | |
63 | \r | |
64 | Method (_PRS, 0, Serialized)\r | |
65 | {\r | |
66 | return (PRSA)\r | |
67 | }\r | |
68 | \r | |
69 | // Current IRQ Resource Setting.\r | |
70 | \r | |
71 | Method(_CRS,0,Serialized)\r | |
72 | {\r | |
73 | Name(RTLA,ResourceTemplate()\r | |
74 | {\r | |
75 | IRQ(Level,ActiveLow,Shared) {}\r | |
76 | })\r | |
77 | \r | |
78 | // Point to specific byte.\r | |
79 | \r | |
80 | CreateWordField(RTLA,1,IRQ0)\r | |
81 | \r | |
82 | // Zero out IRQ mask bits 0-15\r | |
83 | \r | |
84 | Store(Zero,IRQ0)\r | |
85 | \r | |
86 | ShiftLeft(1,And(PARC,0x0F),IRQ0)\r | |
87 | \r | |
88 | Return(RTLA)\r | |
89 | }\r | |
90 | \r | |
91 | // Set IRQ Resource Setting.\r | |
92 | \r | |
93 | Method(_SRS,1,Serialized)\r | |
94 | {\r | |
95 | // Point to the specific byte passed in\r | |
96 | \r | |
97 | CreateWordField(Arg0,1,IRQ0)\r | |
98 | \r | |
99 | // Determine the IRQ bit to set and store it\r | |
100 | \r | |
101 | FindSetRightBit(IRQ0,Local0)\r | |
102 | Decrement(Local0)\r | |
103 | Store(Local0,PARC)\r | |
104 | }\r | |
105 | \r | |
106 | // PCI IRQ Status.\r | |
107 | \r | |
108 | Method(_STA,0,Serialized)\r | |
109 | {\r | |
110 | If(And(PARC,0x80))\r | |
111 | {\r | |
112 | Return(0x0009)\r | |
113 | }\r | |
114 | Else\r | |
115 | {\r | |
116 | Return(0x000B)\r | |
117 | }\r | |
118 | }\r | |
119 | }\r | |
120 | \r | |
121 | Device(LNKB) // PBRC Routing Resource\r | |
122 | {\r | |
123 | Name(_HID,EISAID("PNP0C0F"))\r | |
124 | \r | |
125 | Name(_UID,2)\r | |
126 | \r | |
127 | // Disable the PCI IRQ.\r | |
128 | \r | |
129 | Method(_DIS,0,Serialized)\r | |
130 | {\r | |
131 | Or(PBRC,0x80,PBRC)\r | |
132 | }\r | |
133 | \r | |
134 | // Possible IRQ Resource Setting.\r | |
135 | \r | |
136 | Method (_PRS, 0, Serialized)\r | |
137 | {\r | |
138 | return (PRSB)\r | |
139 | }\r | |
140 | \r | |
141 | // Current IRQ Resource Setting.\r | |
142 | \r | |
143 | Method(_CRS,0,Serialized)\r | |
144 | {\r | |
145 | Name(RTLB,ResourceTemplate()\r | |
146 | {\r | |
147 | IRQ(Level,ActiveLow,Shared) {}\r | |
148 | })\r | |
149 | \r | |
150 | // Point to specific byte.\r | |
151 | \r | |
152 | CreateWordField(RTLB,1,IRQ0)\r | |
153 | \r | |
154 | // Zero out IRQ mask bits 0-15\r | |
155 | \r | |
156 | Store(Zero,IRQ0)\r | |
157 | \r | |
158 | ShiftLeft(1,And(PBRC,0x0F),IRQ0)\r | |
159 | \r | |
160 | Return(RTLB)\r | |
161 | }\r | |
162 | \r | |
163 | // Set IRQ Resource Setting.\r | |
164 | \r | |
165 | Method(_SRS,1,Serialized)\r | |
166 | {\r | |
167 | // Point to the specific byte passed in.\r | |
168 | \r | |
169 | CreateWordField(Arg0,1,IRQ0)\r | |
170 | \r | |
171 | // Determine the IRQ bit to set and store it,\r | |
172 | \r | |
173 | FindSetRightBit(IRQ0,Local0)\r | |
174 | Decrement(Local0)\r | |
175 | Store(Local0,PBRC)\r | |
176 | }\r | |
177 | \r | |
178 | // PCI IRQ Status.\r | |
179 | \r | |
180 | Method(_STA,0,Serialized)\r | |
181 | {\r | |
182 | If(And(PBRC,0x80))\r | |
183 | {\r | |
184 | Return(0x0009)\r | |
185 | }\r | |
186 | Else\r | |
187 | {\r | |
188 | Return(0x000B)\r | |
189 | }\r | |
190 | }\r | |
191 | }\r | |
192 | \r | |
193 | Device(LNKC) // PCRC Routing Resource\r | |
194 | {\r | |
195 | Name(_HID,EISAID("PNP0C0F"))\r | |
196 | \r | |
197 | Name(_UID,3)\r | |
198 | \r | |
199 | // Disable the PCI IRQ.\r | |
200 | \r | |
201 | Method(_DIS,0,Serialized)\r | |
202 | {\r | |
203 | Or(PCRC,0x80,PCRC)\r | |
204 | }\r | |
205 | \r | |
206 | // Possible IRQ Resource Setting.\r | |
207 | \r | |
208 | Method (_PRS, 0, Serialized)\r | |
209 | {\r | |
210 | return (PRSC)\r | |
211 | }\r | |
212 | \r | |
213 | // Current IRQ Resource Setting.\r | |
214 | \r | |
215 | Method(_CRS,0,Serialized)\r | |
216 | {\r | |
217 | Name(RTLC,ResourceTemplate()\r | |
218 | {\r | |
219 | IRQ(Level,ActiveLow,Shared) {}\r | |
220 | })\r | |
221 | \r | |
222 | // Point to specific byte.\r | |
223 | \r | |
224 | CreateWordField(RTLC,1,IRQ0)\r | |
225 | \r | |
226 | // Zero out IRQ mask bits 0-15\r | |
227 | \r | |
228 | Store(Zero,IRQ0)\r | |
229 | \r | |
230 | ShiftLeft(1,And(PCRC,0x0F),IRQ0)\r | |
231 | \r | |
232 | Return(RTLC)\r | |
233 | }\r | |
234 | \r | |
235 | // Set IRQ Resource Setting.\r | |
236 | \r | |
237 | Method(_SRS,1,Serialized)\r | |
238 | {\r | |
239 | // Point to the specific byte passed in.\r | |
240 | \r | |
241 | CreateWordField(Arg0,1,IRQ0)\r | |
242 | \r | |
243 | // Determine the IRQ bit to set and store it,\r | |
244 | \r | |
245 | FindSetRightBit(IRQ0,Local0)\r | |
246 | Decrement(Local0)\r | |
247 | Store(Local0,PCRC)\r | |
248 | }\r | |
249 | \r | |
250 | // PCI IRQ Status.\r | |
251 | \r | |
252 | Method(_STA,0,Serialized)\r | |
253 | {\r | |
254 | If(And(PCRC,0x80))\r | |
255 | {\r | |
256 | Return(0x0009)\r | |
257 | }\r | |
258 | Else\r | |
259 | {\r | |
260 | Return(0x000B)\r | |
261 | }\r | |
262 | }\r | |
263 | }\r | |
264 | \r | |
265 | Device(LNKD) // PDRC Routing Resource\r | |
266 | {\r | |
267 | Name(_HID,EISAID("PNP0C0F"))\r | |
268 | \r | |
269 | Name(_UID,4)\r | |
270 | \r | |
271 | // Disable the PCI IRQ.\r | |
272 | \r | |
273 | Method(_DIS,0,Serialized)\r | |
274 | {\r | |
275 | Or(PDRC,0x80,PDRC)\r | |
276 | }\r | |
277 | \r | |
278 | // Possible IRQ Resource Setting.\r | |
279 | \r | |
280 | Method (_PRS, 0, Serialized)\r | |
281 | {\r | |
282 | return (PRSD)\r | |
283 | }\r | |
284 | \r | |
285 | // Current IRQ Resource Setting.\r | |
286 | \r | |
287 | Method(_CRS,0,Serialized)\r | |
288 | {\r | |
289 | Name(RTLD,ResourceTemplate()\r | |
290 | {\r | |
291 | IRQ(Level,ActiveLow,Shared) {}\r | |
292 | })\r | |
293 | \r | |
294 | // Point to specific byte.\r | |
295 | \r | |
296 | CreateWordField(RTLD,1,IRQ0)\r | |
297 | \r | |
298 | // Zero out IRQ mask bits 0-15\r | |
299 | \r | |
300 | Store(Zero,IRQ0)\r | |
301 | \r | |
302 | ShiftLeft(1,And(PDRC,0x0F),IRQ0)\r | |
303 | \r | |
304 | Return(RTLD)\r | |
305 | }\r | |
306 | \r | |
307 | // Set IRQ Resource Setting.\r | |
308 | \r | |
309 | Method(_SRS,1,Serialized)\r | |
310 | {\r | |
311 | // Point to the specific byte passed in.\r | |
312 | \r | |
313 | CreateWordField(Arg0,1,IRQ0)\r | |
314 | \r | |
315 | // Determine the IRQ bit to set and store it,\r | |
316 | \r | |
317 | FindSetRightBit(IRQ0,Local0)\r | |
318 | Decrement(Local0)\r | |
319 | Store(Local0,PDRC)\r | |
320 | }\r | |
321 | \r | |
322 | // PCI IRQ Status.\r | |
323 | \r | |
324 | Method(_STA,0,Serialized)\r | |
325 | {\r | |
326 | If(And(PDRC,0x80))\r | |
327 | {\r | |
328 | Return(0x0009)\r | |
329 | }\r | |
330 | Else\r | |
331 | {\r | |
332 | Return(0x000B)\r | |
333 | }\r | |
334 | }\r | |
335 | }\r | |
336 | \r | |
337 | Device(LNKE) // PERC Routing Resource\r | |
338 | {\r | |
339 | Name(_HID,EISAID("PNP0C0F"))\r | |
340 | \r | |
341 | Name(_UID,5)\r | |
342 | \r | |
343 | // Disable the PCI IRQ.\r | |
344 | \r | |
345 | Method(_DIS,0,Serialized)\r | |
346 | {\r | |
347 | Or(PERC,0x80,PERC)\r | |
348 | }\r | |
349 | \r | |
350 | // Possible IRQ Resource Setting.\r | |
351 | \r | |
352 | Method (_PRS, 0, Serialized)\r | |
353 | {\r | |
354 | return (PRSE)\r | |
355 | }\r | |
356 | \r | |
357 | // Current IRQ Resource Setting.\r | |
358 | \r | |
359 | Method(_CRS,0,Serialized)\r | |
360 | {\r | |
361 | Name(RTLE,ResourceTemplate()\r | |
362 | {\r | |
363 | IRQ(Level,ActiveLow,Shared) {}\r | |
364 | })\r | |
365 | \r | |
366 | // Point to specific byte.\r | |
367 | \r | |
368 | CreateWordField(RTLE,1,IRQ0)\r | |
369 | \r | |
370 | // Zero out IRQ mask bits 0-15\r | |
371 | \r | |
372 | Store(Zero,IRQ0)\r | |
373 | \r | |
374 | ShiftLeft(1,And(PERC,0x0F),IRQ0)\r | |
375 | \r | |
376 | Return(RTLE)\r | |
377 | }\r | |
378 | \r | |
379 | // Set IRQ Resource Setting.\r | |
380 | \r | |
381 | Method(_SRS,1,Serialized)\r | |
382 | {\r | |
383 | // Point to the specific byte passed in\r | |
384 | \r | |
385 | CreateWordField(Arg0,1,IRQ0)\r | |
386 | \r | |
387 | // Determine the IRQ bit to set and store it\r | |
388 | \r | |
389 | FindSetRightBit(IRQ0,Local0)\r | |
390 | Decrement(Local0)\r | |
391 | Store(Local0,PERC)\r | |
392 | }\r | |
393 | \r | |
394 | // PCI IRQ Status.\r | |
395 | \r | |
396 | Method(_STA,0,Serialized)\r | |
397 | {\r | |
398 | If(And(PERC,0x80))\r | |
399 | {\r | |
400 | Return(0x0009)\r | |
401 | }\r | |
402 | Else\r | |
403 | {\r | |
404 | Return(0x000B)\r | |
405 | }\r | |
406 | }\r | |
407 | }\r | |
408 | \r | |
409 | Device(LNKF) // PFRC Routing Resource\r | |
410 | {\r | |
411 | Name(_HID,EISAID("PNP0C0F"))\r | |
412 | \r | |
413 | Name(_UID,6)\r | |
414 | \r | |
415 | // Disable the PCI IRQ.\r | |
416 | \r | |
417 | Method(_DIS,0,Serialized)\r | |
418 | {\r | |
419 | Or(PFRC,0x80,PFRC)\r | |
420 | }\r | |
421 | \r | |
422 | // Possible IRQ Resource Setting.\r | |
423 | \r | |
424 | Method (_PRS, 0, Serialized)\r | |
425 | {\r | |
426 | return (PRSF)\r | |
427 | }\r | |
428 | \r | |
429 | // Current IRQ Resource Setting.\r | |
430 | \r | |
431 | Method(_CRS,0,Serialized)\r | |
432 | {\r | |
433 | Name(RTLF,ResourceTemplate()\r | |
434 | {\r | |
435 | IRQ(Level,ActiveLow,Shared) {}\r | |
436 | })\r | |
437 | \r | |
438 | // Point to specific byte.\r | |
439 | \r | |
440 | CreateWordField(RTLF,1,IRQ0)\r | |
441 | \r | |
442 | // Zero out IRQ mask bits 0-15\r | |
443 | \r | |
444 | Store(Zero,IRQ0)\r | |
445 | \r | |
446 | ShiftLeft(1,And(PFRC,0x0F),IRQ0)\r | |
447 | \r | |
448 | Return(RTLF)\r | |
449 | }\r | |
450 | \r | |
451 | // Set IRQ Resource Setting.\r | |
452 | \r | |
453 | Method(_SRS,1,Serialized)\r | |
454 | {\r | |
455 | // Point to the specific byte passed in.\r | |
456 | \r | |
457 | CreateWordField(Arg0,1,IRQ0)\r | |
458 | \r | |
459 | // Determine the IRQ bit to set and store it,\r | |
460 | \r | |
461 | FindSetRightBit(IRQ0,Local0)\r | |
462 | Decrement(Local0)\r | |
463 | Store(Local0,PFRC)\r | |
464 | }\r | |
465 | \r | |
466 | // PCI IRQ Status.\r | |
467 | \r | |
468 | Method(_STA,0,Serialized)\r | |
469 | {\r | |
470 | If(And(PFRC,0x80))\r | |
471 | {\r | |
472 | Return(0x0009)\r | |
473 | }\r | |
474 | Else\r | |
475 | {\r | |
476 | Return(0x000B)\r | |
477 | }\r | |
478 | }\r | |
479 | }\r | |
480 | \r | |
481 | Device(LNKG) // PGRC Routing Resource\r | |
482 | {\r | |
483 | Name(_HID,EISAID("PNP0C0F"))\r | |
484 | \r | |
485 | Name(_UID,7)\r | |
486 | \r | |
487 | // Disable the PCI IRQ.\r | |
488 | \r | |
489 | Method(_DIS,0,Serialized)\r | |
490 | {\r | |
491 | Or(PGRC,0x80,PGRC)\r | |
492 | }\r | |
493 | \r | |
494 | // Possible IRQ Resource Setting.\r | |
495 | \r | |
496 | Method (_PRS, 0, Serialized)\r | |
497 | {\r | |
498 | return (PRSG)\r | |
499 | }\r | |
500 | \r | |
501 | // Current IRQ Resource Setting.\r | |
502 | \r | |
503 | Method(_CRS,0,Serialized)\r | |
504 | {\r | |
505 | Name(RTLG,ResourceTemplate()\r | |
506 | {\r | |
507 | IRQ(Level,ActiveLow,Shared) {}\r | |
508 | })\r | |
509 | \r | |
510 | // Point to specific byte.\r | |
511 | \r | |
512 | CreateWordField(RTLG,1,IRQ0)\r | |
513 | \r | |
514 | // Zero out IRQ mask bits 0-15\r | |
515 | \r | |
516 | Store(Zero,IRQ0)\r | |
517 | \r | |
518 | ShiftLeft(1,And(PGRC,0x0F),IRQ0)\r | |
519 | \r | |
520 | Return(RTLG)\r | |
521 | }\r | |
522 | \r | |
523 | // Set IRQ Resource Setting.\r | |
524 | \r | |
525 | Method(_SRS,1,Serialized)\r | |
526 | {\r | |
527 | // Point to the specific byte passed in.\r | |
528 | \r | |
529 | CreateWordField(Arg0,1,IRQ0)\r | |
530 | \r | |
531 | // Determine the IRQ bit to set and store it,\r | |
532 | \r | |
533 | FindSetRightBit(IRQ0,Local0)\r | |
534 | Decrement(Local0)\r | |
535 | Store(Local0,PGRC)\r | |
536 | }\r | |
537 | \r | |
538 | // PCI IRQ Status.\r | |
539 | \r | |
540 | Method(_STA,0,Serialized)\r | |
541 | {\r | |
542 | If(And(PGRC,0x80))\r | |
543 | {\r | |
544 | Return(0x0009)\r | |
545 | }\r | |
546 | Else\r | |
547 | {\r | |
548 | Return(0x000B)\r | |
549 | }\r | |
550 | }\r | |
551 | }\r | |
552 | \r | |
553 | Device(LNKH) // PHRC Routing Resource\r | |
554 | {\r | |
555 | Name(_HID,EISAID("PNP0C0F"))\r | |
556 | \r | |
557 | Name(_UID,8)\r | |
558 | \r | |
559 | // Disable the PCI IRQ.\r | |
560 | \r | |
561 | Method(_DIS,0,Serialized)\r | |
562 | {\r | |
563 | Or(PHRC,0x80,PHRC)\r | |
564 | }\r | |
565 | \r | |
566 | // Possible IRQ Resource Setting.\r | |
567 | \r | |
568 | Method (_PRS, 0, Serialized)\r | |
569 | {\r | |
570 | return (PRSH)\r | |
571 | }\r | |
572 | \r | |
573 | // Current IRQ Resource Setting.\r | |
574 | \r | |
575 | Method(_CRS,0,Serialized)\r | |
576 | {\r | |
577 | Name(RTLH,ResourceTemplate()\r | |
578 | {\r | |
579 | IRQ(Level,ActiveLow,Shared) {}\r | |
580 | })\r | |
581 | \r | |
582 | // Point to specific byte.\r | |
583 | \r | |
584 | CreateWordField(RTLH,1,IRQ0)\r | |
585 | \r | |
586 | // Zero out IRQ mask bits 0-15\r | |
587 | \r | |
588 | Store(Zero,IRQ0)\r | |
589 | \r | |
590 | ShiftLeft(1,And(PHRC,0x0F),IRQ0)\r | |
591 | \r | |
592 | Return(RTLH)\r | |
593 | }\r | |
594 | \r | |
595 | // Set IRQ Resource Setting.\r | |
596 | \r | |
597 | Method(_SRS,1,Serialized)\r | |
598 | {\r | |
599 | // Point to the specific byte passed in.\r | |
600 | \r | |
601 | CreateWordField(Arg0,1,IRQ0)\r | |
602 | \r | |
603 | // Determine the IRQ bit to set and store it,\r | |
604 | \r | |
605 | FindSetRightBit(IRQ0,Local0)\r | |
606 | Decrement(Local0)\r | |
607 | Store(Local0,PHRC)\r | |
608 | }\r | |
609 | \r | |
610 | // PCI IRQ Status.\r | |
611 | \r | |
612 | Method(_STA,0,Serialized)\r | |
613 | {\r | |
614 | If(And(PHRC,0x80))\r | |
615 | {\r | |
616 | Return(0x0009)\r | |
617 | }\r | |
618 | Else\r | |
619 | {\r | |
620 | Return(0x000B)\r | |
621 | }\r | |
622 | }\r | |
623 | }\r |