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/Sec/SecEntryPoint.S | 7 +++---- ArmPlatformPkg/Sec/SecEntryPoint.asm | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'ArmPlatformPkg/Sec') diff --git a/ArmPlatformPkg/Sec/SecEntryPoint.S b/ArmPlatformPkg/Sec/SecEntryPoint.S index 4a8e9d68d4..6d3eb36531 100644 --- a/ArmPlatformPkg/Sec/SecEntryPoint.S +++ b/ArmPlatformPkg/Sec/SecEntryPoint.S @@ -86,11 +86,10 @@ _SetupPrimaryCoreStack: mov r3, sp mov r1, #0x0 _InitGlobals: - str r1, [r3], #4 cmp r3, r2 - bne _InitGlobals - - b _PrepareArguments + beq _PrepareArguments + str r1, [r3], #4 + b _InitGlobals _SetupSecondaryCoreStack: // Get the Core Position (ClusterId * 4) + CoreId diff --git a/ArmPlatformPkg/Sec/SecEntryPoint.asm b/ArmPlatformPkg/Sec/SecEntryPoint.asm index c3566f065e..fe36288360 100644 --- a/ArmPlatformPkg/Sec/SecEntryPoint.asm +++ b/ArmPlatformPkg/Sec/SecEntryPoint.asm @@ -88,11 +88,10 @@ _SetupPrimaryCoreStack mov r3, sp mov r1, #0x0 _InitGlobals - str r1, [r3], #4 cmp r3, r2 - bne _InitGlobals - - b _PrepareArguments + beq _PrepareArguments + str r1, [r3], #4 + b _InitGlobals _SetupSecondaryCoreStack // Get the Core Position (ClusterId * 4) + CoreId -- cgit v1.2.3