[RFC][PATCH 3/3] arm64: renesas: Set gd->ram_top to the end address of last DRAM bank
Marek Vasut
marek.vasut+renesas at mailbox.org
Wed Mar 25 04:17:06 CET 2026
Use previously introduced fdtdec_setup_mem_ram_top() function to
determine the topmost address is the topmost DRAM bank and assign
that address into gd->ram_top to assure U-Boot is relocated to the
end of last DRAM bank, which is the end of all available DRAM.
Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
---
Cc: Casey Connolly <casey.connolly at linaro.org>
Cc: Ilias Apalodimas <ilias.apalodimas at linaro.org>
Cc: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
Cc: Raymond Mao <raymondmaoca at gmail.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Tom Rini <trini at konsulko.com>
Cc: u-boot at lists.denx.de
---
NOTE: This currently breaks the platform, because its ethernet
controller cannot DMA above 4 GiB, and once U-Boot does
get relocated above 4 GiB, the packet buffer which is built
into the U-Boot binary is also relocated above 4 GiB.
---
board/renesas/common/rcar64-common.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/board/renesas/common/rcar64-common.c b/board/renesas/common/rcar64-common.c
index bcb03792494..ed488bf5b91 100644
--- a/board/renesas/common/rcar64-common.c
+++ b/board/renesas/common/rcar64-common.c
@@ -65,6 +65,13 @@ int dram_init_banksize(void)
return 0;
}
+phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
+{
+ fdtdec_setup_mem_ram_top();
+
+ return gd->ram_top;
+}
+
int __weak board_init(void)
{
return 0;
--
2.53.0
More information about the U-Boot
mailing list