summaryrefslogtreecommitdiff
path: root/board/xilinx/zynqmp/zynqmp.c
diff options
context:
space:
mode:
authorT Karthik Reddy <t.karthik.reddy@xilinx.com>2019-08-20 09:30:57 +0530
committerMichal Simek <michal.simek@xilinx.com>2019-10-08 09:11:14 +0200
commita69814c815b9a1a027f461ef26dbe7b2b8e258e4 (patch)
tree077b29ff26b005322d0dbc7da211c0cd6db626fe /board/xilinx/zynqmp/zynqmp.c
parent085201c246ee37ac6cc8f7dd3ec2ad602537601e (diff)
arm64: zynqmp: Set initrd_high to as high as possible
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: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'board/xilinx/zynqmp/zynqmp.c')
-rw-r--r--board/xilinx/zynqmp/zynqmp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index d649daba96..0c331e3322 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -22,6 +22,7 @@
#include <dwc3-uboot.h>
#include <zynqmppl.h>
#include <g_dnl.h>
+#include <linux/sizes.h>
#include "pm_cfg_obj.h"
@@ -530,6 +531,7 @@ int board_late_init(void)
char *new_targets;
char *env_targets;
int ret;
+ ulong initrd_hi;
#if defined(CONFIG_USB_ETHER) && !defined(CONFIG_USB_GADGET_DOWNLOAD)
usb_ether_init();
@@ -647,6 +649,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);
+
reset_reason();
return 0;