UefiCpuPkg: Duplicated AsmRelocateApLoop as AsmRelocateApLoopAmd

AsmRelocateApLoop is replicated for future Intel Logic Extraction,
further brings AP into 64-bit, and enables paging.

Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
Yuanhao Xie
2022-12-20 05:40:14 +08:00
committed by mergify[bot]
parent 6937fc8338
commit 7bda8c6481
5 changed files with 235 additions and 20 deletions

View File

@@ -179,6 +179,8 @@ typedef struct {
UINTN RendezvousFunnelSize;
UINT8 *RelocateApLoopFuncAddress;
UINTN RelocateApLoopFuncSize;
UINT8 *RelocateApLoopFuncAddressAmd;
UINTN RelocateApLoopFuncSizeAmd;
UINTN ModeTransitionOffset;
UINTN SwitchToRealNoNxOffset;
UINTN SwitchToRealPM16ModeOffset;
@@ -346,6 +348,31 @@ typedef
extern EFI_GUID mCpuInitMpLibHobGuid;
/**
Assembly code to place AP into safe loop mode for Amd.
Place AP into targeted C-State if MONITOR is supported, otherwise
place AP into hlt state.
Place AP in protected mode if the current is long mode. Due to AP maybe
wakeup by some hardware event. It could avoid accessing page table that
may not available during booting to OS.
@param[in] MwaitSupport TRUE indicates MONITOR is supported.
FALSE indicates MONITOR is not supported.
@param[in] ApTargetCState Target C-State value.
@param[in] PmCodeSegment Protected mode code segment value.
**/
typedef
VOID
(EFIAPI *ASM_RELOCATE_AP_LOOP_AMD)(
IN BOOLEAN MwaitSupport,
IN UINTN ApTargetCState,
IN UINTN PmCodeSegment,
IN UINTN TopOfApStack,
IN UINTN NumberToFinish,
IN UINTN Pm16CodeSegment,
IN UINTN SevEsAPJumpTable,
IN UINTN WakeupBuffer
);
/**
Assembly code to place AP into safe loop mode.