Revision: 17721
          http://sourceforge.net/p/edk2/code/17721
Author:   lersek
Date:     2015-06-26 16:09:48 +0000 (Fri, 26 Jun 2015)
Log Message:
-----------
OvmfPkg: PlatformPei: beautify memory HOB order in QemuInitializeRam()

Build the memory HOBs in a tight block, in increasing base address order.

Cc: Maoming <[email protected]>
Cc: Huangpeng (Peter) <[email protected]>
Cc: Wei Liu <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <[email protected]>
Tested-by: Maoming <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>

Modified Paths:
--------------
    trunk/edk2/OvmfPkg/PlatformPei/MemDetect.c

Modified: trunk/edk2/OvmfPkg/PlatformPei/MemDetect.c
===================================================================
--- trunk/edk2/OvmfPkg/PlatformPei/MemDetect.c  2015-06-26 16:09:43 UTC (rev 
17720)
+++ trunk/edk2/OvmfPkg/PlatformPei/MemDetect.c  2015-06-26 16:09:48 UTC (rev 
17721)
@@ -265,8 +265,11 @@
     //
     // Create memory HOBs
     //
+    AddMemoryRangeHob (0, BASE_512KB + BASE_128KB);
     AddMemoryRangeHob (BASE_1MB, LowerMemorySize);
-    AddMemoryRangeHob (0, BASE_512KB + BASE_128KB);
+    if (UpperMemorySize != 0) {
+      AddUntestedMemoryBaseSizeHob (BASE_4GB, UpperMemorySize);
+    }
   }
 
   MtrrSetMemoryAttribute (BASE_1MB, LowerMemorySize - BASE_1MB, 
CacheWriteBack);
@@ -274,10 +277,6 @@
   MtrrSetMemoryAttribute (0, BASE_512KB + BASE_128KB, CacheWriteBack);
 
   if (UpperMemorySize != 0) {
-    if (mBootMode != BOOT_ON_S3_RESUME) {
-      AddUntestedMemoryBaseSizeHob (BASE_4GB, UpperMemorySize);
-    }
-
     MtrrSetMemoryAttribute (BASE_4GB, UpperMemorySize, CacheWriteBack);
   }
 }


------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to