summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlias Apalodimas <[email protected]>2025-10-16 16:27:43 +0300
committerTom Rini <[email protected]>2025-10-24 13:47:50 -0600
commit104a0de7844eee51d183d92f5bd22fa6202bb699 (patch)
tree146cc4f39fc95a6bdd58edea50ab9e815a43fdb2
parentcf262e16080abcd587f47d0bbc8fa84558abcf89 (diff)
arm: armv8: Make save_boot_params simpler
The idiom used in save_boot_params is common for armv7. In armv8 is much easier to do the same thing with adr/adrp. So let's simplify the code a bit. Signed-off-by: Ilias Apalodimas <[email protected]>
-rw-r--r--arch/arm/cpu/armv8/start.S19
1 files changed, 7 insertions, 12 deletions
diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
index 829a620faeb..40c342e97e9 100644
--- a/arch/arm/cpu/armv8/start.S
+++ b/arch/arm/cpu/armv8/start.S
@@ -387,23 +387,18 @@ 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]
+ adrp x9, saved_args
+ add x9, x9, :lo12:saved_args
+ 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
+.section .data
+.align 2
+.global saved_args
saved_args:
.rept 4
.dword 0