From patchwork Tue Apr 6 06:52:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1462616 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=HO/Oiplt; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FDysD5wc3z9sVt for ; Tue, 6 Apr 2021 16:53:01 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 468F681780; Tue, 6 Apr 2021 08:52:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="HO/Oiplt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4859C8187C; Tue, 6 Apr 2021 08:52:48 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A2E41816C4 for ; Tue, 6 Apr 2021 08:52:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ej1-x62c.google.com with SMTP id u5so20168700ejn.8 for ; Mon, 05 Apr 2021 23:52:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2CzHFYX77bYCMTF7TcHLjsHxv44JIryGBTc5wdrP8hE=; b=HO/OipltQaTeDZcLtDQKn9MaxUDjCVsSYS08G22SxTTcs7sfpqT+uk2WG/C4RM33F0 s/G9j4X8tWDZP/xtm3w3aDJGN3UTBHV8sTu1/l6ti+tTLcbEnLit93O2Ez6H19hBrfB/ g7cXu5yI1x7fzt4CJtsodvgq83piT/CVoc2yiy7t7BLQ5/cQCqC+c+5iEh86sDji0R8n UopZ1k9dMDG03JOvwkysjLmA0t6AWd33HebXLDR2hi/tuJycYb4QHbesWWl3LAJc+SL/ FtJsS6r2Px65vCz/xsl+4bEIX7ry4JlBtKVWVUpXUj6FuJA+hwwJ0zAkZFRNi1SQesSJ C9JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=2CzHFYX77bYCMTF7TcHLjsHxv44JIryGBTc5wdrP8hE=; b=KIwXL2VMyKcM/KUtObxUUqDF2OhBnVMnhY/JF+PuB4vIsdTSvNfhe7z97QJbAI1ec7 Z6MjzgKOlY9P+WiupP4SzlfHkfm9TlkUcYv+C4ZT82rBpJ3L/E6WUOKL7XS/ytk+Dcl7 ciGrHI8gxLnpytFP9DvF4/BpMDPS2X47CwkEEp2zrgC4n+1RRO3tfiusRiviJg+UE1x6 3F++Hb2dzdx9qBufdR8eq/LL281Z0YOHmzonDNdqwGNKgka68kEARyAAhVLDY44+22Mi faaxpedZDIMfyPdbl4XBPd8air3in2h+CdAFh6JPbJvmQUwoJDLIixQs9qK1gspL5Bt2 KlAw== X-Gm-Message-State: AOAM532EpwvcuAWm3GTHlZ7+PCdHDNYIVE89dnUaDo2QrShpqjOL/o6T WXYMUDCU15A902gpyhwQxdjim5SAqXLoGVKz X-Google-Smtp-Source: ABdhPJw0FZPtj09XiL7jgJMVsyQcKvQMvM5QjpBkOZ7Blk7MNygBmPI3EglVuOve3/smY8xxldwOVA== X-Received: by 2002:a17:907:7745:: with SMTP id kx5mr32222648ejc.3.1617691964047; Mon, 05 Apr 2021 23:52:44 -0700 (PDT) Received: from localhost ([2a02:768:2307:40d6::e05]) by smtp.gmail.com with ESMTPSA id lx5sm1979190ejb.47.2021.04.05.23.52.43 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Apr 2021 23:52:43 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: T Karthik Reddy Subject: [PATCH] xilinx: common: Fix boot script address Date: Tue, 6 Apr 2021 08:52:39 +0200 Message-Id: <5dc590fbc134e96437b195bc18a45f5caa18535c.1617691957.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean 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))