UefiCpuPkg: Use Top of each AP's stack to save CpuMpData
To remove the dependency of CPU register, 4/8 byte at the top of the stack is occupied for CpuMpData. BIST information is also taken care here. This modification is only for PEI phase, since in DXE phase CpuMpData is accessed via global variable. Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com> Cc: Eric Dong <eric.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
76cf3d35e6
commit
9ab2b34dd4
@@ -179,6 +179,14 @@ ProgramStack:
|
||||
mov esp, dword [edi + CPU_INFO_IN_HOB.ApTopOfStack]
|
||||
|
||||
CProcedureInvoke:
|
||||
;
|
||||
; Reserve 4 bytes for CpuMpData.
|
||||
; When the AP wakes up again via INIT-SIPI-SIPI, push 0 will cause the existing CpuMpData to be overwritten with 0.
|
||||
; CpuMpData is filled in via InitializeApData() during the first time INIT-SIPI-SIPI,
|
||||
; while overwirrten may occurs when under ApInHltLoop but InitFlag is not set to ApInitConfig.
|
||||
; Therefore reservation is implemented by sub esp instead of push 0.
|
||||
;
|
||||
sub esp, 4
|
||||
push ebp ; push BIST data at top of AP stack
|
||||
xor ebp, ebp ; clear ebp for call stack trace
|
||||
push ebp
|
||||
|
Reference in New Issue
Block a user