diff options
author | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-03-10 02:38:39 +0000 |
---|---|---|
committer | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-03-10 02:38:39 +0000 |
commit | 947a573ada499a7b1533d91f015327cc07605ff7 (patch) | |
tree | 7f2160b9eea2428fa9d735b0f803d16f2ecf97e4 /UefiCpuPkg/CpuDxe | |
parent | c4ae2792f250bce176cf68ecdd64d4bf246c3fb0 (diff) | |
download | edk2-platforms-947a573ada499a7b1533d91f015327cc07605ff7.tar.xz |
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.c | 8 |
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);
|