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:
Yuanhao Xie
2022-08-19 14:17:28 +08:00
committed by mergify[bot]
parent 76cf3d35e6
commit 9ab2b34dd4
5 changed files with 59 additions and 13 deletions

View File

@@ -301,6 +301,14 @@ struct _CPU_MP_DATA {
UINT64 GhcbBase;
};
//
// AP_STACK_DATA is stored at the top of each AP stack.
//
typedef struct {
UINTN Bist;
CPU_MP_DATA *MpData;
} AP_STACK_DATA;
#define AP_SAFE_STACK_SIZE 128
#define AP_RESET_STACK_SIZE AP_SAFE_STACK_SIZE