mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg S3Resume2: Move the call to RestoreS3PageTables() earlier before SMM S3 resume.
SMM S3 resume may change memory cache type for flash memory range and thus RestoreS3PageTables() in which loops are executed to create page table would have negative performance impact on S3 resume. Move the call to RestoreS3PageTables() earlier before SMM S3 resume can avoid this issue. Signed-off-by: Sun Rui <rui.sun@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13231 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
1d602b12ab
commit
3a69f7cbe7
|
@ -696,10 +696,6 @@ S3ResumeExecuteBootScript (
|
|||
}
|
||||
|
||||
if (FeaturePcdGet (PcdDxeIplSwitchToLongMode)) {
|
||||
//
|
||||
// Need reconstruct page table here, since we do not trust ACPINvs.
|
||||
//
|
||||
RestoreS3PageTables ((UINTN)AcpiS3Context->S3NvsPageTableAddress);
|
||||
AsmWriteCr3 ((UINTN)AcpiS3Context->S3NvsPageTableAddress);
|
||||
}
|
||||
|
||||
|
@ -906,6 +902,13 @@ S3RestoreConfig2 (
|
|||
CpuDeadLoop ();
|
||||
}
|
||||
|
||||
if (FeaturePcdGet (PcdDxeIplSwitchToLongMode)) {
|
||||
//
|
||||
// Need reconstruct page table here, since we do not trust ACPINvs.
|
||||
//
|
||||
RestoreS3PageTables ((UINTN)AcpiS3Context->S3NvsPageTableAddress);
|
||||
}
|
||||
|
||||
//
|
||||
// Attempt to use content from SMRAM first
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue