Hi Ilias, On 2026-06-09T13:15:42, Ilias Apalodimas <[email protected]> wrote: > common: Add an option to relocate on ram top > > Right now we only relocate u-boot to the top of the first > memory bank unless the board specific code overwrites it. > This is problematic when loading big binaries as it > fragments the contiguous memory space for no apparent reason. > > On certain platforms, it is currently not possible to relocate U-Boot > above the 32bit boundary, due to various dependencies on content located > below the 32bit boundary. One such example is ethernet, where the packet > buffer built into U-Boot binary is placed below the 32bit boundary and > allows loading of data via ethernet even above 32bit boundary due to > memory copy from the packet buffer to the destination location. > > A previous patch moves the bi_dram[] info from bd to gd and make > the memory bank information available early. So move the > dram_init_banksize() INITCALL before the relocation address calculation > and use it to derive the address. > > Also add a Kconfig option and allow the common code to relocate U-Boot > [...] > > Kconfig | 14 ++++++++++++++ > common/board_f.c | 29 +++++++++++++++++++++++++---- > 2 files changed, 39 insertions(+), 4 deletions(-)
> diff --git a/Kconfig b/Kconfig > @@ -503,6 +503,20 @@ config SKIP_RELOCATE_CODE_DATA_OFFSET > +config RELOC_ADDR_TOP > + bool "Relocate to the topmost memory address" > + depends on EXPERT This is already inside the if EXPERT block (just before 'endif # EXPERT'), so the depends line is redundant. I might be on the wrong branch. Reviewed-by: Simon Glass <[email protected]> Tested-by: Simon Glass <[email protected]> # Radxa ROCK 5B Regards, Simon

