[PATCH 2/5] arm64: initialize the frame pointer register
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Thu Jul 3 07:19:48 CEST 2025
U-Boot may be compiled with frame pointers depending on defaults built into
compilers are via explicitly passing -fno-omit-frame-pointer.
To stop walking frames it is necessary that the initial value of the frame
pointer register is 0.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
arch/arm/lib/crt0_64.S | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S
index f3f279f2c39..3ff0577e9c8 100644
--- a/arch/arm/lib/crt0_64.S
+++ b/arch/arm/lib/crt0_64.S
@@ -168,6 +168,7 @@ clear_loop:
/* call board_init_r(gd_t *id, ulong dest_addr) */
mov x0, x18 /* gd_t */
ldr x1, [x18, #GD_RELOCADDR] /* dest_addr */
+ mov x29, 0 /* frame pointer */
b board_init_r /* PC relative jump */
/* NOTREACHED - board_init_r() does not return */
--
2.48.1
More information about the U-Boot
mailing list