Skip to content
Snippets Groups Projects
Commit 5103e693 authored by Raymond Mao's avatar Raymond Mao Committed by Tom Rini
Browse files

arm: armv7: save boot arguments


Save boot arguments r[0-3] into an array for handover of bloblist from
previous boot stage.

Signed-off-by: default avatarRaymond Mao <raymond.mao@linaro.org>
Suggested-by: default avatarArd Biesheuvel <ardb@kernel.org>
Reviewed-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
parent 1ef43f3b
No related branches found
No related tags found
No related merge requests found
......@@ -152,9 +152,38 @@ ENDPROC(c_runtime_cpu_setup)
*
*************************************************************************/
WEAK(save_boot_params)
#if (IS_ENABLED(CONFIG_BLOBLIST))
/* Calculate the PC-relative address of saved_args */
adr r12, saved_args_offset
ldr r13, saved_args_offset
add r12, r12, r13
/*
* Intentionally swapping r0 with r2 in order to simplify the C
* function we use later.
*/
str r2, [r12]
str r1, [r12, #4]
str r0, [r12, #8]
str r3, [r12, #12]
#endif
b save_boot_params_ret @ back to my caller
ENDPROC(save_boot_params)
#if (IS_ENABLED(CONFIG_BLOBLIST))
saved_args_offset:
.long saved_args - . /* offset from current code to save_args */
.section .data
.align 2
.global saved_args
saved_args:
.rept 4
.word 0
.endr
END(saved_args)
#endif
#ifdef CONFIG_ARMV7_LPAE
WEAK(switch_to_hypervisor)
b switch_to_hypervisor_ret
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment