diff options
author | Soby Mathew <soby.mathew@arm.com> | 2016-12-06 12:10:51 +0000 |
---|---|---|
committer | Soby Mathew <soby.mathew@arm.com> | 2016-12-12 17:57:37 +0000 |
commit | 9f3ee61c904e4b6d2038086718c5ec4237d544a8 (patch) | |
tree | a07820ccf5f8a93356566fec4b98fd1ae3a671ee /lib/el3_runtime | |
parent | 919ad05ecb8fab23f91a37783dc5f246847c7bd2 (diff) |
AArch32: Fix the stack alignment issue
The AArch32 Procedure call Standard mandates that the stack must be aligned
to 8 byte boundary at external interfaces. This patch does the required
changes.
This problem was detected when a crash was encountered in
`psci_print_power_domain_map()` while printing 64 bit values. Aligning
the stack to 8 byte boundary resolved the problem.
Fixes ARM-Software/tf-issues#437
Change-Id: I517bd8203601bb88e9311bd36d477fb7b3efb292
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Diffstat (limited to 'lib/el3_runtime')
-rw-r--r-- | lib/el3_runtime/aarch32/cpu_data.S | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/el3_runtime/aarch32/cpu_data.S b/lib/el3_runtime/aarch32/cpu_data.S index b97911fb..2de9029b 100644 --- a/lib/el3_runtime/aarch32/cpu_data.S +++ b/lib/el3_runtime/aarch32/cpu_data.S @@ -41,9 +41,10 @@ * ----------------------------------------------------------------- */ func _cpu_data - push {lr} + /* r12 is pushed to meet the 8 byte stack alignment requirement */ + push {r12, lr} bl plat_my_core_pos - pop {lr} + pop {r12, lr} b _cpu_data_by_index endfunc _cpu_data |