#include <Library/PcdLib.h>\r
#include <Library/DebugLib.h>\r
\r
-#define IS_XIP() (((UINT32)PcdGet32 (PcdFdBaseAddress) > (UINT32)(PcdGet32 (PcdSystemMemoryBase) + PcdGet32 (PcdSystemMemorySize))) || \\r
- ((PcdGet32 (PcdFdBaseAddress) + PcdGet32 (PcdFdSize)) < PcdGet32 (PcdSystemMemoryBase)))\r
+#define IS_XIP() (((UINT32)PcdGet32 (PcdFdBaseAddress) > (UINT32)(PcdGet64 (PcdSystemMemoryBase) + PcdGet64 (PcdSystemMemorySize))) || \\r
+ ((PcdGet32 (PcdFdBaseAddress) + PcdGet32 (PcdFdSize)) < PcdGet64 (PcdSystemMemoryBase)))\r
\r
// Declared by ArmPlatformPkg/PrePi Module\r
extern UINTN mGlobalVariableBase;\r
if (IS_XIP()) {\r
// In Case of XIP, we expect the Primary Stack at the top of the System Memory\r
// The size must be 64bit aligned to allow 64bit variable to be aligned\r
- GlobalVariableBase = PcdGet32 (PcdSystemMemoryBase) + PcdGet32 (PcdSystemMemorySize) - ALIGN_VALUE(PcdGet32 (PcdPeiGlobalVariableSize),0x8);\r
+ GlobalVariableBase = PcdGet64 (PcdSystemMemoryBase) + PcdGet64 (PcdSystemMemorySize) - ALIGN_VALUE(PcdGet32 (PcdPeiGlobalVariableSize),0x8);\r
} else {\r
GlobalVariableBase = mGlobalVariableBase;\r
}\r
if (IS_XIP()) {\r
// In Case of XIP, we expect the Primary Stack at the top of the System Memory\r
// The size must be 64bit aligned to allow 64bit variable to be aligned\r
- GlobalVariableBase = PcdGet32 (PcdSystemMemoryBase) + PcdGet32 (PcdSystemMemorySize) - ALIGN_VALUE(PcdGet32 (PcdPeiGlobalVariableSize),0x8);\r
+ GlobalVariableBase = PcdGet64 (PcdSystemMemoryBase) + PcdGet64 (PcdSystemMemorySize) - ALIGN_VALUE(PcdGet32 (PcdPeiGlobalVariableSize),0x8);\r
} else {\r
GlobalVariableBase = mGlobalVariableBase;\r
}\r
if (IS_XIP()) {\r
// In Case of XIP, we expect the Primary Stack at the top of the System Memory\r
// The size must be 64bit aligned to allow 64bit variable to be aligned\r
- GlobalVariableBase = PcdGet32 (PcdSystemMemoryBase) + PcdGet32 (PcdSystemMemorySize) - ALIGN_VALUE(PcdGet32 (PcdPeiGlobalVariableSize),0x8);\r
+ GlobalVariableBase = PcdGet64 (PcdSystemMemoryBase) + PcdGet64 (PcdSystemMemorySize) - ALIGN_VALUE(PcdGet32 (PcdPeiGlobalVariableSize),0x8);\r
} else {\r
GlobalVariableBase = mGlobalVariableBase;\r
}\r