[v3,0/6] Relocate U-Boot in the last bank

Ilias Apalodimas ilias.apalodimas at linaro.org
Wed Apr 29 07:04:15 CEST 2026


On Tue, 28 Apr 2026 at 20:49, Simon Glass <sjg at chromium.org> wrote:
>
> Hi Ilias,
>
> On 2026-04-27T10:08:21, Ilias Apalodimas <ilias.apalodimas at linaro.org> wrote:
>
> > # RELOCATE_LAST_BANK not set
> > # RELOCATE_LAST_BANK enabled
>
> The Kconfig symbol added in patch #6 is RELOC_ADDR_TOP, not
> RELOCATE_LAST_BANK. Please can you update the cover letter and the
> bdinfo annotations to match.

Sure

>
> > Patch #2 - Introduce fdtdec_setup_mem_ram_top() from Marek
>
> fdtdec_setup_mem_ram_top() is added in patch 2 with a docstring saying
> it should be called from board_get_usable_ram_top(), but nothing in
> the series calls it - I think you should convert at least one
> board_get_usable_ram_top() to use it.

I can try to add qemu, which is the usual safe choice.

>
> Patch #6 moves dram_init_banksize() much earlier in initcall_run_f() —
> before setup_ram_config() and setup_dest_addr(), rather than after the
> reservations. That is a significant ordering change for every board
> with a custom dram_init_banksize(), and it is unconditional (not gated
> on RELOC_ADDR_TOP). Please mention it in the cover so reviewers of
> board-specific code know to look. The Tested-by tags only cover a
> couple of platforms.

I went through enough of the platforms, but didn't spot any place this
could cause a problem. I'll mention it regardless

>
> There is no doc/ update for RELOC_ADDR_TOP. Given the 32-bit DMA
> hazard, a short note in doc/develop/ explaining when to enable it
> would help platform maintainers.

Sure

>
> Is there any way to test this logic? We could perhaps have a sandbox
> test which tries the various combinations of RAM banks and calls
> functions to see what happens.

It depends on how sandbox initializes from dram_init_banksize(). We
can certianly test it with QEMU, by passing different memory layouts
and DTs with reserved nodes.
TBH I was trying to get this in for 2026.07, but since it's changing
the boot process a lot, I'll aim for -next and see if i can add a
test.

Thanks
/Ilias
>
> Regards,
> Simon


More information about the U-Boot mailing list