From 5f5b907c0dd693d2ba64e4727734bdf39604c0a8 Mon Sep 17 00:00:00 2001 From: oliviermartin Date: Wed, 9 Nov 2011 11:52:37 +0000 Subject: ArmPlatformPkg: Fix Global Variable region initialization when GlobalVariable's size is zero The exit loop was not considering a size of zero for the Global Variable region. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12678 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPlatformPkg/PrePi/ModuleEntryPoint.S | 6 +++--- ArmPlatformPkg/PrePi/ModuleEntryPoint.asm | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'ArmPlatformPkg/PrePi') diff --git a/ArmPlatformPkg/PrePi/ModuleEntryPoint.S b/ArmPlatformPkg/PrePi/ModuleEntryPoint.S index ed44710a60..75728c983f 100755 --- a/ArmPlatformPkg/PrePi/ModuleEntryPoint.S +++ b/ArmPlatformPkg/PrePi/ModuleEntryPoint.S @@ -127,10 +127,10 @@ _SetGlobals: mov r3, sp mov r2, #0x0 _InitGlobals: - str r2, [r3], #4 cmp r3, r1 - bne _InitGlobals - + beq _PrepareArguments + str r2, [r3], #4 + b _InitGlobals _PrepareArguments: mov r0, r5 diff --git a/ArmPlatformPkg/PrePi/ModuleEntryPoint.asm b/ArmPlatformPkg/PrePi/ModuleEntryPoint.asm index 0f14d498d7..5392e80925 100644 --- a/ArmPlatformPkg/PrePi/ModuleEntryPoint.asm +++ b/ArmPlatformPkg/PrePi/ModuleEntryPoint.asm @@ -128,10 +128,10 @@ _SetGlobals mov r3, sp mov r2, #0x0 _InitGlobals - str r2, [r3], #4 cmp r3, r1 - bne _InitGlobals - + beq _PrepareArguments + str r2, [r3], #4 + b _InitGlobals _PrepareArguments mov r0, r5 -- cgit v1.2.3