[PATCH 10/10] arm64: versal: Set initrd_high to as high as possible

Michal Simek michal.simek at xilinx.com
Thu Oct 22 12:32:22 CEST 2020


From: Siva Durga Prasad Paladugu <siva.durga.paladugu at xilinx.com>

This patch is setting up the initrd_high to as high as possible by leaving
max stack size for u-boot so that bigger rootfs can also be loaded by
u-boot for booting kernel.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu at xilinx.com>
Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

 board/xilinx/versal/board.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
index 912c1143a8ad..09229e0a75a4 100644
--- a/board/xilinx/versal/board.c
+++ b/board/xilinx/versal/board.c
@@ -217,6 +217,10 @@ int board_late_init(void)
 
 	env_set("boot_targets", new_targets);
 
+	initrd_hi = gd->start_addr_sp - CONFIG_STACK_SIZE;
+	initrd_hi = round_down(initrd_hi, SZ_16M);
+	env_set_addr("initrd_high", (void *)initrd_hi);
+
 	return board_late_init_xilinx();
 }
 
-- 
2.28.0



More information about the U-Boot mailing list