summaryrefslogtreecommitdiff
path: root/bl2u
diff options
context:
space:
mode:
authorDouglas Raillard <douglas.raillard@arm.com>2017-07-26 19:23:16 +0100
committerDouglas Raillard <douglas.raillard@arm.com>2017-08-02 17:16:09 +0100
commit5c2c88b558a9dfcf5203057fa39d7a702d1bc433 (patch)
treed2e603d498b5850d5764e76b6bb80f5f9e23d515 /bl2u
parent5e2cbb361e28968d26bbb0c3efd541ff543785cc (diff)
Fix BL2U entrypoint possible parameter corruption
Replace the use of r12 by r10 to save the value of a parameter of bl2u_entrypoint to pass it to bl2u_early_platform_setup at the end of the function. r10 is a callee saved register so it will not become corrupted by C code, whereas r12 is the The Intra-Procedure-call scratch register potentially used by veneers. See the ARM AAPCS document (ARM IHI 0042F). Change-Id: I4f37e54a6b550719edb40bb24cd8f498827e2749 Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
Diffstat (limited to 'bl2u')
-rw-r--r--bl2u/aarch32/bl2u_entrypoint.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/bl2u/aarch32/bl2u_entrypoint.S b/bl2u/aarch32/bl2u_entrypoint.S
index 1fa669eb..7fb64f3e 100644
--- a/bl2u/aarch32/bl2u_entrypoint.S
+++ b/bl2u/aarch32/bl2u_entrypoint.S
@@ -32,7 +32,7 @@ func bl2u_entrypoint
* ---------------------------------------------
*/
mov r11, r1
- mov r12, r2
+ mov r10, r2
/* ---------------------------------------------
* Set the exception vector to something sane.
@@ -107,7 +107,7 @@ func bl2u_entrypoint
* ---------------------------------------------
*/
mov r0, r11
- mov r1, r12
+ mov r1, r10
bl bl2u_early_platform_setup
bl bl2u_plat_arch_setup