summaryrefslogtreecommitdiff
path: root/UefiCpuPkg/CpuDxe
diff options
context:
space:
mode:
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-10 02:38:39 +0000
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-10 02:38:39 +0000
commit947a573ada499a7b1533d91f015327cc07605ff7 (patch)
tree7f2160b9eea2428fa9d735b0f803d16f2ecf97e4 /UefiCpuPkg/CpuDxe
parentc4ae2792f250bce176cf68ecdd64d4bf246c3fb0 (diff)
downloadedk2-947a573ada499a7b1533d91f015327cc07605ff7.zip
edk2-947a573ada499a7b1533d91f015327cc07605ff7.tar.gz
edk2-947a573ada499a7b1533d91f015327cc07605ff7.tar.bz2
Add Checking for MTRR existence.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10223 6f19259b-4bc3-4df7-8a09-765794883524
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 457823d..e3b21d8 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);