]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg: Fix Global Variable region initialization when GlobalVariable's size...
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 9 Nov 2011 11:52:37 +0000 (11:52 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 9 Nov 2011 11:52:37 +0000 (11:52 +0000)
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/PrePeiCore/PrePeiCoreEntryPoint.S
ArmPlatformPkg/PrePeiCore/PrePeiCoreEntryPoint.asm
ArmPlatformPkg/PrePi/ModuleEntryPoint.S
ArmPlatformPkg/PrePi/ModuleEntryPoint.asm
ArmPlatformPkg/Sec/SecEntryPoint.S
ArmPlatformPkg/Sec/SecEntryPoint.asm

index 0edcee2f14e9dd35022f26aa52b519c3494d2554..261f6e554a83d9dfb6365d0c76cbe47dfc46829a 100644 (file)
@@ -70,9 +70,10 @@ _SetupPrimaryCoreStack:
   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
index f6d84b5f26e9cda2bccab9e6e59580dfa1f1cbc1..ce3be2772ba44a88dc80050751abcbfdd6822965 100644 (file)
@@ -72,9 +72,10 @@ _SetupPrimaryCoreStack
   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
index ed44710a60e8ab12e1d3b8f6cd6df5882e7f8ead..75728c983fef016ac03f33ad8cbcda7dc07d246b 100755 (executable)
@@ -127,10 +127,10 @@ _SetGlobals:
   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
index 0f14d498d78d406f33f27326cc71f4809ec8bc66..5392e80925ab645163688c618dc58b035f5a80e3 100644 (file)
@@ -128,10 +128,10 @@ _SetGlobals
   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
index 4a8e9d68d434acace740bd5dcfdd536942720d43..6d3eb365319a8a9085c70ffb2517d463bf5510e9 100644 (file)
@@ -86,11 +86,10 @@ _SetupPrimaryCoreStack:
   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
index c3566f065e621f27f174a767ce2936e9435767bb..fe362883607e1b5b85700d681f67410c9228fcf1 100644 (file)
@@ -88,11 +88,10 @@ _SetupPrimaryCoreStack
   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