ArmPlatformPkg: Updated the stack setup to have the same geometry between the Secure and Normal World

Having a similar setup reduces the error during the MPCore stack setup.
The stack setup is described on this wikipage:
https://sourceforge.net/apps/mediawiki/tianocore/index.php?title=ArmPlatformPkg/Stack



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13058 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
oliviermartin
2012-02-28 17:23:53 +00:00
parent 2569b06868
commit 1377db63ff
8 changed files with 169 additions and 186 deletions

View File

@ -2,6 +2,7 @@
Macros to work around lack of Apple support for LDR register, =expr
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@ -132,7 +133,16 @@
and Tmp, GlobalSize, #7 ; \
rsbne Tmp, Tmp, #8 ; \
add GlobalSize, GlobalSize, Tmp ; \
sub sp, StackTop, GlobalSize
sub sp, StackTop, GlobalSize ; \
; \
mov Tmp, sp ; \
mov GlobalSize, #0x0 ; \
_SetPrimaryStackInitGlobals: ; \
cmp Tmp, StackTop ; \
beq _SetPrimaryStackEnd ; \
str GlobalSize, [Tmp], #4 ; \
b _SetPrimaryStackInitGlobals ; \
_SetPrimaryStackEnd:
#elif defined (__GNUC__)
@ -192,7 +202,16 @@
and Tmp, GlobalSize, #7 ; \
rsbne Tmp, Tmp, #8 ; \
add GlobalSize, GlobalSize, Tmp ; \
sub sp, StackTop, GlobalSize
sub sp, StackTop, GlobalSize ; \
; \
mov Tmp, sp ; \
mov GlobalSize, #0x0 ; \
_SetPrimaryStackInitGlobals: ; \
cmp Tmp, StackTop ; \
beq _SetPrimaryStackEnd ; \
str GlobalSize, [Tmp], #4 ; \
b _SetPrimaryStackInitGlobals ; \
_SetPrimaryStackEnd:
#else