UefiCpuPkg/S3Resume2Pei: assert for invalid excution mode combo

Add assert for invalid excution mode combination of 64bit PEI +
32bit DXE.

Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
This commit is contained in:
Dun Tan 2023-07-21 17:44:08 +08:00 committed by mergify[bot]
parent bc19f50c70
commit 48de494bb4

View File

@ -1106,6 +1106,13 @@ S3RestoreConfig2 (
DEBUG ((DEBUG_INFO, "SMM S3 Return Stack Pointer = %x\n", SmmS3ResumeState->ReturnStackPointer));
DEBUG ((DEBUG_INFO, "SMM S3 Smst = %x\n", SmmS3ResumeState->Smst));
//
// 64bit PEI and 32bit DXE is not a supported combination.
//
if (SmmS3ResumeState->Signature == SMM_S3_RESUME_SMM_32) {
ASSERT (sizeof (UINTN) == sizeof (UINT32));
}
//
// Directly do the switch stack when PEI and SMM env run in the same execution mode.
//