aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIcenowy Zheng <icenowy@aosc.io>2022-01-29 10:23:00 -0500
committerAndre Przywara <andre.przywara@arm.com>2022-02-04 00:09:57 +0000
commit508f75afb57d044a71e7ffd58e4e3e32aaa5ed30 (patch)
tree2b6d3e41011c2d6549e1d08f6eebd21688ba6146
parentf2c33699d1b029438ccaa154d03d632dd80aac11 (diff)
downloadu-boot-508f75afb57d044a71e7ffd58e4e3e32aaa5ed30.zip
u-boot-508f75afb57d044a71e7ffd58e4e3e32aaa5ed30.tar.gz
u-boot-508f75afb57d044a71e7ffd58e4e3e32aaa5ed30.tar.bz2
arm: arm926ej-s: start.S: port save_boot_params support from armv7 code
The ARMv7 start code has support for saving some boot params at the entry point, which is used by some SoCs to return to BROM. Port this to ARM926EJ-S start code. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-rw-r--r--arch/arm/cpu/arm926ejs/start.S19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S
index 0afcc47..aca7793 100644
--- a/arch/arm/cpu/arm926ejs/start.S
+++ b/arch/arm/cpu/arm926ejs/start.S
@@ -17,6 +17,7 @@
#include <asm-offsets.h>
#include <config.h>
#include <common.h>
+#include <linux/linkage.h>
/*
*************************************************************************
@@ -32,8 +33,13 @@
*/
.globl reset
+ .globl save_boot_params_ret
+ .type save_boot_params_ret,%function
reset:
+ /* Allow the board to save important registers */
+ b save_boot_params
+save_boot_params_ret:
/*
* set the cpu to SVC32 mode
*/
@@ -110,3 +116,16 @@ flush_dcache:
#endif
mov pc, lr /* back to my caller */
#endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */
+
+/*************************************************************************
+ *
+ * void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3)
+ * __attribute__((weak));
+ *
+ * Stack pointer is not yet initialized at this moment
+ * Don't save anything to stack even if compiled with -O0
+ *
+ *************************************************************************/
+WEAK(save_boot_params)
+ b save_boot_params_ret /* back to my caller */
+ENDPROC(save_boot_params)