[SeaBIOS] EC space vs SystemIO for cpu hotplug

li guang lig.fnst at cn.fujitsu.com
Thu May 30 05:03:45 CEST 2013


Hi, Igor and all

based on the patches "pass cpu online/offline event bewteen QEMU",
http://lists.nongnu.org/archive/html/qemu-devel/2013-05/msg04135.html

I'd like to go further, IMHO, too many specific operation regions of
SystemIO have been created for specific usage, like pci-hotplug,
cpu-hotplug, pvpanic, debugcon, and so on, are not so good thing,
in real world, obviously none of them, and more worse, they themselves
and operations are scattered in several code snippets.

but via EC's ACPI space, the *created* SystemIOs can be totally removed,
and we got a centrally controlled and rational and flexible approach for
OS and platform communication, because EC is standard and it really
exists in real world(hardware platform).

may you think of it, if we can use EC space instead of specific SystemIO
for cpu hotplug case, I append a simple patch for seabios.


diff --git a/src/acpi-dsdt-cpu-hotplug.dsl
b/src/acpi-dsdt-cpu-hotplug.dsl
index 0f3e83b..869373b 100644
--- a/src/acpi-dsdt-cpu-hotplug.dsl
+++ b/src/acpi-dsdt-cpu-hotplug.dsl
@@ -6,6 +6,7 @@ Scope(\_SB) {
     /* Objects filled in by run-time generated SSDT */
     External(NTFY, MethodObj)
     External(CPON, PkgObj)
+    External(PRS, BuffObj)
 
     /* Methods called by run-time generated SSDT Processor objects */
     Method(CPMA, 1, NotSerialized) {
@@ -38,10 +39,10 @@ Scope(\_SB) {
     }
 
     /* CPU hotplug notify method */
-    OperationRegion(PRST, SystemIO, 0xaf00, 32)
-    Field(PRST, ByteAcc, NoLock, Preserve) {
-        PRS, 256
-    }
+//   OperationRegion(PRST, SystemIO, 0xaf00, 32)
+//    Field(PRST, ByteAcc, NoLock, Preserve) {
+//      PRS, 256
+//  }
     Method(PRSC, 0) {
         // Local5 = active cpu bitmap
         Store(PRS, Local5)
diff --git a/src/acpi-dsdt-isa.dsl b/src/acpi-dsdt-isa.dsl
index 2b9c3a0..4567edb 100644
--- a/src/acpi-dsdt-isa.dsl
+++ b/src/acpi-dsdt-isa.dsl
@@ -117,6 +117,7 @@ Scope(\_SB.PCI0.ISA) {
                        Offset(1),
                        CPUS,   8,      // 1, CPU plug/unplug status map
                        CPUN,   8,      // 2, CPU index
+                       PRS,    256,    // 3. CPU status map
                }
 
                Name(_GPE, 3)





More information about the SeaBIOS mailing list