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

Tom Rini trini at konsulko.com
Thu Sep 26 06:07:10 CEST 2024


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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240925/f1bc0b60/attachment.sig>


More information about the U-Boot mailing list