diff options
author | Jun Nie <jun.nie@linaro.org> | 2018-10-04 12:28:19 +0800 |
---|---|---|
committer | Jun Nie <jun.nie@linaro.org> | 2018-10-04 12:32:33 +0800 |
commit | 166a91d6a7f0a2fbfdf1eea991b7389a1c7a23ad (patch) | |
tree | 99140d6b85e97b2a93f1a4fd33d8a733651ce4d7 | |
parent | a317857ced07da6708d1664e406f02470f96e520 (diff) |
Aarch32: fix register usage when setup stack
Avoid using clobbered register when setup stack. Otherwise, the
SVC mode is not recover and result wrong stack pointer.
Signed-off-by: Jun Nie <jun.nie@linaro.org>
-rw-r--r-- | plat/common/aarch32/platform_mp_stack.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plat/common/aarch32/platform_mp_stack.S b/plat/common/aarch32/platform_mp_stack.S index 1532f6e..897ad73 100644 --- a/plat/common/aarch32/platform_mp_stack.S +++ b/plat/common/aarch32/platform_mp_stack.S @@ -82,11 +82,11 @@ func platform_set_stack mov sp, r0 #if ARM_ARCH_MAJOR == 7 - mrs r2, cpsr + mrs r3, cpsr msr cpsr, #SPSR_ARMV7_IRQ get_mp_stack irq_stacks, IRQ_STACK_SIZE mov sp, r0 - msr cpsr, r2 + msr cpsr, r3 #endif bx r9 endfunc platform_set_stack |