summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/UefiCpuPkg.dsc
diff options
context:
space:
mode:
authorXie, Yuanhao <yuanhao.xie@intel.com>2022-12-20 05:40:15 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-12-20 08:38:28 +0000
commit73ccde8f6d04a246377cabaed2875e69d4b6b719 (patch)
treea81994659df453fd0c08bcef1cda819f6097e93d /UefiCpuPkg/UefiCpuPkg.dsc
parent7bda8c648192d76f7b3f7cee54bd7b1c86a6a84f (diff)
downloadedk2-73ccde8f6d04a246377cabaed2875e69d4b6b719.tar.gz
edk2-73ccde8f6d04a246377cabaed2875e69d4b6b719.tar.bz2
edk2-73ccde8f6d04a246377cabaed2875e69d4b6b719.zip
UefiCpuPkg: Has APs in 64 bit long-mode before booting to OS.
During the finalization of Mp initialization before booting into the OS, depending on whether Mwait is supported or not, AsmRelocateApLoop places Aps in MWAIT-loop or HLT-loop. Since paging is necessary for long mode, the original implementation of moving APs to 32-bit was to disable paging to ensure that the booting does not crash. The current modification creates a page table in reserved memory, avoiding switching modes and reclaiming memory by OS. This modification is only for 64 bit mode. More specifically, we keep the AMD logic as the original code flow, extract and update the Intel-related code, where the APs would stay in 64-bit, and run in a Mwait or Hlt loop until the OS wake them up. Signed-off-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'UefiCpuPkg/UefiCpuPkg.dsc')
-rw-r--r--UefiCpuPkg/UefiCpuPkg.dsc1
1 files changed, 1 insertions, 0 deletions
diff --git a/UefiCpuPkg/UefiCpuPkg.dsc b/UefiCpuPkg/UefiCpuPkg.dsc
index f9a46089d2..781acedfc5 100644
--- a/UefiCpuPkg/UefiCpuPkg.dsc
+++ b/UefiCpuPkg/UefiCpuPkg.dsc
@@ -94,6 +94,7 @@
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
+ CpuPageTableLib|UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableLib.inf
MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
RegisterCpuFeaturesLib|UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesLib.inf
CpuCacheInfoLib|UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.inf