\r
#include <AsmMacroIoLibV8.h>\r
\r
-ASM_GLOBAL ASM_PFX(mSystemMemoryEnd)\r
-\r
ASM_FUNC(_ModuleEntryPoint)\r
// Do early platform specific actions\r
bl ASM_PFX(ArmPlatformPeiBootAction)\r
_SystemMemoryEndInit:\r
ldr x1, mSystemMemoryEnd\r
\r
- // Is mSystemMemoryEnd initialized?\r
- cmp x1, #0\r
- bne _SetupStackPosition\r
-\r
- MOV64 (x1, FixedPcdGet64(PcdSystemMemoryBase) + FixedPcdGet64(PcdSystemMemorySize) - 1)\r
-\r
- // Update the global variable\r
- adr x2, mSystemMemoryEnd\r
- str x1, [x2]\r
-\r
_SetupStackPosition:\r
// r1 = SystemMemoryTop\r
\r
\r
_NeverReturn:\r
b _NeverReturn\r
-\r
-ASM_PFX(mSystemMemoryEnd): .8byte 0\r