\r
#include <Base.h>\r
#include <Library/ArmLib.h>\r
+#include <Library/BaseLib.h>\r
#include <Library/DebugLib.h>\r
\r
STATIC ARM_MEMORY_REGION_DESCRIPTOR mVirtualMemoryTable[2];\r
\r
-EFI_PHYSICAL_ADDRESS\r
-ArmGetPhysAddrTop (\r
- VOID\r
- );\r
-\r
/**\r
Return the Virtual Memory Map of your platform\r
\r
OUT ARM_MEMORY_REGION_DESCRIPTOR **VirtualMemoryMap\r
)\r
{\r
+ EFI_PHYSICAL_ADDRESS TopOfAddressSpace;\r
+\r
ASSERT (VirtualMemoryMap != NULL);\r
\r
+ TopOfAddressSpace = LShiftU64 (1ULL, ArmGetPhysicalAddressBits ());\r
+\r
//\r
// Map the entire physical memory space as cached. The only device\r
// we care about is the GIC, which will be stage 2 mapped as a device\r
//\r
mVirtualMemoryTable[0].PhysicalBase = 0x0;\r
mVirtualMemoryTable[0].VirtualBase = 0x0;\r
- mVirtualMemoryTable[0].Length = ArmGetPhysAddrTop ();\r
+ mVirtualMemoryTable[0].Length = TopOfAddressSpace;\r
mVirtualMemoryTable[0].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK;\r
\r
mVirtualMemoryTable[1].PhysicalBase = 0x0;\r