summaryrefslogtreecommitdiff
path: root/UefiCpuPkg
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-31 06:45:56 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-31 06:45:56 +0000
commit2c4b1bdce7470ae20876f556c7e259910a6edb61 (patch)
treecad66d735fdf5a7d20fde8a3f25d953535c5548f /UefiCpuPkg
parentda27b950d58f94725c1164e34fb696c1cef4f29a (diff)
Roll back the change on GetMemorySpaceAttributeFromMtrrType()'s parameter type, from MTRR_MEMORY_CACHE_TYPE to UINT8 since MtrrAttributes may be the value not belongs to MTRR_MEMORY_CACHE_TYPE.
Signed-off-by: vanjeff git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12609 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r--UefiCpuPkg/CpuDxe/CpuDxe.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c
index c1eee028a..fab4ad23c 100644
--- a/UefiCpuPkg/CpuDxe/CpuDxe.c
+++ b/UefiCpuPkg/CpuDxe/CpuDxe.c
@@ -714,7 +714,7 @@ InitializeMtrrMask (
**/
UINT64
GetMemorySpaceAttributeFromMtrrType (
- IN MTRR_MEMORY_CACHE_TYPE MtrrAttributes
+ IN UINT8 MtrrAttributes
)
{
switch (MtrrAttributes) {
@@ -879,14 +879,14 @@ RefreshGcdMemoryAttributes (
UINT64 Length;
UINT64 Attributes;
UINT64 CurrentAttributes;
- MTRR_MEMORY_CACHE_TYPE MtrrType;
+ UINT8 MtrrType;
UINTN NumberOfDescriptors;
EFI_GCD_MEMORY_SPACE_DESCRIPTOR *MemorySpaceMap;
UINT64 DefaultAttributes;
VARIABLE_MTRR VariableMtrr[MTRR_NUMBER_OF_VARIABLE_MTRR];
MTRR_FIXED_SETTINGS MtrrFixedSettings;
UINT32 FirmwareVariableMtrrCount;
- MTRR_MEMORY_CACHE_TYPE DefaultMemoryType;
+ UINT8 DefaultMemoryType;
if (!IsMtrrSupported ()) {
return;
@@ -921,7 +921,7 @@ RefreshGcdMemoryAttributes (
);
ASSERT_EFI_ERROR (Status);
- DefaultMemoryType = MtrrGetDefaultMemoryType ();
+ DefaultMemoryType = (UINT8) MtrrGetDefaultMemoryType ();
DefaultAttributes = GetMemorySpaceAttributeFromMtrrType (DefaultMemoryType);
//
@@ -962,7 +962,7 @@ RefreshGcdMemoryAttributes (
if (VariableMtrr[Index].Valid &&
VariableMtrr[Index].Type != MTRR_CACHE_WRITE_BACK &&
VariableMtrr[Index].Type != MTRR_CACHE_UNCACHEABLE) {
- Attributes = GetMemorySpaceAttributeFromMtrrType ((MTRR_MEMORY_CACHE_TYPE) VariableMtrr[Index].Type);
+ Attributes = GetMemorySpaceAttributeFromMtrrType ((UINT8) VariableMtrr[Index].Type);
SetGcdMemorySpaceAttributes (
MemorySpaceMap,
NumberOfDescriptors,
@@ -1002,7 +1002,7 @@ RefreshGcdMemoryAttributes (
// Check for continuous fixed MTRR sections
//
for (SubIndex = 0; SubIndex < 8; SubIndex++) {
- MtrrType = (MTRR_MEMORY_CACHE_TYPE) RShiftU64 (RegValue, SubIndex * 8);
+ MtrrType = (UINT8) RShiftU64 (RegValue, SubIndex * 8);
CurrentAttributes = GetMemorySpaceAttributeFromMtrrType (MtrrType);
if (Length == 0) {
//