[PATCH] spl: spl_legacy: Fix spl_end address

Tom Rini trini at konsulko.com
Fri Jun 30 21:11:38 CEST 2023


On Fri, Jun 30, 2023 at 04:08:42PM -0300, Fabio Estevam wrote:
> On Fri, Jun 30, 2023 at 3:36 PM Fabio Estevam <festevam at gmail.com> wrote:
> 
> > I tested this with CONFIG_SPL_SEPARATE_BSS=n and it failed.
> 
> Tested this one with CONFIG_SPL_SEPARATE_BSS enabled and disabled:
> 
> --- a/common/spl/spl_legacy.c
> +++ b/common/spl/spl_legacy.c
> @@ -18,9 +18,17 @@
> 
>  static void spl_parse_legacy_validate(uintptr_t start, uintptr_t size)
>  {
> -       uintptr_t spl_start = (uintptr_t)_start;
> -       uintptr_t spl_end = (uintptr_t)__bss_end;
>         uintptr_t end = start + size;
> +       uintptr_t spl_start;
> +       uintptr_t spl_end;
> +
> +       if (IS_ENABLED(CONFIG_SPL_SEPARATE_BSS)) {
> +               spl_start = (uintptr_t)_start;
> +               spl_end = (uintptr_t)_image_binary_end;
> +       } else {
> +               spl_start = (uintptr_t)__bss_start;
> +               spl_end = (uintptr_t)__bss_end;
> +       }
> 
> Does it look okay?

Probably? But have you thrown this at CI, or a world build?

-- 
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/20230630/b407e2c1/attachment.sig>


More information about the U-Boot mailing list