diff options
author | Jeenu Viswambharan <jeenu.viswambharan@arm.com> | 2017-07-20 16:42:50 +0100 |
---|---|---|
committer | Jeenu Viswambharan <jeenu.viswambharan@arm.com> | 2017-08-01 14:33:47 +0100 |
commit | eecdf19b73fb9458915fb21ea74ba8aa96e90b36 (patch) | |
tree | f46ea94a1ba236b189d8f0e2679e08efdcc82a03 /plat/common | |
parent | 5e2cbb361e28968d26bbb0c3efd541ff543785cc (diff) |
FVP: Fix AArch32 stack functions to be ABI-compliant
plat_get_my_stack is called from C, so it can't expect argument
registers to be preserved. Stash registers temporarily onto the stack
instead.
plat_set_my_stack is called during early init, when there exists no
stack. Use any register other than argument registers to stash temporary
values.
Change-Id: I98052e20671d0933201d45ec7a5affccd71ce08c
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Diffstat (limited to 'plat/common')
-rw-r--r-- | plat/common/aarch32/platform_mp_stack.S | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plat/common/aarch32/platform_mp_stack.S b/plat/common/aarch32/platform_mp_stack.S index e43047e5..6c3d08de 100644 --- a/plat/common/aarch32/platform_mp_stack.S +++ b/plat/common/aarch32/platform_mp_stack.S @@ -19,9 +19,9 @@ * ----------------------------------------------------- */ func plat_get_my_stack - mov r3, lr + push {r4, lr} get_my_mp_stack platform_normal_stacks, PLATFORM_STACK_SIZE - bx r3 + pop {r4, pc} endfunc plat_get_my_stack /* ----------------------------------------------------- @@ -32,10 +32,10 @@ endfunc plat_get_my_stack * ----------------------------------------------------- */ func plat_set_my_stack - mov r3, lr + mov r4, lr get_my_mp_stack platform_normal_stacks, PLATFORM_STACK_SIZE mov sp, r0 - bx r3 + bx r4 endfunc plat_set_my_stack /* ----------------------------------------------------- |