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
mov r3, sp\r
mov r1, #0x0\r
_InitGlobals:\r
- str r1, [r3], #4\r
cmp r3, r2\r
- bne _InitGlobals\r
+ beq _PrepareArguments\r
+ str r1, [r3], #4\r
+ b _InitGlobals\r
\r
_PrepareArguments:\r
// The PEI Core Entry Point has been computed by GenFV and stored in the second entry of the Reset Vector\r
mov r3, sp\r
mov r1, #0x0\r
_InitGlobals\r
- str r1, [r3], #4\r
cmp r3, r2\r
- bne _InitGlobals\r
+ beq _PrepareArguments\r
+ str r1, [r3], #4\r
+ b _InitGlobals\r
\r
_PrepareArguments\r
// The PEI Core Entry Point has been computed by GenFV and stored in the second entry of the Reset Vector\r
mov r3, sp\r
mov r2, #0x0\r
_InitGlobals:\r
- str r2, [r3], #4\r
cmp r3, r1\r
- bne _InitGlobals\r
-\r
+ beq _PrepareArguments\r
+ str r2, [r3], #4\r
+ b _InitGlobals\r
\r
_PrepareArguments:\r
mov r0, r5\r
mov r3, sp\r
mov r2, #0x0\r
_InitGlobals\r
- str r2, [r3], #4\r
cmp r3, r1\r
- bne _InitGlobals\r
-\r
+ beq _PrepareArguments\r
+ str r2, [r3], #4\r
+ b _InitGlobals\r
\r
_PrepareArguments\r
mov r0, r5\r
mov r3, sp\r
mov r1, #0x0\r
_InitGlobals:\r
- str r1, [r3], #4\r
cmp r3, r2\r
- bne _InitGlobals\r
-\r
- b _PrepareArguments\r
+ beq _PrepareArguments\r
+ str r1, [r3], #4\r
+ b _InitGlobals\r
\r
_SetupSecondaryCoreStack:\r
// Get the Core Position (ClusterId * 4) + CoreId\r
mov r3, sp\r
mov r1, #0x0\r
_InitGlobals\r
- str r1, [r3], #4\r
cmp r3, r2\r
- bne _InitGlobals\r
-\r
- b _PrepareArguments\r
+ beq _PrepareArguments\r
+ str r1, [r3], #4\r
+ b _InitGlobals\r
\r
_SetupSecondaryCoreStack\r
// Get the Core Position (ClusterId * 4) + CoreId\r