\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
\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
IMPORT ArmReadMpidr\r
IMPORT ArmPlatformPeiBootAction\r
IMPORT ArmPlatformStackSet\r
+ IMPORT mSystemMemoryEnd\r
\r
EXPORT _ModuleEntryPoint\r
- EXPORT mSystemMemoryEnd\r
\r
PRESERVE8\r
AREA PrePiCoreEntryPoint, CODE, READONLY\r
\r
StartupAddr DCD CEntryPoint\r
-mSystemMemoryEnd DCQ 0\r
\r
_ModuleEntryPoint\r
// Do early platform specific actions\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)\r
- mov32 r2, FixedPcdGet32(PcdSystemMemorySize)\r
- sub r2, r2, #1\r
- add r1, r1, r2\r
- // Update the global variable\r
- adr r2, mSystemMemoryEnd\r
- str r1, [r2]\r
+ mov32 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
#define IS_XIP() (((UINT64)FixedPcdGet64 (PcdFdBaseAddress) > mSystemMemoryEnd) || \\r
((FixedPcdGet64 (PcdFdBaseAddress) + FixedPcdGet32 (PcdFdSize)) < FixedPcdGet64 (PcdSystemMemoryBase)))\r
\r
+UINT64 mSystemMemoryEnd = FixedPcdGet64(PcdSystemMemoryBase) +\r
+ FixedPcdGet64(PcdSystemMemorySize) - 1;\r
+\r
EFI_STATUS\r
EFIAPI\r
ExtractGuidedSectionLibConstructor (\r