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