\r
#include <Chipset/ArmV7.h>\r
\r
-GCC_ASM_EXPORT(mSystemMemoryEnd)\r
-\r
ASM_FUNC(_ModuleEntryPoint)\r
// Do early platform specific actions\r
bl ASM_PFX(ArmPlatformPeiBootAction)\r
// to install the stacks at the bottom of the Firmware Device (case the FD is located\r
// at the top of the DRAM)\r
_SystemMemoryEndInit:\r
- ldr r1, mSystemMemoryEnd\r
-\r
- // Is mSystemMemoryEnd initialized?\r
- cmp r1, #0\r
- bne _SetupStackPosition\r
-\r
- MOV32 (r1, FixedPcdGet32(PcdSystemMemoryBase) + FixedPcdGet32(PcdSystemMemorySize) - 1)\r
-\r
- // Update the global variable\r
- adr r2, mSystemMemoryEnd\r
- str r1, [r2]\r
+ ADRL (r1, mSystemMemoryEnd)\r
+ ldrd r2, r3, [r1]\r
+ teq r3, #0\r
+ moveq r1, r2\r
+ mvnne r1, #0\r
\r
_SetupStackPosition:\r
// r1 = SystemMemoryTop\r
\r
_NeverReturn:\r
b _NeverReturn\r
-\r
-ASM_PFX(mSystemMemoryEnd): .8byte 0\r