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