mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-25 14:44:28 +02:00
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:
parent
66b4a2f91d
commit
8f3e132512
@ -187,12 +187,10 @@ SmmRestoreCpu (
|
|||||||
/**
|
/**
|
||||||
Initialize SMM S3 resume state structure used during S3 Resume.
|
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
|
VOID
|
||||||
InitSmmS3ResumeState (
|
InitSmmS3ResumeState (
|
||||||
IN UINT32 Cr3
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
VOID *GuidHob;
|
VOID *GuidHob;
|
||||||
@ -233,7 +231,6 @@ InitSmmS3ResumeState (
|
|||||||
}
|
}
|
||||||
|
|
||||||
SmmS3ResumeState->SmmS3Cr0 = (UINT32)AsmReadCr0 ();
|
SmmS3ResumeState->SmmS3Cr0 = (UINT32)AsmReadCr0 ();
|
||||||
SmmS3ResumeState->SmmS3Cr3 = Cr3;
|
|
||||||
SmmS3ResumeState->SmmS3Cr4 = (UINT32)AsmReadCr4 ();
|
SmmS3ResumeState->SmmS3Cr4 = (UINT32)AsmReadCr4 ();
|
||||||
|
|
||||||
if (sizeof (UINTN) == sizeof (UINT64)) {
|
if (sizeof (UINTN) == sizeof (UINT64)) {
|
||||||
|
@ -1359,7 +1359,7 @@ PiCpuSmmEntry (
|
|||||||
InitSmmProfile (Cr3);
|
InitSmmProfile (Cr3);
|
||||||
|
|
||||||
GetAcpiS3EnableFlag ();
|
GetAcpiS3EnableFlag ();
|
||||||
InitSmmS3ResumeState (Cr3);
|
InitSmmS3ResumeState ();
|
||||||
|
|
||||||
DEBUG ((DEBUG_INFO, "SMM CPU Module exit from SMRAM with EFI_SUCCESS\n"));
|
DEBUG ((DEBUG_INFO, "SMM CPU Module exit from SMRAM with EFI_SUCCESS\n"));
|
||||||
|
|
||||||
|
@ -1045,12 +1045,10 @@ extern BOOLEAN mSmmS3Flag;
|
|||||||
/**
|
/**
|
||||||
Initialize SMM S3 resume state structure used during S3 Resume.
|
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
|
VOID
|
||||||
InitSmmS3ResumeState (
|
InitSmmS3ResumeState (
|
||||||
IN UINT32 Cr3
|
VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user