X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ArmPlatformPkg%2FPrePi%2FArm%2FModuleEntryPoint.S;fp=ArmPlatformPkg%2FPrePi%2FArm%2FModuleEntryPoint.S;h=212cab62d44b28de71a420057f7fe67b6806ef3d;hb=4aae7419eeba36dfca48ecb59677a1ab27cffbb0;hp=39030da5f2c3d2be26dc7fe1f0f70df1f7df7d0a;hpb=5b005a6b322feea8be7303ad50a09cecfecdbaba;p=mirror_edk2.git diff --git a/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S b/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S index 39030da5f2..212cab62d4 100644 --- a/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S +++ b/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S @@ -15,8 +15,6 @@ #include -GCC_ASM_EXPORT(mSystemMemoryEnd) - ASM_FUNC(_ModuleEntryPoint) // Do early platform specific actions bl ASM_PFX(ArmPlatformPeiBootAction) @@ -35,17 +33,11 @@ _SetSVCMode: // to install the stacks at the bottom of the Firmware Device (case the FD is located // at the top of the DRAM) _SystemMemoryEndInit: - ldr r1, mSystemMemoryEnd - - // Is mSystemMemoryEnd initialized? - cmp r1, #0 - bne _SetupStackPosition - - MOV32 (r1, FixedPcdGet32(PcdSystemMemoryBase) + FixedPcdGet32(PcdSystemMemorySize) - 1) - - // Update the global variable - adr r2, mSystemMemoryEnd - str r1, [r2] + ADRL (r1, mSystemMemoryEnd) + ldrd r2, r3, [r1] + teq r3, #0 + moveq r1, r2 + mvnne r1, #0 _SetupStackPosition: // r1 = SystemMemoryTop @@ -136,5 +128,3 @@ _PrepareArguments: _NeverReturn: b _NeverReturn - -ASM_PFX(mSystemMemoryEnd): .8byte 0