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
This commit is contained in:
jljusten 2011-10-31 15:58:18 +00:00
parent 7538d53684
commit 27d7e63f45
1 changed files with 3 additions and 6 deletions

View File

@ -131,17 +131,14 @@ MemDetect (
AddMemoryRangeHob (BASE_1MB, MemoryBase); AddMemoryRangeHob (BASE_1MB, MemoryBase);
AddMemoryRangeHob (0, BASE_512KB + BASE_128KB); AddMemoryRangeHob (0, BASE_512KB + BASE_128KB);
Status = MtrrSetMemoryAttribute (BASE_1MB, MemoryBase + MemorySize - BASE_1MB, CacheWriteBack); MtrrSetMemoryAttribute (BASE_1MB, MemoryBase + MemorySize - BASE_1MB, CacheWriteBack);
ASSERT_EFI_ERROR(Status);
Status = MtrrSetMemoryAttribute (0, BASE_512KB + BASE_128KB, CacheWriteBack); MtrrSetMemoryAttribute (0, BASE_512KB + BASE_128KB, CacheWriteBack);
ASSERT_EFI_ERROR(Status);
if (UpperMemorySize != 0) { if (UpperMemorySize != 0) {
AddUntestedMemoryBaseSizeHob (BASE_4GB, UpperMemorySize); AddUntestedMemoryBaseSizeHob (BASE_4GB, UpperMemorySize);
Status = MtrrSetMemoryAttribute (BASE_4GB, UpperMemorySize, CacheWriteBack); MtrrSetMemoryAttribute (BASE_4GB, UpperMemorySize, CacheWriteBack);
ASSERT_EFI_ERROR(Status);
} }
return MemoryBase + MemorySize; return MemoryBase + MemorySize;