summaryrefslogtreecommitdiff
path: root/programs
diff options
context:
space:
mode:
authorIlias Apalodimas <[email protected]>2026-06-17 10:48:23 +0300
committerTom Rini <[email protected]>2026-06-24 18:13:24 -0600
commit55a34217698491cc0bb8d53d630644dc8756629c (patch)
treec3ee2c86e5dacb429866dcc5fb7ebd023d585aff /programs
parentd19d9e1c064b6c782959d1da7bddf1e9da1c55d4 (diff)
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 to the top of the last discovered bank. It's worth noting that this patch changes when dram_init_banksize() is called. It's now called much earlier in the board init process. 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). Reviewed-by: Marek Vasut <[email protected]> Reviewed-by: Simon Glass <[email protected]> Tested-by: Simon Glass <[email protected]> # Radxa ROCK 5B Signed-off-by: Ilias Apalodimas <[email protected]> Tested-by: Christophe Leroy (CS GROUP) <[email protected]>
Diffstat (limited to 'programs')
0 files changed, 0 insertions, 0 deletions