+ }
+ Return(One)
+ }
+
+#define gen_pci_hotplug(slot) \
+ If (LEqual(Arg0, 0x##slot)) { Notify(S##slot, Arg1) }
+
+ Method(PCNT, 2) {
+ gen_pci_hotplug(01)
+ gen_pci_hotplug(02)
+ gen_pci_hotplug(03)
+ gen_pci_hotplug(04)
+ gen_pci_hotplug(05)
+ gen_pci_hotplug(06)
+ gen_pci_hotplug(07)
+ gen_pci_hotplug(08)
+ gen_pci_hotplug(09)
+ gen_pci_hotplug(0a)
+ gen_pci_hotplug(0b)
+ gen_pci_hotplug(0c)
+ gen_pci_hotplug(0d)
+ gen_pci_hotplug(0e)
+ gen_pci_hotplug(0f)
+ gen_pci_hotplug(10)
+ gen_pci_hotplug(11)
+ gen_pci_hotplug(12)
+ gen_pci_hotplug(13)
+ gen_pci_hotplug(14)
+ gen_pci_hotplug(15)
+ gen_pci_hotplug(16)
+ gen_pci_hotplug(17)
+ gen_pci_hotplug(18)
+ gen_pci_hotplug(19)
+ gen_pci_hotplug(1a)
+ gen_pci_hotplug(1b)
+ gen_pci_hotplug(1c)
+ gen_pci_hotplug(1d)
+ gen_pci_hotplug(1e)
+ gen_pci_hotplug(1f)
+ }
+ }
+
+
+/****************************************************************
+ * PCI IRQs
+ ****************************************************************/
+
+ Scope(\_SB) {
+ Field (PCI0.ISA.P40C, ByteAcc, NoLock, Preserve)
+ {
+ PRQ0, 8,
+ PRQ1, 8,
+ PRQ2, 8,
+ PRQ3, 8
+ }
+
+ Method (IQST, 1, NotSerialized) {
+ // _STA method - get status
+ If (And (0x80, Arg0)) {
+ Return (0x09)
+ }
+ Return (0x0B)
+ }
+ Method (IQDI, 1, NotSerialized) {
+ // _DIS method - disable interrupt
+ Or(DerefOf(Arg0), 0x80, Arg0)
+ }
+ Method (IQCR, 1, NotSerialized) {
+ // _CRS method - get current settings
+ Name (PRR0, ResourceTemplate ()
+ {
+ Interrupt (, Level, ActiveHigh, Shared)
+ { 0 }
+ })
+ CreateDWordField (PRR0, 0x05, PRRI)
+ If (LLess (Arg0, 0x80)) {
+ Store (Arg0, PRRI)
+ }
+ Return (PRR0)
+ }
+ Method (IQSR, 2, NotSerialized) {
+ // _SRS method - set interrupt
+ CreateDWordField (Arg1, 0x05, PRRI)
+ Store (PRRI, Arg0)
+ }
+
+ Device(LNKA) {
+ Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
+ Name(_UID, 1)
+ Name(_PRS, ResourceTemplate(){
+ Interrupt (, Level, ActiveHigh, Shared)
+ { 5, 10, 11 }
+ })
+ Method (_STA, 0, NotSerialized) { Return (IQST(PRQ0)) }
+ Method (_DIS, 0, NotSerialized) { IQDI(RefOf(PRQ0)) }
+ Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ0)) }
+ Method (_SRS, 1, NotSerialized) { IQSR(RefOf(PRQ0), Arg0) }
+ }
+ Device(LNKB) {
+ Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
+ Name(_UID, 2)
+ Name(_PRS, ResourceTemplate(){
+ Interrupt (, Level, ActiveHigh, Shared)
+ { 5, 10, 11 }
+ })
+ Method (_STA, 0, NotSerialized) { Return (IQST(PRQ1)) }
+ Method (_DIS, 0, NotSerialized) { IQDI(RefOf(PRQ1)) }
+ Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ1)) }
+ Method (_SRS, 1, NotSerialized) { IQSR(RefOf(PRQ1), Arg0) }
+ }
+ Device(LNKC) {
+ Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
+ Name(_UID, 3)
+ Name(_PRS, ResourceTemplate() {
+ Interrupt (, Level, ActiveHigh, Shared)
+ { 5, 10, 11 }
+ })
+ Method (_STA, 0, NotSerialized) { Return (IQST(PRQ2)) }
+ Method (_DIS, 0, NotSerialized) { IQDI(RefOf(PRQ2)) }
+ Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ2)) }
+ Method (_SRS, 1, NotSerialized) { IQSR(RefOf(PRQ2), Arg0) }
+ }
+ Device(LNKD) {
+ Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
+ Name(_UID, 4)
+ Name(_PRS, ResourceTemplate() {
+ Interrupt (, Level, ActiveHigh, Shared)
+ { 5, 10, 11 }
+ })
+ Method (_STA, 0, NotSerialized) { Return (IQST(PRQ3)) }
+ Method (_DIS, 0, NotSerialized) { IQDI(RefOf(PRQ3)) }
+ Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ3)) }
+ Method (_SRS, 1, NotSerialized) { IQSR(RefOf(PRQ3), Arg0) }
+ }
+ Device(LNKS) {
+ Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
+ Name(_UID, 5)
+ Name(_PRS, ResourceTemplate() {
+ Interrupt (, Level, ActiveHigh, Shared)
+ { 9 }
+ })
+ Method (_STA, 0, NotSerialized) { Return (IQST(PRQ0)) }
+ Method (_DIS, 0, NotSerialized) { IQDI(RefOf(PRQ0)) }
+ Method (_CRS, 0, NotSerialized) { Return (IQCR(PRQ0)) }