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