Re: [PATCH v3 5/9] arm: armv8: save boot arguments

2023-12-27 Thread Ilias Apalodimas
On Fri, 22 Dec 2023 at 23:32, Raymond Mao  wrote:
>
> Save boot arguments x[0-3] into an array for handover of bloblist from
> previous boot stage.
>
> Signed-off-by: Raymond Mao 
> ---
> Changes in v2
> - New patch file created for v2.
>
>  arch/arm/cpu/armv8/start.S | 14 ++
>  1 file changed, 14 insertions(+)
>
> diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
> index 6cc1d26e5e..8e704f590e 100644
> --- a/arch/arm/cpu/armv8/start.S
> +++ b/arch/arm/cpu/armv8/start.S
> @@ -370,5 +370,19 @@ ENTRY(c_runtime_cpu_setup)
>  ENDPROC(c_runtime_cpu_setup)
>
>  WEAK(save_boot_params)
> +#if (IS_ENABLED(CONFIG_OF_BOARD) && IS_ENABLED(CONFIG_BLOBLIST))
> +   adr x9, saved_args
> +   stp x0, x1, [x9]
> +   /* Increment the address by 16 bytes for the next pair of values */
> +   stp x2, x3, [x9, #16]
> +#endif
> b   save_boot_params_ret/* back to my caller */
>  ENDPROC(save_boot_params)
> +
> +.section .data
> +.global saved_args
> +saved_args:
> +   .rept 4
> +   .xword 0
> +   .endr
> +END(saved_args)
> --
> 2.25.1
>

Reviewed-by: Ilias Apalodimas 


Re: [PATCH v3 5/9] arm: armv8: save boot arguments

2023-12-26 Thread Simon Glass
On Fri, Dec 22, 2023 at 9:32 PM Raymond Mao  wrote:
>
> Save boot arguments x[0-3] into an array for handover of bloblist from
> previous boot stage.
>
> Signed-off-by: Raymond Mao 
> ---
> Changes in v2
> - New patch file created for v2.
>
>  arch/arm/cpu/armv8/start.S | 14 ++
>  1 file changed, 14 insertions(+)
>

Reviewed-by: Simon Glass 

> diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
> index 6cc1d26e5e..8e704f590e 100644
> --- a/arch/arm/cpu/armv8/start.S
> +++ b/arch/arm/cpu/armv8/start.S
> @@ -370,5 +370,19 @@ ENTRY(c_runtime_cpu_setup)
>  ENDPROC(c_runtime_cpu_setup)
>
>  WEAK(save_boot_params)
> +#if (IS_ENABLED(CONFIG_OF_BOARD) && IS_ENABLED(CONFIG_BLOBLIST))
> +   adr x9, saved_args
> +   stp x0, x1, [x9]
> +   /* Increment the address by 16 bytes for the next pair of values */

That seems obvious, but I suppose a comment here is fine.

> +   stp x2, x3, [x9, #16]
> +#endif
> b   save_boot_params_ret/* back to my caller */
>  ENDPROC(save_boot_params)
> +
> +.section .data
> +.global saved_args
> +saved_args:
> +   .rept 4
> +   .xword 0
> +   .endr
> +END(saved_args)
> --
> 2.25.1
>

Regards,
Simon


[PATCH v3 5/9] arm: armv8: save boot arguments

2023-12-22 Thread Raymond Mao
Save boot arguments x[0-3] into an array for handover of bloblist from
previous boot stage.

Signed-off-by: Raymond Mao 
---
Changes in v2
- New patch file created for v2.

 arch/arm/cpu/armv8/start.S | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
index 6cc1d26e5e..8e704f590e 100644
--- a/arch/arm/cpu/armv8/start.S
+++ b/arch/arm/cpu/armv8/start.S
@@ -370,5 +370,19 @@ ENTRY(c_runtime_cpu_setup)
 ENDPROC(c_runtime_cpu_setup)
 
 WEAK(save_boot_params)
+#if (IS_ENABLED(CONFIG_OF_BOARD) && IS_ENABLED(CONFIG_BLOBLIST))
+   adr x9, saved_args
+   stp x0, x1, [x9]
+   /* Increment the address by 16 bytes for the next pair of values */
+   stp x2, x3, [x9, #16]
+#endif
b   save_boot_params_ret/* back to my caller */
 ENDPROC(save_boot_params)
+
+.section .data
+.global saved_args
+saved_args:
+   .rept 4
+   .xword 0
+   .endr
+END(saved_args)
-- 
2.25.1