X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=ArmVirtPkg%2FLibrary%2FXenVirtMemInfoLib%2FXenVirtMemInfoLib.c;h=d40aad7804215fd6d704f4dec415f9347e72a724;hp=88ff3167cbfd4926049fb9414895686f3c01bc96;hb=2f9b248af82073aed40c0b86d9f9d7074f5fa36a;hpb=95d04ebca8be8f71a23e85a2f4822ba90a2e32cc diff --git a/ArmVirtPkg/Library/XenVirtMemInfoLib/XenVirtMemInfoLib.c b/ArmVirtPkg/Library/XenVirtMemInfoLib/XenVirtMemInfoLib.c index 88ff3167cb..d40aad7804 100644 --- a/ArmVirtPkg/Library/XenVirtMemInfoLib/XenVirtMemInfoLib.c +++ b/ArmVirtPkg/Library/XenVirtMemInfoLib/XenVirtMemInfoLib.c @@ -14,15 +14,11 @@ #include #include +#include #include STATIC ARM_MEMORY_REGION_DESCRIPTOR mVirtualMemoryTable[2]; -EFI_PHYSICAL_ADDRESS -ArmGetPhysAddrTop ( - VOID - ); - /** Return the Virtual Memory Map of your platform @@ -42,8 +38,12 @@ ArmVirtGetMemoryMap ( OUT ARM_MEMORY_REGION_DESCRIPTOR **VirtualMemoryMap ) { + EFI_PHYSICAL_ADDRESS TopOfAddressSpace; + ASSERT (VirtualMemoryMap != NULL); + TopOfAddressSpace = LShiftU64 (1ULL, ArmGetPhysicalAddressBits ()); + // // Map the entire physical memory space as cached. The only device // we care about is the GIC, which will be stage 2 mapped as a device @@ -51,7 +51,7 @@ ArmVirtGetMemoryMap ( // mVirtualMemoryTable[0].PhysicalBase = 0x0; mVirtualMemoryTable[0].VirtualBase = 0x0; - mVirtualMemoryTable[0].Length = ArmGetPhysAddrTop (); + mVirtualMemoryTable[0].Length = TopOfAddressSpace; mVirtualMemoryTable[0].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK; mVirtualMemoryTable[1].PhysicalBase = 0x0;