[U-Boot] [PATCH v3] armv8: spl: Call spl_relocate_stack_gd for ARMv8

Simon Glass sjg at chromium.org
Thu Feb 23 16:35:01 UTC 2017


Hi,

On 23 February 2017 at 02:25, Dr. Philipp Tomsich
<philipp.tomsich at theobroma-systems.com> wrote:
> Simon,
>
> On 23 Feb 2017, at 03:23, Simon Glass <sjg at chromium.org> wrote:
>
> On 22 February 2017 at 11:01, Philipp Tomsich
> <philipp.tomsich at theobroma-systems.com> wrote:
>
> As part of the startup process for boards using the SPL, we need to
> call spl_relocate_stack_gd. This is needed to set up malloc with its
> DRAM buffer.
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
> Reviewed-by: Andre Przywara <andre.przywara at arm.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> ---
> arch/arm/lib/crt0_64.S | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S
> index 19c6a98..a7cead5 100644
> --- a/arch/arm/lib/crt0_64.S
> +++ b/arch/arm/lib/crt0_64.S
> @@ -109,8 +109,17 @@ relocation_return:
>  */
>        bl      c_runtime_cpu_setup             /* still call old routine */
> #endif /* !CONFIG_SPL_BUILD */
> -
> -/* TODO: For SPL, call spl_relocate_stack_gd() to alloc stack relocation */
> +#if defined(CONFIG_SPL_BUILD)
> +       bl      spl_relocate_stack_gd           /* may return NULL */
> +       /* Perform 'sp = (x0 != NULL) ? x0 : sp' while working
> +        * around the constraint that conditional moves can not
> +        * have 'sp' as an operand
> +        */
>
>
> nit: Comment style again
>
>
> I thought is was the missing asterisks at the beginning of the line…
> What am I missing? Is it the indentation of the comment block?

It's just that you should now have any text on the /* line or the */ line, so:

       /*
        * Perform 'sp = (x0 != NULL) ? x0 : sp' while working
        * around the constraint that conditional moves can not
        * have 'sp' as an operand
        */

That's the style of the U-Boot code base.

>
> +       mov     x1, sp
> +       cmp     x0, #0
> +       csel    x0, x0, x1, ne
> +       mov     sp, x0
> +#endif
>
> /*
>  * Clear BSS section
> --
> 1.9.1
>
>

Regards,
Simon


More information about the U-Boot mailing list