From patchwork Fri Jul 10 11:20:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 241304 List-Id: U-Boot discussion From: michal.simek at xilinx.com (Michal Simek) Date: Fri, 10 Jul 2020 13:20:13 +0200 Subject: [PATCH] xilinx: Setup bootm variables Message-ID: <4f41b6650930e51fa0ad0649835cf3670a2cada5.1594380012.git.michal.simek@xilinx.com> On system with PL DDR which is placed before PS DDR in DT env_get_bootm_size() and env_get_bootm_low() without specifying bootm_low and bootm_size variables are taking by default gd->bd->bi_dram[0].start and gd->bd->bi_dram[0].size. As you see 0 means bank 0 which doesn't need to be PS ddr and even can be memory above 39bit VA which is what U-Boot supports now. That's why setup bootm variables based on ram_base/ram_size setting to make sure that boot images are placed to the same location as U-Boot is placed. This location should be by default location where OS can boot from. Signed-off-by: Michal Simek --- board/xilinx/common/board.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index 0469e2e7ac9b..3bca3a25a97b 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -86,5 +86,8 @@ int board_late_init_xilinx(void) initrd_hi = round_down(initrd_hi, SZ_16M); env_set_addr("initrd_high", (void *)initrd_hi); + env_set_addr("bootm_low", (void *)gd->ram_base); + env_set_addr("bootm_size", (void *)gd->ram_size); + return 0; }