1 From 1dcc6c61ee650b26b94da4f4d6030d54706d87fe Mon Sep 17 00:00:00 2001
2 From: Icenowy Zheng <icenowy@aosc.io>
3 Date: Thu, 18 Jan 2018 23:11:20 +0800
4 Subject: [PATCH 01/29] arm: arm926ejs: start.S: port save_boot_params support
7 The ARMv7 start code has support for saving some boot params at the
8 entry point, which is used by some SoCs to return to BROM.
10 Port this to ARM926EJ-S start code.
12 Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
14 arch/arm/cpu/arm926ejs/start.S | 19 +++++++++++++++++++
15 1 file changed, 19 insertions(+)
17 diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S
18 index ff592ba810..9011afed3f 100644
19 --- a/arch/arm/cpu/arm926ejs/start.S
20 +++ b/arch/arm/cpu/arm926ejs/start.S
22 #include <asm-offsets.h>
25 +#include <linux/linkage.h>
28 *************************************************************************
33 + .globl save_boot_params_ret
34 + .type save_boot_params_ret,%function
37 + /* Allow the board to save important registers */
39 +save_boot_params_ret:
41 * set the cpu to SVC32 mode
43 @@ -110,3 +116,16 @@ flush_dcache:
45 mov pc, lr /* back to my caller */
46 #endif /* CONFIG_SKIP_LOWLEVEL_INIT */
48 +/*************************************************************************
50 + * void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3)
51 + * __attribute__((weak));
53 + * Stack pointer is not yet initialized at this moment
54 + * Don't save anything to stack even if compiled with -O0
56 + *************************************************************************/
57 +WEAK(save_boot_params)
58 + b save_boot_params_ret /* back to my caller */
59 +ENDPROC(save_boot_params)