From patchwork Mon Feb 7 12:30:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1589273 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=pQJ80ZbZ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Jslqb4R3Fz9s5B for ; Mon, 7 Feb 2022 23:31:07 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 16B9583CF6; Mon, 7 Feb 2022 13:30:55 +0100 (CET) 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.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.b="pQJ80ZbZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 996B883CF0; Mon, 7 Feb 2022 13:30:51 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) (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 0F52E83CF1 for ; Mon, 7 Feb 2022 13:30:48 +0100 (CET) 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-x62f.google.com with SMTP id s13so41564557ejy.3 for ; Mon, 07 Feb 2022 04:30:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20210112.gappssmtp.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RQGygsKWOZ3YGIgJprgl+kV7D+IGHdf2HWMpIP5/k6Q=; b=pQJ80ZbZOIsTZPXuRgdkHtCr484C906KzRItnF972r63LjjKBTtLsvkwT7mHdW3Rjt yjuWrvCDQ8XLWNf6ZpsAg+L0j6irxK/s58dapHnHlKj05FuRbifWeE2jjsh8JrVgTI54 svN0nihl+5d/7p2DgkeTnaVOOhWjyxHgvXOnF8S0uwsr2nEyQDUMEndyx16gKDrhmPhk 9sKPz+gQClyATVlvxTqATKbSqpfkH4VKzJHSudSQ60sJb5it8ZzU9sxLYZEYaQchWIVG 71r7KW7LW0LQxDi6F4UkJ0DGzGG0L3mtiLYGqHFGQ6jwgOTPucJ06rygcwSx8m+YTsXb 26zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=RQGygsKWOZ3YGIgJprgl+kV7D+IGHdf2HWMpIP5/k6Q=; b=r+RG6c3vT4aXJeWLL+N0Xx6veYTt3jiNTJGHNbSEOLVY9yoib3TvPz1kNYje1xuZuX 8HBmxWe68uJB2S4z2uR9E6nwFN/vt0Hr76xOGlkX5NgL/62QWG58cWVvD+DJ/r/3qhZR CgGCvguJuKa70T8dtGNtDnB4NCcHVK4IxJqMpMnhVU3gy+ed1dwB7ZwOgLUnC1S5ljte W7luFxY3wtZBeYChFE1yzXJg0xBATV/L51ZTdPMmsD/veLoFgXdHmh/uyutcTfoANnR5 L5l6ZTgw8j4NjDa6yFrTiYVszoLhY2ZxQzAOn70fPzbZtcFFRZZMlivBEMkK9y8n76mk BrSg== X-Gm-Message-State: AOAM5319T5ptzOkuK4M/wwswB7dJdAjazbNopmTwGotkzxujFtZsbCwh kBvRYq+7rFvHYFlAXhfDjvTZsh0w4zqX4w== X-Google-Smtp-Source: ABdhPJyO76ikmH9i2hVQ07Iup5ItJMbzyH2Y7QxOLdyvflmBqur1A4HqbzGml6vbhvSN6Oy/NN+gIg== X-Received: by 2002:a17:907:970e:: with SMTP id jg14mr9865589ejc.372.1644237047534; Mon, 07 Feb 2022 04:30:47 -0800 (PST) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id b7sm5148599edv.58.2022.02.07.04.30.47 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Feb 2022 04:30:47 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Ashok Reddy Soma , Alexandru Gagniuc , Artem Lapkin , Leo Yu-Chi Liang , Simon Glass Subject: [PATCH v2 2/3] zynqmp: Run board_get_usable_ram_top() only on main U-Boot Date: Mon, 7 Feb 2022 13:30:36 +0100 Message-Id: X-Mailer: git-send-email 2.35.0 In-Reply-To: <3039021757d837a192f7b5f4148dc5ba8589e9a3.1644237034.git.michal.simek@xilinx.com> References: <3039021757d837a192f7b5f4148dc5ba8589e9a3.1644237034.git.michal.simek@xilinx.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.5 at phobos.denx.de X-Virus-Status: Clean From: Ashok Reddy Soma With commit ce39ee28ec31 ("zynqmp: Do not place u-boot to reserved memory location"), the function board_get_usable_ram_top() is allocating MMU_SECTION_SIZE of about 2MB using lmb_alloc(). But we dont have this much memory in case of mini U-Boot. Keep these functions which use lmb under CONFIG_LMB so that they are compiled and used only when LMB is enabled. Signed-off-by: Ashok Reddy Soma Signed-off-by: Michal Simek --- (no changes since v1) board/xilinx/zynqmp/zynqmp.c | 3 +++ boot/image-board.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 242e143cbfd7..77dc70872d92 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -497,6 +497,7 @@ int dram_init(void) return 0; } +#if defined(CONFIG_LMB) ulong board_get_usable_ram_top(ulong total_size) { phys_size_t size; @@ -518,6 +519,8 @@ ulong board_get_usable_ram_top(ulong total_size) return reg + size; } +#endif + #else int dram_init_banksize(void) { diff --git a/boot/image-board.c b/boot/image-board.c index 0d2e0fc9692e..a3a3e28c3319 100644 --- a/boot/image-board.c +++ b/boot/image-board.c @@ -541,6 +541,7 @@ int boot_get_ramdisk(int argc, char *const argv[], bootm_headers_t *images, return 0; } +#if defined(CONFIG_LMB) /** * boot_ramdisk_high - relocate init ramdisk * @lmb: pointer to lmb handle, will be used for memory mgmt @@ -634,6 +635,7 @@ int boot_ramdisk_high(struct lmb *lmb, ulong rd_data, ulong rd_len, error: return -1; } +#endif int boot_get_setup(bootm_headers_t *images, u8 arch, ulong *setup_start, ulong *setup_len) @@ -827,6 +829,7 @@ int boot_get_loadable(int argc, char *const argv[], bootm_headers_t *images, return 0; } +#if defined(CONFIG_LMB) /** * boot_get_cmdline - allocate and initialize kernel cmdline * @lmb: pointer to lmb handle, will be used for memory mgmt @@ -934,6 +937,7 @@ int image_setup_linux(bootm_headers_t *images) return 0; } +#endif void genimg_print_size(uint32_t size) {