summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-11-09 11:52:37 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-11-09 11:52:37 +0000
commit5f5b907c0dd693d2ba64e4727734bdf39604c0a8 (patch)
tree743abc4785e3950fb944a0c30989be4d6dbf7bcd /ArmPlatformPkg
parent008d25427c5b33e399075dde88bd3667ae3a104d (diff)
downloadedk2-platforms-5f5b907c0dd693d2ba64e4727734bdf39604c0a8.tar.xz
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
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r--ArmPlatformPkg/PrePeiCore/PrePeiCoreEntryPoint.S5
-rw-r--r--ArmPlatformPkg/PrePeiCore/PrePeiCoreEntryPoint.asm5
-rwxr-xr-xArmPlatformPkg/PrePi/ModuleEntryPoint.S6
-rw-r--r--ArmPlatformPkg/PrePi/ModuleEntryPoint.asm6
-rw-r--r--ArmPlatformPkg/Sec/SecEntryPoint.S7
-rw-r--r--ArmPlatformPkg/Sec/SecEntryPoint.asm7
6 files changed, 18 insertions, 18 deletions
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreEntryPoint.S b/ArmPlatformPkg/PrePeiCore/PrePeiCoreEntryPoint.S
index 0edcee2f14..261f6e554a 100644
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreEntryPoint.S
+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreEntryPoint.S
@@ -70,9 +70,10 @@ _SetupPrimaryCoreStack:
mov r3, sp
mov r1, #0x0
_InitGlobals:
- str r1, [r3], #4
cmp r3, r2
- bne _InitGlobals
+ beq _PrepareArguments
+ str r1, [r3], #4
+ b _InitGlobals
_PrepareArguments:
// The PEI Core Entry Point has been computed by GenFV and stored in the second entry of the Reset Vector
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreEntryPoint.asm b/ArmPlatformPkg/PrePeiCore/PrePeiCoreEntryPoint.asm
index f6d84b5f26..ce3be2772b 100644
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreEntryPoint.asm
+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreEntryPoint.asm
@@ -72,9 +72,10 @@ _SetupPrimaryCoreStack
mov r3, sp
mov r1, #0x0
_InitGlobals
- str r1, [r3], #4
cmp r3, r2
- bne _InitGlobals
+ beq _PrepareArguments
+ str r1, [r3], #4
+ b _InitGlobals
_PrepareArguments
// The PEI Core Entry Point has been computed by GenFV and stored in the second entry of the Reset Vector
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
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