From: Gerd Hoffmann Date: Wed, 28 Nov 2012 09:17:45 +0000 (+0100) Subject: acpi: move cpu hotplug to separate file [q35] X-Git-Tag: rel-1.7.2~28 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f50a55c4cc277e7e7573496ea282e74ad86dedb9;p=seabios.git acpi: move cpu hotplug to separate file [q35] Signed-off-by: Gerd Hoffmann --- diff --git a/src/q35-acpi-dsdt.dsl b/src/q35-acpi-dsdt.dsl index ddb82bb..34fb527 100644 --- a/src/q35-acpi-dsdt.dsl +++ b/src/q35-acpi-dsdt.dsl @@ -577,77 +577,7 @@ DefinitionBlock ( define_gsi_link(GSIH, 0, 0x17) } - /* CPU hotplug */ - Scope(\_SB) { - /* Objects filled in by run-time generated SSDT */ - External(NTFY, MethodObj) - External(CPON, PkgObj) - - /* Methods called by run-time generated SSDT Processor objects */ - Method (CPMA, 1, NotSerialized) { - // _MAT method - create an madt apic buffer - // Local0 = CPON flag for this cpu - Store(DerefOf(Index(CPON, Arg0)), Local0) - // Local1 = Buffer (in madt apic form) to return - Store(Buffer(8) {0x00, 0x08, 0x00, 0x00, 0x00, 0, 0, 0}, Local1) - // Update the processor id, lapic id, and enable/disable status - Store(Arg0, Index(Local1, 2)) - Store(Arg0, Index(Local1, 3)) - Store(Local0, Index(Local1, 4)) - Return (Local1) - } - Method (CPST, 1, NotSerialized) { - // _STA method - return ON status of cpu - // Local0 = CPON flag for this cpu - Store(DerefOf(Index(CPON, Arg0)), Local0) - If (Local0) { Return(0xF) } Else { Return(0x0) } - } - Method (CPEJ, 2, NotSerialized) { - // _EJ0 method - eject callback - Sleep(200) - } - - /* CPU hotplug notify method */ - OperationRegion(PRST, SystemIO, 0xaf00, 32) - Field (PRST, ByteAcc, NoLock, Preserve) - { - PRS, 256 - } - Method(PRSC, 0) { - // Local5 = active cpu bitmap - Store (PRS, Local5) - // Local2 = last read byte from bitmap - Store (Zero, Local2) - // Local0 = cpuid iterator - Store (Zero, Local0) - While (LLess(Local0, SizeOf(CPON))) { - // Local1 = CPON flag for this cpu - Store(DerefOf(Index(CPON, Local0)), Local1) - If (And(Local0, 0x07)) { - // Shift down previously read bitmap byte - ShiftRight(Local2, 1, Local2) - } Else { - // Read next byte from cpu bitmap - Store(DerefOf(Index(Local5, ShiftRight(Local0, 3))), Local2) - } - // Local3 = active state for this cpu - Store(And(Local2, 1), Local3) - - If (LNotEqual(Local1, Local3)) { - // State change - update CPON with new state - Store(Local3, Index(CPON, Local0)) - // Do CPU notify - If (LEqual(Local3, 1)) { - NTFY(Local0, 1) - } Else { - NTFY(Local0, 3) - } - } - Increment(Local0) - } - Return(One) - } - } +#include "acpi-dsdt-cpu-hotplug.dsl" Scope (\_GPE) { @@ -658,7 +588,7 @@ DefinitionBlock ( } Method(_L01) { // CPU hotplug event - Return(\_SB.PRSC()) + \_SB.PRSC() } Method(_L02) { Return(0x01)