From 8a763b533bb1b10af2831f6c35d6545bdd5c69d1 Mon Sep 17 00:00:00 2001 From: Zhiguang Liu Date: Mon, 9 Jan 2023 11:34:22 +0800 Subject: MdeModulePkg: Disambiguate the meaning of PcdDxeIplSwitchToLongMode Literally, the meaning of PcdDxeIplSwitchToLongMode is clear, indicating whether need switch to long mode when loading DxeCore. However, the comments in dec are confusing for the case where PEI core and DXE core are both in 64-bit. This patch makes it clear. PcdDxeIplSwitchToLongMode is true only when PEI core is 32-bit, and switch to long mode to load 64-bit DXE core. In other cases, this PCD is false. This also aligns with current usage in OvmfPkg. Cc: Jian J Wang Cc: Liming Gao Cc: Ray Ni Signed-off-by: Zhiguang Liu Reviewed-by: Liming Gao Reviewed-by: Ray Ni --- MdeModulePkg/MdeModulePkg.dec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 9605c617b7..e8058c8bfa 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -927,10 +927,8 @@ [PcdsFeatureFlag.IA32, PcdsFeatureFlag.X64] ## Indicates if DxeIpl should switch to long mode to enter DXE phase. - # It is assumed that 64-bit DxeCore is built in firmware if it is true; otherwise 32-bit DxeCore - # is built in firmware.

# TRUE - DxeIpl will load a 64-bit DxeCore and switch to long mode to hand over to DxeCore.
- # FALSE - DxeIpl will load a 32-bit DxeCore and perform stack switch to hand over to DxeCore.
+ # FALSE - DxeIpl will load a 32-bit or 64-bit DxeCore and perform stack switch to hand over to DxeCore.
# @Prompt DxeIpl switch to long mode. gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE|BOOLEAN|0x0001003b -- cgit v1.2.3