mirror of https://github.com/acidanthera/audk.git
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:
parent
7538d53684
commit
27d7e63f45
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue