summaryrefslogtreecommitdiff
path: root/bl32
diff options
context:
space:
mode:
authordanh-arm <dan.handley@arm.com>2016-12-14 09:25:15 +0000
committerGitHub <noreply@github.com>2016-12-14 09:25:15 +0000
commit9509f4f67acf949c21e2fcc0db7dbc6ffd43165f (patch)
tree8d1bc2ce7bb183f78a4c90b85c97f32c6d214bc4 /bl32
parent1b5fa6ef1082ffb9979df4aad91525eda571eb50 (diff)
parent9f3ee61c904e4b6d2038086718c5ec4237d544a8 (diff)
Merge pull request #775 from soby-mathew/sm/AArch32_stack_align
AArch32: Fix the stack alignment issue
Diffstat (limited to 'bl32')
-rw-r--r--bl32/sp_min/aarch32/entrypoint.S9
1 files changed, 6 insertions, 3 deletions
diff --git a/bl32/sp_min/aarch32/entrypoint.S b/bl32/sp_min/aarch32/entrypoint.S
index 54f2cedb..e2ab923d 100644
--- a/bl32/sp_min/aarch32/entrypoint.S
+++ b/bl32/sp_min/aarch32/entrypoint.S
@@ -168,8 +168,11 @@ func handle_smc
mov r2, r0 /* handle */
ldcopr r0, SCR
- /* Save SCR in stack */
- push {r0}
+ /*
+ * Save SCR in stack. r1 is pushed to meet the 8 byte
+ * stack alignment requirement.
+ */
+ push {r0, r1}
and r3, r0, #SCR_NS_BIT /* flags */
/* Switch to Secure Mode*/
@@ -191,7 +194,7 @@ func handle_smc
/* r0 points to smc context */
/* Restore SCR from stack */
- pop {r1}
+ pop {r1, r2}
stcopr r1, SCR
isb