summaryrefslogtreecommitdiff
path: root/UefiCpuPkg/CpuDxe
diff options
context:
space:
mode:
Diffstat (limited to 'UefiCpuPkg/CpuDxe')
-rw-r--r--UefiCpuPkg/CpuDxe/CpuDxe.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c
index 457823d5cd..e3b21d8463 100644
--- a/UefiCpuPkg/CpuDxe/CpuDxe.c
+++ b/UefiCpuPkg/CpuDxe/CpuDxe.c
@@ -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);