#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
{\r
return FirstEntry & TT_ATTR_INDX_MASK;\r
} else {\r
- return TT_ATTR_INDX_INVALID;\r
+ return INVALID_ENTRY;\r
}\r
}\r
\r
// 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
(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
\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
&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