UefiCpuPkg/CpuMpPei: Do not load new GDT table
Do not load the new GDT table and just to use the exiting BSP's GDT table set up
by SEC phase.
Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Giri Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.c b/UefiCpuPkg/CpuMpPei/CpuMpPei.c
index 9b602a1..5a1a648 100644
--- a/UefiCpuPkg/CpuMpPei/CpuMpPei.c
+++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.c
@@ -464,7 +464,7 @@
//
// Get the BSP's data of GDT and IDT
//
- CopyMem ((VOID *)&ExchangeInfo->GdtrProfile, &mGdt, sizeof(mGdt));
+ AsmReadGdtr ((IA32_DESCRIPTOR *) &ExchangeInfo->GdtrProfile);
AsmReadIdtr ((IA32_DESCRIPTOR *) &ExchangeInfo->IdtrProfile);
if (PeiCpuMpData->ApLoopMode == ApInMwaitLoop) {
@@ -860,10 +860,6 @@
EFI_PEI_VECTOR_HANDOFF_INFO_PPI *VectorHandoffInfoPpi;
//
- // Load new GDT table on BSP
- //
- AsmInitializeGdt (&mGdt);
- //
// Get Vector Hand-off Info PPI
//
VectorInfo = NULL;