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: 1326679 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; dmarc=none (p=none dis=none) header.from=xilinx.com 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=Jt6ciK+S; 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B39ZL11rBz9sRK for ; Fri, 10 Jul 2020 21:20:26 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AD3F282209; Fri, 10 Jul 2020 13:20:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (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="Jt6ciK+S"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 22DE782201; Fri, 10 Jul 2020 13:20:19 +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,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) (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 856CE82201 for ; Fri, 10 Jul 2020 13:20:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ed1-x541.google.com with SMTP id b15so4348840edy.7 for ; Fri, 10 Jul 2020 04:20:16 -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=/fKsuvVISnfXkMxB5TUvMVuZU4ngqLbEFwOpQnT/Td4=; b=Jt6ciK+SupBGZxPwRZ3elxa+TGMLsV75OhdxWnZnKvNPX2zyURpP2C6ljdkjCJfjOk Trnb0/UwIb0LrvJWo7LIMBiE4HtKM8l/o8oZPE2Bgl+0Moo75EAasiOdns3qupGforo7 4NWzBCcaAuC8juFXoNhYyQUjCH3/rHGTm+otJ/NEoyxiKHiZ/XrOKQryHnpEWBHo0j6S ljXbNwcOlOQT8F+TTb9X6OXJd28GVlPO+7Sp7VrnPLo0YTUaqn7oGqwWf81JVb1jZQZJ QyoOFIFB0IoKsbCH35A7w5ETzOb5CJ2yWRFQcUW4FVcLEWgQLZbIutPTt1cyvtKgSaDb NdEQ== 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=/fKsuvVISnfXkMxB5TUvMVuZU4ngqLbEFwOpQnT/Td4=; b=Xo8ChyEDE4N8iBhg69qQjyoCrV/P7yG+OSC95qtF4C6UQYx3NyTKEcFuC6pAb2mbUZ VAuPXNZ8R0zJvXwCbx+ZOkn7NeBChLm2jkOiJMEeQEM6QXgxxy6ieKdytKT8Nqb8mFJg wbSAHP5vv8sqFxDHg51tzMcepQfL4KdVjSzoDsiFYV2e1WU18CdkX89DAj49ytZX+l5P qldKQ3YxfgfYJXKO32VxZTOJm4ABUNx5zbiPnwu4cAKhoKWWjdnxW8EoM1PNG50efEfT YWpF/ucUtYgLVwILuy8N+yO9mqQJwRkDCbIcEgxzROvoqdE1zjDDhV//diA8RzzimDrt IDjw== X-Gm-Message-State: AOAM532Ua0UljpUSSp9v/kJVBWqaJA4Rn5Jv+CJ2op72fJqGkIqvOwSb msPgqmjL4y0c0KSD2Jg++Iv2JKAsWRP2xQ== X-Google-Smtp-Source: ABdhPJxidXmXDI7Ikw/Qjs9Fij6o+4oivUavxDNp3BqyD0Sj2M3G1miEdjfs8fGii/B0hrfUYL932g== X-Received: by 2002:a05:6402:1a4b:: with SMTP id bf11mr60806559edb.191.1594380015776; Fri, 10 Jul 2020 04:20:15 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id h15sm3446343eja.44.2020.07.10.04.20.14 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Jul 2020 04:20:14 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Ibai Erkiaga , Michal Simek , Simon Glass Subject: [PATCH] xilinx: Setup bootm variables Date: Fri, 10 Jul 2020 13:20:13 +0200 Message-Id: <4f41b6650930e51fa0ad0649835cf3670a2cada5.1594380012.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.27.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.3 at phobos.denx.de X-Virus-Status: Clean 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; }