1 /****************************************************************
3 ****************************************************************/
6 /* Objects filled in by run-time generated SSDT */
7 External(NTFY, MethodObj)
10 /* Methods called by run-time generated SSDT Processor objects */
11 Method(CPMA, 1, NotSerialized) {
12 // _MAT method - create an madt apic buffer
13 // Arg0 = Processor ID = Local APIC ID
14 // Local0 = CPON flag for this cpu
15 Store(DerefOf(Index(CPON, Arg0)), Local0)
16 // Local1 = Buffer (in madt apic form) to return
17 Store(Buffer(8) {0x00, 0x08, 0x00, 0x00, 0x00, 0, 0, 0}, Local1)
18 // Update the processor id, lapic id, and enable/disable status
19 Store(Arg0, Index(Local1, 2))
20 Store(Arg0, Index(Local1, 3))
21 Store(Local0, Index(Local1, 4))
24 Method(CPST, 1, NotSerialized) {
25 // _STA method - return ON status of cpu
26 // Arg0 = Processor ID = Local APIC ID
27 // Local0 = CPON flag for this cpu
28 Store(DerefOf(Index(CPON, Arg0)), Local0)
35 Method(CPEJ, 2, NotSerialized) {
36 // _EJ0 method - eject callback
40 /* CPU hotplug notify method */
41 OperationRegion(PRST, SystemIO, 0xaf00, 32)
42 Field(PRST, ByteAcc, NoLock, Preserve) {
46 // Local5 = active cpu bitmap
48 // Local2 = last read byte from bitmap
50 // Local0 = Processor ID / APIC ID iterator
52 While (LLess(Local0, SizeOf(CPON))) {
53 // Local1 = CPON flag for this cpu
54 Store(DerefOf(Index(CPON, Local0)), Local1)
55 If (And(Local0, 0x07)) {
56 // Shift down previously read bitmap byte
57 ShiftRight(Local2, 1, Local2)
59 // Read next byte from cpu bitmap
60 Store(DerefOf(Index(Local5, ShiftRight(Local0, 3))), Local2)
62 // Local3 = active state for this cpu
63 Store(And(Local2, 1), Local3)
65 If (LNotEqual(Local1, Local3)) {
66 // State change - update CPON with new state
67 Store(Local3, Index(CPON, Local0))
69 If (LEqual(Local3, 1)) {