aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/cpu
diff options
context:
space:
mode:
authorRaymond Mao2024-02-03 08:36:24 -0800
committerTom Rini2024-02-29 09:24:22 -0500
commit11f3171256337dfb81ead526bb2dd78503839882 (patch)
tree8ebb0a8ec50a2397ccba15768547fc81382db45e /arch/arm/cpu
parent5103e69344d60eb8c8d2cf804ec00d0ef3975124 (diff)
arm: armv8: save boot arguments
Save boot arguments x[0-3] into an array for handover of bloblist from previous boot stage. Signed-off-by: Raymond Mao <raymond.mao@linaro.org> Suggested-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r--arch/arm/cpu/armv8/start.S23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
index 6cc1d26e5e2..74612802617 100644
--- a/arch/arm/cpu/armv8/start.S
+++ b/arch/arm/cpu/armv8/start.S
@@ -370,5 +370,28 @@ ENTRY(c_runtime_cpu_setup)
ENDPROC(c_runtime_cpu_setup)
WEAK(save_boot_params)
+#if (IS_ENABLED(CONFIG_BLOBLIST))
+ /* Calculate the PC-relative address of saved_args */
+ adr x9, saved_args_offset
+ ldr w10, saved_args_offset
+ add x9, x9, w10, sxtw
+
+ stp x0, x1, [x9]
+ stp x2, x3, [x9, #16]
+#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
+ .dword 0
+ .endr
+END(saved_args)
+#endif