Reviewed-by: Ray Ni <ray...@intel.com>

> -----Original Message-----
> From: Tan, Dun <dun....@intel.com>
> Sent: Thursday, July 27, 2023 10:21 AM
> To: devel@edk2.groups.io
> Cc: Dong, Eric <eric.d...@intel.com>; Ni, Ray <ray...@intel.com>; Kumar, Rahul
> R <rahul.r.ku...@intel.com>
> Subject: [PATCH 3/5] 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....@intel.com>
> Cc: Eric Dong <eric.d...@intel.com>
> Cc: Ray Ni <ray...@intel.com>
> Cc: Rahul Kumar <rahul1.ku...@intel.com>
> ---
>  UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
> b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
> index 6574849939..34aa901f93 100644
> --- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
> +++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
> @@ -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.
>      //
> --
> 2.31.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107338): https://edk2.groups.io/g/devel/message/107338
Mute This Topic: https://groups.io/mt/100383961/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to