Add Checking for MTRR existence.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10223 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -590,6 +590,10 @@ CpuSetMemoryAttributes (
|
||||
RETURN_STATUS Status;
|
||||
MTRR_MEMORY_CACHE_TYPE CacheType;
|
||||
|
||||
if (!IsMtrrSupported ()) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
DEBUG((EFI_D_ERROR, "CpuAp: SetMemorySpaceAttributes(BA=%08x, Len=%08x, Attr=%08x)\n", BaseAddress, Length, Attributes));
|
||||
|
||||
//
|
||||
@@ -856,6 +860,10 @@ RefreshGcdMemoryAttributes (
|
||||
MTRR_FIXED_SETTINGS MtrrFixedSettings;
|
||||
UINT32 FirmwareVariableMtrrCount;
|
||||
|
||||
if (!IsMtrrSupported ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
FirmwareVariableMtrrCount = GetFirmwareVariableMtrrCount ();
|
||||
ASSERT (FirmwareVariableMtrrCount <= MTRR_NUMBER_OF_VARIABLE_MTRR);
|
||||
|
||||
|
Reference in New Issue
Block a user