summaryrefslogtreecommitdiff
path: root/OvmfPkg/PlatformPei/MemDetect.c
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-31 15:58:18 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-31 15:58:18 +0000
commit27d7e63f456d8f7509094e28a1fbf626ba34efdf (patch)
tree3e6639fe02d8e66cba2ab4cf0912e2afd2f6e22f /OvmfPkg/PlatformPei/MemDetect.c
parent7538d53684792266c37e91f11a3ce2b7fb1e32d9 (diff)
downloadedk2-platforms-27d7e63f456d8f7509094e28a1fbf626ba34efdf.tar.xz
OvmfPkg/PlatformPei: Remove MtrrLib ASSERTs
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
Diffstat (limited to 'OvmfPkg/PlatformPei/MemDetect.c')
-rw-r--r--OvmfPkg/PlatformPei/MemDetect.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetect.c
index 5070c79c0d..9f6ca1942e 100644
--- a/OvmfPkg/PlatformPei/MemDetect.c
+++ b/OvmfPkg/PlatformPei/MemDetect.c
@@ -131,17 +131,14 @@ MemDetect (
AddMemoryRangeHob (BASE_1MB, MemoryBase);
AddMemoryRangeHob (0, BASE_512KB + BASE_128KB);
- Status = MtrrSetMemoryAttribute (BASE_1MB, MemoryBase + MemorySize - BASE_1MB, CacheWriteBack);
- ASSERT_EFI_ERROR(Status);
+ MtrrSetMemoryAttribute (BASE_1MB, MemoryBase + MemorySize - BASE_1MB, CacheWriteBack);
- Status = MtrrSetMemoryAttribute (0, BASE_512KB + BASE_128KB, CacheWriteBack);
- ASSERT_EFI_ERROR(Status);
+ MtrrSetMemoryAttribute (0, BASE_512KB + BASE_128KB, CacheWriteBack);
if (UpperMemorySize != 0) {
AddUntestedMemoryBaseSizeHob (BASE_4GB, UpperMemorySize);
- Status = MtrrSetMemoryAttribute (BASE_4GB, UpperMemorySize, CacheWriteBack);
- ASSERT_EFI_ERROR(Status);
+ MtrrSetMemoryAttribute (BASE_4GB, UpperMemorySize, CacheWriteBack);
}
return MemoryBase + MemorySize;