summaryrefslogtreecommitdiff
path: root/OvmfPkg
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2014-03-04 08:02:30 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2014-03-04 08:02:30 +0000
commitbd386eaf86f1f55dd28d2c5b26a8c80b2a9002a8 (patch)
tree7c54107c9b18de34ee3d267182d7d38755a2e561 /OvmfPkg
parent8e54500fd48b56d8cf660c18656e10fe89ee3af7 (diff)
downloadedk2-platforms-bd386eaf86f1f55dd28d2c5b26a8c80b2a9002a8.tar.xz
OvmfPkg/PlatformPei: Skip various items for S3 resume
We will not be running DXE on S3 resume, so we don't need to do these initialization items: * Reserve EMU Variable memory range * Declare Firmware volumes * Add memory HOBs v5: * Move MiscInitialization back to running on S3 resume Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15295 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/PlatformPei/MemDetect.c16
-rw-r--r--OvmfPkg/PlatformPei/Platform.c8
2 files changed, 15 insertions, 9 deletions
diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetect.c
index 11c79687c4..c198c3846f 100644
--- a/OvmfPkg/PlatformPei/MemDetect.c
+++ b/OvmfPkg/PlatformPei/MemDetect.c
@@ -147,18 +147,22 @@ QemuInitializeRam (
LowerMemorySize = GetSystemMemorySizeBelow4gb ();
UpperMemorySize = GetSystemMemorySizeAbove4gb ();
- //
- // Create memory HOBs
- //
- AddMemoryRangeHob (BASE_1MB, LowerMemorySize);
- AddMemoryRangeHob (0, BASE_512KB + BASE_128KB);
+ if (mBootMode != BOOT_ON_S3_RESUME) {
+ //
+ // Create memory HOBs
+ //
+ AddMemoryRangeHob (BASE_1MB, LowerMemorySize);
+ AddMemoryRangeHob (0, BASE_512KB + BASE_128KB);
+ }
MtrrSetMemoryAttribute (BASE_1MB, LowerMemorySize - BASE_1MB, CacheWriteBack);
MtrrSetMemoryAttribute (0, BASE_512KB + BASE_128KB, CacheWriteBack);
if (UpperMemorySize != 0) {
- AddUntestedMemoryBaseSizeHob (BASE_4GB, UpperMemorySize);
+ if (mBootMode != BOOT_ON_S3_RESUME) {
+ AddUntestedMemoryBaseSizeHob (BASE_4GB, UpperMemorySize);
+ }
MtrrSetMemoryAttribute (BASE_4GB, UpperMemorySize, CacheWriteBack);
}
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
index 00c688d68a..11b4cb7a14 100644
--- a/OvmfPkg/PlatformPei/Platform.c
+++ b/OvmfPkg/PlatformPei/Platform.c
@@ -375,11 +375,13 @@ InitializePlatform (
InitializeXen ();
}
- ReserveEmuVariableNvStore ();
+ if (mBootMode != BOOT_ON_S3_RESUME) {
+ ReserveEmuVariableNvStore ();
- PeiFvInitialization ();
+ PeiFvInitialization ();
- MemMapInitialization ();
+ MemMapInitialization ();
+ }
MiscInitialization ();