From: Padmarao Begari Date: Tue, 1 Oct 2024 08:25:37 +0000 (+0530) Subject: xilinx: common: fix script address for Microblaze X-Git-Url: http://git.dujemihanovic.xyz/login.html?a=commitdiff_plain;h=5550a152baf612ed8acecc11074f72c40b7c02c1;p=u-boot.git xilinx: common: fix script address for Microblaze Fix the issue introduced by commit 067e0294806e ("board: xilinx: Remove conditional check for Microblaze"). The scriptaddr should be physical location not really offset from start of DDR. When U-Boot is not found boot.scr script address in device tree, then it is assigned based on script address and ram base address for Microblaze and i.e exceeding DDR memory. To fix this, the script address is assigned initially with offset instead of address. Later it is added with ram base address and gets the physical address. Signed-off-by: Padmarao Begari Link: https://lore.kernel.org/r/20241001082537.830286-1-padmarao.begari@amd.com Signed-off-by: Michal Simek --- diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index dc4523824b..6fc0512ce5 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -57,7 +57,7 @@ int board_late_init(void) max_size = gd->start_addr_sp - CONFIG_STACK_SIZE; max_size = round_down(max_size, SZ_16M); - status |= env_set_hex("scriptaddr", max_size + SZ_2M); + status |= env_set_hex("scriptaddr", (max_size - gd->ram_base) + SZ_2M); status |= env_set_hex("pxefile_addr_r", max_size + SZ_1M);