UefiCpuPkg:Relocate AP to new safe buffer in PeiMpLib
In this commit, change PeiMpLib to install callback of gEdkiiEndOfS3ResumeGuid to relocate AP to new safe buffer. The gEdkiiEndOfS3ResumeGuid is installed in S3Resume.c before jmping to OS waking vector. Previously, code in CpuS3.c of PiSmmCpuDxe driver will prepare the new safe buffer for AP and place AP in hlt loop state. With this code change, we can remove the Machine Instructions of mApHltLoopCode in PiSmmCpuDxe. Also we can reuse the related code in DxeMpLib for PeiMpLib. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <Library/HobLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
#include <Library/MicrocodeLib.h>
|
||||
#include <Library/CpuPageTableLib.h>
|
||||
#include <ConfidentialComputingGuestAttr.h>
|
||||
|
||||
#include <Register/Amd/Fam17Msr.h>
|
||||
@@ -68,6 +69,8 @@
|
||||
//
|
||||
#define DEFAULT_MAX_MICROCODE_PATCH_NUM 8
|
||||
|
||||
#define PAGING_4K_ADDRESS_MASK_64 0x000FFFFFFFFFF000ull
|
||||
|
||||
//
|
||||
// Data structure for microcode patch information
|
||||
//
|
||||
|
Reference in New Issue
Block a user