diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl index 08412e2..10b651e 100644 --- a/src/acpi-dsdt.dsl +++ b/src/acpi-dsdt.dsl @@ -128,9 +128,9 @@ DefinitionBlock ( PCRM, 32, } -#define hotplug_slot(name, nr) \ - Device (S##name) { \ - Name (_ADR, nr##0000) \ +#define hotplug_func(name, nr, fn) \ + Device (S##name##fn) { \ + Name (_ADR, nr) \ Method (_EJ0,1) { \ Store(ShiftLeft(1, nr), B0EJ) \ Return (0x0) \ @@ -138,13 +138,30 @@ DefinitionBlock ( Name (_SUN, name) \ } +#define hotplug_slot(name, nr) \ + hotplug_func(name, nr##0000, 0)/* \ + hotplug_func(name, nr##0001, 1) \ + hotplug_func(name, nr##0002, 2) \ + hotplug_func(name, nr##0003, 3) \ + hotplug_func(name, nr##0004, 4) \ + hotplug_func(name, nr##0005, 5) \ + hotplug_func(name, nr##0006, 6) \ + hotplug_func(name, nr##0007, 7)*/ + hotplug_slot(1, 0x0001) hotplug_slot(2, 0x0002) hotplug_slot(3, 0x0003) hotplug_slot(4, 0x0004) hotplug_slot(5, 0x0005) - hotplug_slot(6, 0x0006) - hotplug_slot(7, 0x0007) + hotplug_func(6, 0x00060000, 0) + hotplug_func(6, 0x00060001, 1) + hotplug_func(6, 0x00060002, 2) + hotplug_func(6, 0x00060003, 3) + hotplug_func(6, 0x00060004, 4) + hotplug_func(6, 0x00060005, 5) + hotplug_func(6, 0x00060006, 6) + hotplug_func(6, 0x00060007, 7) + /*hotplug_slot(7, 0x0007) hotplug_slot(8, 0x0008) hotplug_slot(9, 0x0009) hotplug_slot(10, 0x000a) @@ -168,7 +185,7 @@ DefinitionBlock ( hotplug_slot(28, 0x001c) hotplug_slot(29, 0x001d) hotplug_slot(30, 0x001e) - hotplug_slot(31, 0x001f) + hotplug_slot(31, 0x001f)*/ Name (_CRS, ResourceTemplate () { @@ -842,13 +859,22 @@ DefinitionBlock ( Return(0x01) } -#define gen_pci_hotplug(nr) \ +#define gen_pci_hotplug_func(nr, fn) \ If (And(\_SB.PCI0.PCIU, ShiftLeft(1, nr))) { \ - Notify(\_SB.PCI0.S##nr, 1) \ + Notify(\_SB.PCI0.S##nr##fn, 1) \ } \ If (And(\_SB.PCI0.PCID, ShiftLeft(1, nr))) { \ - Notify(\_SB.PCI0.S##nr, 3) \ + Notify(\_SB.PCI0.S##nr##fn, 3) \ } +#define gen_pci_hotplug(nr) \ + gen_pci_hotplug_func(nr, 0)/* \ + gen_pci_hotplug_func(nr, 1) \ + gen_pci_hotplug_func(nr, 2) \ + gen_pci_hotplug_func(nr, 3) \ + gen_pci_hotplug_func(nr, 4) \ + gen_pci_hotplug_func(nr, 5) \ + gen_pci_hotplug_func(nr, 6) \ + gen_pci_hotplug_func(nr, 7)*/ Method(_L01) { gen_pci_hotplug(1) @@ -856,8 +882,15 @@ DefinitionBlock ( gen_pci_hotplug(3) gen_pci_hotplug(4) gen_pci_hotplug(5) - gen_pci_hotplug(6) - gen_pci_hotplug(7) + gen_pci_hotplug_func(6, 0) + gen_pci_hotplug_func(6, 1) + gen_pci_hotplug_func(6, 2) + gen_pci_hotplug_func(6, 3) + gen_pci_hotplug_func(6, 4) + gen_pci_hotplug_func(6, 5) + gen_pci_hotplug_func(6, 6) + gen_pci_hotplug_func(6, 7) + /*gen_pci_hotplug(7) gen_pci_hotplug(8) gen_pci_hotplug(9) gen_pci_hotplug(10) @@ -881,7 +914,7 @@ DefinitionBlock ( gen_pci_hotplug(28) gen_pci_hotplug(29) gen_pci_hotplug(30) - gen_pci_hotplug(31) + gen_pci_hotplug(31) */ Return (0x01)