From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Fri, 23 Apr 2021 08:46:25 +0200 Subject: [PATCH] xilinx: common: Fix boot script address In-Reply-To: <5dc590fbc134e96437b195bc18a45f5caa18535c.1617691957.git.michal.simek@xilinx.com> References: <5dc590fbc134e96437b195bc18a45f5caa18535c.1617691957.git.michal.simek@xilinx.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de ?t 6. 4. 2021 v 8:52 odes?latel Michal Simek napsal: > > From: T Karthik Reddy > > Currently u-boot supports addresses upto 39-bits only. If anybody > wants to use addresses of more than 39-bits in Linux they will have > a separate memory node in DT. In such cases they will have multiple > memory nodes. > Currently u-boot selects and runs on lower memory bank region. > But bootscript is being loaded on dram bank 0, where dram bank 0 will > point to 1st memory node in DT. If first memory node is mentioned as > higher ddr(>39-bits address) then u-boot cannot load the bootscript. > So fix this issue by setting bootscript address within the lower memory > bank region. > > Signed-off-by: T Karthik Reddy > Signed-off-by: Ashok Reddy Soma > Signed-off-by: Michal Simek > --- > > board/xilinx/common/board.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c > index 475628b92549..92b61d83ca47 100644 > --- a/board/xilinx/common/board.c > +++ b/board/xilinx/common/board.c > @@ -378,14 +378,12 @@ int board_late_init_xilinx(void) > int i, id, macid = 0; > struct xilinx_board_description *desc; > phys_size_t bootm_size = gd->ram_size; > - struct bd_info *bd = gd->bd; > > - if (!CONFIG_IS_ENABLED(MICROBLAZE) && bd->bi_dram[0].start) { > + if (!CONFIG_IS_ENABLED(MICROBLAZE)) { > ulong scriptaddr; > > scriptaddr = env_get_hex("scriptaddr", 0); > - ret |= env_set_hex("scriptaddr", > - bd->bi_dram[0].start + scriptaddr); > + ret |= env_set_hex("scriptaddr", gd->ram_base + scriptaddr); > } > > if (CONFIG_IS_ENABLED(ARCH_ZYNQ) || CONFIG_IS_ENABLED(MICROBLAZE)) > -- > 2.31.0 > Applied. M -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs