From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web11.63000.1673235272978750033 for ; Sun, 08 Jan 2023 19:34:33 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=e1nhspsf; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: zhiguang.liu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673235272; x=1704771272; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=tNvqZto0oa5mIfA01LT+nJwnBzjjrxCFSjHW5N9eReU=; b=e1nhspsfEw/WmHtnzjdSsLjtwHV43wsfDzu1eZgFFBcMTwOzt/1HnrMW lIrV8UVBQStGhrAHR0rF9ZFjyBUvUI9+Tz902REKAeAspYSDcaU+LEiET tjuAkZodCJB0gU3DLxBvjPu8UcWo6cUObpFbKprmDncqEEmWE5ngx3CbS IzkqRid1HCt7cVEBGhVmzbsEXvRHya5tv+///2F7x/dI1/4ZgHNRaUxN4 swZBA6PUpJAtD/F/x2h7Y6ABsTHKg7HIL0TabSGkk5QeMiOlXhd1/g7L1 HorgsIo5ssOywgY43axcwZl9PBaAbZiti5NIwYV3/sqj7IFI5BQkSHRWn Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10584"; a="322859174" X-IronPort-AV: E=Sophos;i="5.96,311,1665471600"; d="scan'208";a="322859174" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jan 2023 19:34:32 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10584"; a="634065181" X-IronPort-AV: E=Sophos;i="5.96,311,1665471600"; d="scan'208";a="634065181" Received: from shwdesfp01.ccr.corp.intel.com ([10.239.158.151]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jan 2023 19:34:30 -0800 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Zhiguang Liu , Jian J Wang , Liming Gao , Ray Ni Subject: [PATCH] MdeModulePkg: Disambiguate the meaning of PcdDxeIplSwitchToLongMode Date: Mon, 9 Jan 2023 11:34:22 +0800 Message-Id: <20230109033422.1992-1-zhiguang.liu@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- MdeModulePkg/MdeModulePkg.dec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index be5e829ca9..5e4535e353 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -922,10 +922,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 -- 2.31.1.windows.1