[v1,0/4] Relocate U-Boot in the last bank

Simon Glass sjg at chromium.org
Sun Apr 5 14:02:25 CEST 2026


Hi Ilias,

On 2026-04-03T09:01:02, Ilias Apalodimas <ilias.apalodimas at linaro.org> wrote:
> This is a different and cleaner approach for [1].

BTW I had a bit of trouble applying this - if you use patman it will
show the base commit in the cover letter.

>
> The main difference with the previous patches is that instead or retrofitting
> the relocation code with the existing codebase, it's much easier to implement
> if we just move the bi_dram[] from bd to gd.

I agree moving bi_dram[] to gd is cleaner.

> Patch #4 - Adds the Kconfig option and code to allow us to relocate in top
>            memory banks

When RELOC_ADDR_TOP is enabled, board_get_usable_ram_top() is skipped.
Many boards use this to enforce platform-specific constraints, such as
keeping relocation below 4 GiB for DMA-limited hardware. Bypassing it
could break those platforms.

I suspect we need to call board_get_usable_ram_top() in both paths, or
provide a way for boards to constrain the top address when
RELOC_ADDR_TOP is enabled. What do you think?

> +config RELOC_ADDR_TOP
> +     bool "Relocate to the topmost memory address"
> +     help

The help text should mention the 32-bit DMA caveat so users understand
this may break platforms with DMA-limited devices.

Regards,
Simon


More information about the U-Boot mailing list