From: jljusten Date: Mon, 31 Oct 2011 15:58:18 +0000 (+0000) Subject: OvmfPkg/PlatformPei: Remove MtrrLib ASSERTs X-Git-Tag: edk2-stable201903~13986 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=27d7e63f456d8f7509094e28a1fbf626ba34efdf 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 --- 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;