mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 01:24:27 +00:00
fix(aarch32): avoid using r12 to store boot params
The current implementation uses the `r12` register as temporary storage for r4. However, `r12` is a call-clobbered register, meaning its contents are not preserved across function calls. This becomes problematic when we later call the `zeromem` function, as any information stored in `r12` will be lost. To address this issue, we should avoid using `r12` to store boot parameters. Change-Id: If94b7fc3a01bc617ceadaaa704d5aa5e5accfd3f Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
This commit is contained in:
parent
2948d1f819
commit
af61b50c10
2 changed files with 12 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2022, ARM Limited and Contributors. All rights reserved.
|
* Copyright (c) 2016-2024, ARM Limited and Contributors. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -29,10 +29,10 @@ func bl2_entrypoint
|
||||||
* use.
|
* use.
|
||||||
* ---------------------------------------------
|
* ---------------------------------------------
|
||||||
*/
|
*/
|
||||||
mov r9, r0
|
mov r8, r0
|
||||||
mov r10, r1
|
mov r9, r1
|
||||||
mov r11, r2
|
mov r10, r2
|
||||||
mov r12, r3
|
mov r11, r3
|
||||||
|
|
||||||
/* ---------------------------------------------
|
/* ---------------------------------------------
|
||||||
* Set the exception vector to something sane.
|
* Set the exception vector to something sane.
|
||||||
|
@ -114,10 +114,10 @@ func bl2_entrypoint
|
||||||
* Perform BL2 setup
|
* Perform BL2 setup
|
||||||
* ---------------------------------------------
|
* ---------------------------------------------
|
||||||
*/
|
*/
|
||||||
mov r0, r9
|
mov r0, r8
|
||||||
mov r1, r10
|
mov r1, r9
|
||||||
mov r2, r11
|
mov r2, r10
|
||||||
mov r3, r12
|
mov r3, r11
|
||||||
|
|
||||||
bl bl2_setup
|
bl bl2_setup
|
||||||
|
|
||||||
|
|
|
@ -1273,6 +1273,9 @@ subsections:
|
||||||
- title: AArch64
|
- title: AArch64
|
||||||
scope: aarch64
|
scope: aarch64
|
||||||
|
|
||||||
|
- title: AArch32
|
||||||
|
scope: aarch32
|
||||||
|
|
||||||
- title: Debug
|
- title: Debug
|
||||||
scope: debug
|
scope: debug
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue