UefiCpuPkg/PiSmmCpuDxeSmm: Clean redundant SmmS3Cr3 Init

The SmmS3Cr3 is only used by S3Resume PEIM to switch CPU from 32bit
to 64bit, it should be the CR3 for Non-SMM environment and init by
InitSmmS3Cr3 function. No need set to SMM CR3.

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
This commit is contained in:
Jiaxin Wu 2024-07-18 11:37:09 +08:00 committed by mergify[bot]
parent 66b4a2f91d
commit 8f3e132512
3 changed files with 3 additions and 8 deletions

View File

@ -187,12 +187,10 @@ SmmRestoreCpu (
/**
Initialize SMM S3 resume state structure used during S3 Resume.
@param[in] Cr3 The base address of the page tables to use in SMM.
**/
VOID
InitSmmS3ResumeState (
IN UINT32 Cr3
VOID
)
{
VOID *GuidHob;
@ -233,7 +231,6 @@ InitSmmS3ResumeState (
}
SmmS3ResumeState->SmmS3Cr0 = (UINT32)AsmReadCr0 ();
SmmS3ResumeState->SmmS3Cr3 = Cr3;
SmmS3ResumeState->SmmS3Cr4 = (UINT32)AsmReadCr4 ();
if (sizeof (UINTN) == sizeof (UINT64)) {

View File

@ -1359,7 +1359,7 @@ PiCpuSmmEntry (
InitSmmProfile (Cr3);
GetAcpiS3EnableFlag ();
InitSmmS3ResumeState (Cr3);
InitSmmS3ResumeState ();
DEBUG ((DEBUG_INFO, "SMM CPU Module exit from SMRAM with EFI_SUCCESS\n"));

View File

@ -1045,12 +1045,10 @@ extern BOOLEAN mSmmS3Flag;
/**
Initialize SMM S3 resume state structure used during S3 Resume.
@param[in] Cr3 The base address of the page tables to use in SMM.
**/
VOID
InitSmmS3ResumeState (
IN UINT32 Cr3
VOID
);
/**