]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Roll back the change on GetMemorySpaceAttributeFromMtrrType()'s parameter type, from...
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 31 Oct 2011 06:45:56 +0000 (06:45 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 31 Oct 2011 06:45:56 +0000 (06:45 +0000)
Signed-off-by: vanjeff
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12609 6f19259b-4bc3-4df7-8a09-765794883524

UefiCpuPkg/CpuDxe/CpuDxe.c

index c1eee028aa4bb27e4d15d6ea85980ec50de4f415..fab4ad23cbdee5d804a1fdec417cb7bd862c0f34 100644 (file)
@@ -714,7 +714,7 @@ InitializeMtrrMask (
 **/\r
 UINT64\r
 GetMemorySpaceAttributeFromMtrrType (\r
-  IN MTRR_MEMORY_CACHE_TYPE  MtrrAttributes\r
+  IN UINT8                MtrrAttributes\r
   )\r
 {\r
   switch (MtrrAttributes) {\r
@@ -879,14 +879,14 @@ RefreshGcdMemoryAttributes (
   UINT64                              Length;\r
   UINT64                              Attributes;\r
   UINT64                              CurrentAttributes;\r
-  MTRR_MEMORY_CACHE_TYPE              MtrrType;\r
+  UINT8                               MtrrType;\r
   UINTN                               NumberOfDescriptors;\r
   EFI_GCD_MEMORY_SPACE_DESCRIPTOR     *MemorySpaceMap;\r
   UINT64                              DefaultAttributes;\r
   VARIABLE_MTRR                       VariableMtrr[MTRR_NUMBER_OF_VARIABLE_MTRR];\r
   MTRR_FIXED_SETTINGS                 MtrrFixedSettings;\r
   UINT32                              FirmwareVariableMtrrCount;\r
-  MTRR_MEMORY_CACHE_TYPE              DefaultMemoryType;\r
+  UINT8                               DefaultMemoryType;\r
 \r
   if (!IsMtrrSupported ()) {\r
     return;\r
@@ -921,7 +921,7 @@ RefreshGcdMemoryAttributes (
                   );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  DefaultMemoryType = MtrrGetDefaultMemoryType ();\r
+  DefaultMemoryType = (UINT8) MtrrGetDefaultMemoryType ();\r
   DefaultAttributes = GetMemorySpaceAttributeFromMtrrType (DefaultMemoryType);\r
 \r
   //\r
@@ -962,7 +962,7 @@ RefreshGcdMemoryAttributes (
     if (VariableMtrr[Index].Valid &&                          \r
         VariableMtrr[Index].Type != MTRR_CACHE_WRITE_BACK &&\r
         VariableMtrr[Index].Type != MTRR_CACHE_UNCACHEABLE) {\r
-      Attributes = GetMemorySpaceAttributeFromMtrrType ((MTRR_MEMORY_CACHE_TYPE) VariableMtrr[Index].Type);\r
+      Attributes = GetMemorySpaceAttributeFromMtrrType ((UINT8) VariableMtrr[Index].Type);\r
       SetGcdMemorySpaceAttributes (\r
         MemorySpaceMap,\r
         NumberOfDescriptors,\r
@@ -1002,7 +1002,7 @@ RefreshGcdMemoryAttributes (
     // Check for continuous fixed MTRR sections\r
     //\r
     for (SubIndex = 0; SubIndex < 8; SubIndex++) {\r
-      MtrrType = (MTRR_MEMORY_CACHE_TYPE) RShiftU64 (RegValue, SubIndex * 8);\r
+      MtrrType = (UINT8) RShiftU64 (RegValue, SubIndex * 8);\r
       CurrentAttributes = GetMemorySpaceAttributeFromMtrrType (MtrrType);\r
       if (Length == 0) {\r
         //\r