VOID* TranslationTable;\r
VOID* TranslationTableBuffer;\r
UINT32 TranslationTableAttribute;\r
- ARM_MEMORY_REGION_DESCRIPTOR *MemoryTableEntry;\r
UINT64 MaxAddress;\r
- UINT64 TopAddress;\r
UINTN T0SZ;\r
UINTN RootTableEntryCount;\r
UINTN RootTableEntrySize;\r
return RETURN_INVALID_PARAMETER;\r
}\r
\r
- // Identify the highest address of the memory table\r
- MaxAddress = MemoryTable->PhysicalBase + MemoryTable->Length - 1;\r
- MemoryTableEntry = MemoryTable;\r
- while (MemoryTableEntry->Length != 0) {\r
- TopAddress = MemoryTableEntry->PhysicalBase + MemoryTableEntry->Length - 1;\r
- if (TopAddress > MaxAddress) {\r
- MaxAddress = TopAddress;\r
- }\r
- MemoryTableEntry++;\r
- }\r
+ // Cover the entire GCD memory space\r
+ MaxAddress = (1UL << PcdGet8 (PcdPrePiCpuMemorySize)) - 1;\r
\r
// Lookup the Table Level to get the information\r
LookupAddresstoRootTable (MaxAddress, &T0SZ, &RootTableEntryCount);\r