]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
ArmPkg: rename misleading local #define in CpuDxe
[mirror_edk2.git] / ArmPkg / Drivers / CpuDxe / AArch64 / Mmu.c
index 29fa08f9e07c0eb2844531015eb3a839e7f84379..fca2d4f7638a0d3c355a2a35dfb90f772b8785ad 100644 (file)
@@ -13,7 +13,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <Library/MemoryAllocationLib.h>\r
 #include "CpuDxe.h"\r
 \r
-#define TT_ATTR_INDX_INVALID    ((UINT32)~0)\r
+#define INVALID_ENTRY   ((UINT32)~0)\r
 \r
 #define MIN_T0SZ        16\r
 #define BITS_PER_LEVEL  9\r
@@ -98,7 +98,7 @@ GetFirstPageAttribute (
   {\r
     return FirstEntry & TT_ATTR_INDX_MASK;\r
   } else {\r
-    return TT_ATTR_INDX_INVALID;\r
+    return INVALID_ENTRY;\r
   }\r
 }\r
 \r
@@ -139,8 +139,8 @@ GetNextEntryAttribute (
     // If Entry is a Table Descriptor type entry then go through the sub-level table\r
     if ((EntryType == TT_TYPE_BLOCK_ENTRY) ||\r
         ((TableLevel == 3) && (EntryType == TT_TYPE_BLOCK_ENTRY_LEVEL3))) {\r
-      if ((*PrevEntryAttribute == TT_ATTR_INDX_INVALID) || (EntryAttribute != *PrevEntryAttribute)) {\r
-        if (*PrevEntryAttribute != TT_ATTR_INDX_INVALID) {\r
+      if ((*PrevEntryAttribute == INVALID_ENTRY) || (EntryAttribute != *PrevEntryAttribute)) {\r
+        if (*PrevEntryAttribute != INVALID_ENTRY) {\r
           // Update GCD with the last region\r
           SetGcdMemorySpaceAttributes (MemorySpaceMap, NumberOfDescriptors,\r
               *StartGcdRegion,\r
@@ -164,7 +164,7 @@ GetNextEntryAttribute (
                              (BaseAddress + (Index * TT_ADDRESS_AT_LEVEL(TableLevel))),\r
                              PrevEntryAttribute, StartGcdRegion);\r
     } else {\r
-      if (*PrevEntryAttribute != TT_ATTR_INDX_INVALID) {\r
+      if (*PrevEntryAttribute != INVALID_ENTRY) {\r
         // Update GCD with the last region\r
         SetGcdMemorySpaceAttributes (MemorySpaceMap, NumberOfDescriptors,\r
             *StartGcdRegion,\r
@@ -173,7 +173,7 @@ GetNextEntryAttribute (
 \r
         // Start of the new region\r
         *StartGcdRegion = BaseAddress + (Index * TT_ADDRESS_AT_LEVEL(TableLevel));\r
-        *PrevEntryAttribute = TT_ATTR_INDX_INVALID;\r
+        *PrevEntryAttribute = INVALID_ENTRY;\r
       }\r
     }\r
   }\r
@@ -238,7 +238,7 @@ SyncCacheConfig (
                                                &PageAttribute, &BaseAddressGcdRegion);\r
 \r
   // Update GCD with the last region if valid\r
-  if (PageAttribute != TT_ATTR_INDX_INVALID) {\r
+  if (PageAttribute != INVALID_ENTRY) {\r
     SetGcdMemorySpaceAttributes (MemorySpaceMap, NumberOfDescriptors,\r
         BaseAddressGcdRegion,\r
         EndAddressGcdRegion - BaseAddressGcdRegion,\r