[SeaBIOS] [PATCH 1/6] acpi: move PCNT to DSDT

Paolo Bonzini pbonzini at redhat.com
Tue Jul 31 11:52:08 CEST 2012


The PCNT method does not need any patching, so it can stay in the DSDT
if we add an External declaration.  The AML code size does not change.

Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
---
 src/acpi-dsdt.dsl  |   39 +++++++++++++++++++++++++++++++++++++--
 src/ssdt-pcihp.dsl |   37 -------------------------------------
 2 files changed, 37 insertions(+), 39 deletions(-)

diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl
index 2060686..4ebee9f 100644
--- a/src/acpi-dsdt.dsl
+++ b/src/acpi-dsdt.dsl
@@ -540,8 +540,43 @@ DefinitionBlock (
             Return (0x0)
         }
 
-	/* Hotplug notification method supplied by SSDT */
-	External (\_SB.PCI0.PCNT, MethodObj)
+#define gen_pci_hotplug(slot)   \
+            External (\_SB.PCI0.S##slot, DeviceObj) \
+            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 hotplug notify method */
         Method(PCNF, 0) {
diff --git a/src/ssdt-pcihp.dsl b/src/ssdt-pcihp.dsl
index 12555e2..81c57b3 100644
--- a/src/ssdt-pcihp.dsl
+++ b/src/ssdt-pcihp.dsl
@@ -57,43 +57,6 @@ DefinitionBlock ("ssdt-pcihp.aml", "SSDT", 0x01, "BXPC", "BXSSDTPCIHP", 0x1)
         hotplug_slot(1d)
         hotplug_slot(1e)
         hotplug_slot(1f)
-
-#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)
-        }
     }
 
     Scope(\) {
-- 
1.7.10.4





More information about the SeaBIOS mailing list