Re: [PATCH 11/19] spl: Support jumping to VPL from TPL

Tom Rini
2024-09-26T04:07:40Z

[-- Attachment #1: Type: text/plain, Size: 1583 bytes --]

On Wed, Sep 25, 2024 at 02:55:37PM +0200, Simon Glass wrote:
> Use spl_get_image_pos() to obtain the image position to jump to. Add
> the symbols used for VPL so that the correct image can be loaded.
>
> Use the functions provided for accessing these symbols and add a few
> comments too.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> common/spl/spl.c | 22 ++++++++++++++++------
> 1 file changed, 16 insertions(+), 6 deletions(-)
>
> diff --git a/common/spl/spl.c b/common/spl/spl.c
> index d01e9861f88..623e486c210 100644
> --- a/common/spl/spl.c
> +++ b/common/spl/spl.c
> @@ -50,15 +50,19 @@ u32 *boot_params_ptr = NULL;
>
> #if CONFIG_IS_ENABLED(BINMAN_UBOOT_SYMBOLS)
> /* See spl.h for information about this */
> +#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD) && !defined(CONFIG_VPL_BUILD)
> binman_sym_declare(ulong, u_boot_any, image_pos);
> binman_sym_declare(ulong, u_boot_any, size);
> +#endif
>
> -#ifdef CONFIG_TPL
> +#if defined(CONFIG_TPL)
> +/* TPL jumps straight to SPL */
> binman_sym_declare(ulong, u_boot_spl_any, image_pos);
> binman_sym_declare(ulong, u_boot_spl_any, size);
> #endif
>
> #ifdef CONFIG_VPL
> +/* TPL jumps to VPL */
> binman_sym_declare(ulong, u_boot_vpl_any, image_pos);
> binman_sym_declare(ulong, u_boot_vpl_any, size);
> #endif

So I see on a64-olinuxino and others a size reduction here, as those
symbols aren't included now. Do we have something in the tooling to
ensure that we aren't now referencing / dereferencing invalid links?

--
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]