]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/PlatformPei: Remove MtrrLib ASSERTs
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 31 Oct 2011 15:58:18 +0000 (15:58 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 31 Oct 2011 15:58:18 +0000 (15:58 +0000)
QEMU doesn't support MTRR emulation in some cases,
and therefore the MtrrLib calls may return an error.
In that case, we should silently ignore the error.

Signed-off-by: jljusten
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12618 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/PlatformPei/MemDetect.c

index 5070c79c0da9be00a1e6165b7721568db8e55271..9f6ca1942e294d2ce01d5628b9aa5ecc429f79d1 100644 (file)
@@ -131,17 +131,14 @@ MemDetect (
   AddMemoryRangeHob (BASE_1MB, MemoryBase);\r
   AddMemoryRangeHob (0, BASE_512KB + BASE_128KB);\r
 \r
-  Status = MtrrSetMemoryAttribute (BASE_1MB, MemoryBase + MemorySize - BASE_1MB, CacheWriteBack);\r
-  ASSERT_EFI_ERROR(Status);\r
+  MtrrSetMemoryAttribute (BASE_1MB, MemoryBase + MemorySize - BASE_1MB, CacheWriteBack);\r
 \r
-  Status = MtrrSetMemoryAttribute (0, BASE_512KB + BASE_128KB, CacheWriteBack);\r
-  ASSERT_EFI_ERROR(Status);\r
+  MtrrSetMemoryAttribute (0, BASE_512KB + BASE_128KB, CacheWriteBack);\r
 \r
   if (UpperMemorySize != 0) {\r
     AddUntestedMemoryBaseSizeHob (BASE_4GB, UpperMemorySize);\r
 \r
-    Status = MtrrSetMemoryAttribute (BASE_4GB, UpperMemorySize, CacheWriteBack);\r
-    ASSERT_EFI_ERROR(Status);\r
+    MtrrSetMemoryAttribute (BASE_4GB, UpperMemorySize, CacheWriteBack);\r
   }\r
 \r
   return MemoryBase + MemorySize;\r