1 /* SPDX-License-Identifier: GPL-2.0-only */
3 /* PIC Possible Resource Values */
4 Name(IRQP, ResourceTemplate() {
5 Interrupt(ResourceConsumer, Level, ActiveLow, Shared, , , PIC){
6 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15
10 /* IO-APIC Possible Resource Values */
11 Name(IRQI, ResourceTemplate() {
12 Interrupt (ResourceConsumer, Level, ActiveLow, Shared, , , APIC) {
13 16, 17, 18, 19, 20, 21, 22, 23
17 #define PCI_LINK(DEV_NAME, PIC_REG, APIC_REG, UID) \
19 Name(_HID, EISAID("PNP0C0F")) \
29 If (local0 != 0x1f) { \
30 printf("PCI: \\_SB.%s._STA: %o, Enabled", #DEV_NAME, local0) \
31 /* Present, Enabled, Functional */ \
34 printf("PCI: \\_SB.%s._STA: %o, Disabled", #DEV_NAME, local0) \
35 /* Present, Functional */ \
42 printf("PCI: \\_SB.%s._DIS APIC", #DEV_NAME) \
45 printf("PCI: \\_SB.%s._DIS PIC", #DEV_NAME) \
52 printf("PCI: \\_SB.%s._PRS => APIC", #DEV_NAME) \
55 printf("PCI: \\_SB.%s._PRS => PIC", #DEV_NAME) \
61 local0=ResourceTemplate(){ \
69 CreateDWordField(local0, NUMB._INT, IRQN) \
71 printf("PCI: \\_SB.%s._CRS APIC: %o", #DEV_NAME, APIC_REG) \
74 printf("PCI: \\_SB.%s._CRS PIC: %o", #DEV_NAME, PIC_REG) \
78 Return(ResourceTemplate(){}) \
85 CreateWordField(ARG0, 0x5, IRQN) \
88 printf("PCI: \\_SB.%s._SRS APIC: %o", #DEV_NAME, IRQN) \
91 printf("PCI: \\_SB.%s._SRS PIC: %o", #DEV_NAME, IRQN) \
97 PCI_LINK(INTA, PIRA, IORA, 0)
98 PCI_LINK(INTB, PIRB, IORB, 1)
99 PCI_LINK(INTC, PIRC, IORC, 2)
100 PCI_LINK(INTD, PIRD, IORD, 3)
101 PCI_LINK(INTE, PIRE, IORE, 4)
102 PCI_LINK(INTF, PIRF, IORF, 5)
103 PCI_LINK(INTG, PIRG, IORG, 6)
104 PCI_LINK(INTH, PIRH, IORH, 7)