summaryrefslogtreecommitdiff
path: root/UefiCpuPkg
diff options
context:
space:
mode:
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2012-05-02 02:23:18 +0000
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2012-05-02 02:23:18 +0000
commit3a69f7cbe7289fae061ce3d0facda254bf3c82e5 (patch)
tree12f371a87ed1d7b7190fdbc637e014ca27b9d6b0 /UefiCpuPkg
parent1d602b12ab937dde5f06f16a892bc54a0bf7ef30 (diff)
downloadedk2-platforms-3a69f7cbe7289fae061ce3d0facda254bf3c82e5.tar.xz
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
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r--UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
index 50b2f7bc0a..f176f9b52b 100644
--- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
+++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
@@ -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
//