From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 72777C433F5 for ; Tue, 15 Feb 2022 11:53:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6144A839FB; Tue, 15 Feb 2022 12:53:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="SmSP0RE9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7FB8E83A2B; Tue, 15 Feb 2022 12:53:06 +0100 (CET) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (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 BDB50839ED for ; Tue, 15 Feb 2022 12:52:59 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=alpernebiyasak@gmail.com Received: by mail-ed1-x52c.google.com with SMTP id z13so13336019edc.12 for ; Tue, 15 Feb 2022 03:52:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject:to:cc :references:content-language:in-reply-to:content-transfer-encoding; bh=1T6FAtiDXFh3xXT97lBFuwFEDhC14Zyl+bml4k8KoJk=; b=SmSP0RE9CpshGoKCVfwXchbWqwLeItngXyKGzlbjr7OQ2Gr1Rzqk+ktwtDwFHIKJWA 0kEbnm8v9yOoLcxYw6JeUuSWM/daUW+gRwpXE82DglcP9QjIyQT3kgAx8s51vzZvTyI6 4TbYsbZPUzNh3T/HnUF7z4bxbVWsPBFRu2bEGEMyJuBPFjLIv4D72yIW0iaIVBkjrKGH DCYyxA4TXe6P62kdHiaIzswp+kBumma4xjNgcLh9kdPda8/+plI2INcvoDnujoAj4azg FY1Iy9qMdb0yfo+oHg2p84WNO8/jWj7y+5ZFSFMHS/I3y0NqZPh805b1f1tDKHGoXWFy knTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:to:cc:references:content-language:in-reply-to :content-transfer-encoding; bh=1T6FAtiDXFh3xXT97lBFuwFEDhC14Zyl+bml4k8KoJk=; b=CC8oI078Ex+0uyQUex4HucPh10ZWGCrsZ0MCrkUfT8MNwGnovvhET9So19jhz0qro3 IICWStGDNtLDjCbC3Al3HS/IRb4OUQG2FrS8mSUCBvru8Fg2azPU7JwkS+4zJpMXyW1r UX6m5UlmPq1Zlx9cc4PlwGbTfp7OhBvmmuUs7k1j1ozxmvVCJxEuCN3K5YNy82j1nZ1d 71K3PJKUepyxOPM8g/bvy4wuObgBZwloF8FN2c7BNjb9M2gWAbXQdt8OlVi9qbGYqZg1 Yu6ZCQeg90773qXOGevArYaoLaponpxSEPyghIPL/9P4GHFI+KAXkEOhqFy7C1yWHWVy I4qQ== X-Gm-Message-State: AOAM5330/KDZUbQrZQh8MazgJy5areWEtcXLxxekPJRp0BH0mxNgYUHT mVV+0ftzP6xnrEoZPMQvXJM= X-Google-Smtp-Source: ABdhPJyruOd7hD8kmfBXzZqZNPFzI7QVmkHvaOxHcNL80XK5b3aqAzqNT6iX6Ef/39gyy07gFXo8MQ== X-Received: by 2002:a05:6402:1910:: with SMTP id e16mr3493772edz.168.1644925979417; Tue, 15 Feb 2022 03:52:59 -0800 (PST) Received: from [192.168.0.74] ([178.233.26.119]) by smtp.gmail.com with ESMTPSA id s3sm3774934edd.82.2022.02.15.03.52.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Feb 2022 03:52:59 -0800 (PST) Message-ID: Date: Tue, 15 Feb 2022 14:42:51 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 From: Alper Nebi Yasak Subject: Re: [PATCH 04/24] spl: Allow disabling binman symbols in SPL To: Simon Glass , U-Boot Mailing List Cc: huang lin , Jeffy Chen , Kever Yang , Tom Rini , Philippe Reynes , Ivan Mikhaylov , Alexandru Gagniuc , Bin Meng , Jaehoon Chung , =?UTF-8?Q?Marek_Beh=c3=ban?= , Michal Simek , =?UTF-8?Q?Pali_Roh=c3=a1r?= , Ricardo Salveti , Stefan Roese References: <20220208185008.35843-1-sjg@chromium.org> <20220208185008.35843-3-sjg@chromium.org> Content-Language: en-US In-Reply-To: <20220208185008.35843-3-sjg@chromium.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 On 08/02/2022 21:49, Simon Glass wrote: > When CONFIG_SPL_FIT is enabled we do not access U-Boot directly in > the image, since it is embedded in a FIT which is parsed at runtime. > > Provide a CONFIG option to drop the symbols in this case. > > Signed-off-by: Simon Glass > --- > > common/spl/Kconfig | 24 ++++++++++++++++++++++++ > common/spl/spl.c | 4 ++++ > 2 files changed, 28 insertions(+) > > diff --git a/common/spl/Kconfig b/common/spl/Kconfig > index e0d0a6f77b..9418d37b2e 100644 > --- a/common/spl/Kconfig > +++ b/common/spl/Kconfig > @@ -101,6 +101,18 @@ config SPL_SHOW_ERRORS > > This adds a small amount to SPL code size, perhaps 100 bytes. > > +config SPL_BINMAN_SYMBOLS > + bool "Declare binman symbols in SPL" > + depends on SPL_FRAMEWORK && BINMAN > + default y > + help > + This enables use of symbols in SPL which refer to U-Boot, enabling SPL > + to obtain the location of U-Boot simply by calling spl_get_image_pos() > + and spl_get_image_size(). > + > + For this to work, you must have a U-Boot image in the binman image, so > + binman can update SPL with the location of it. > + > menu "PowerPC and LayerScape SPL Boot options" > > config SPL_NAND_BOOT > @@ -1321,6 +1333,18 @@ config TPL_SIZE_LIMIT > Specifies the maximum length of the U-Boot TPL image. > If this value is zero, it is ignored. > > +config TPL_BINMAN_SYMBOLS > + bool "Declare binman symbols in SPL" SPL -> TPL here and two more in the help text. > + depends on SPL_FRAMEWORK && BINMAN > + default y > + help > + This enables use of symbols in TPL which refer to U-Boot, enabling SPL > + to obtain the location of U-Boot simply by calling spl_get_image_pos() > + and spl_get_image_size(). > + > + For this to work, you must have a U-Boot image in the binman image, so > + binman can update SPL with the location of it. > + > config TPL_FRAMEWORK > bool "Support TPL based upon the common SPL framework" > default y if SPL_FRAMEWORK > diff --git a/common/spl/spl.c b/common/spl/spl.c > index 444907432c..b452d4feeb 100644 > --- a/common/spl/spl.c > +++ b/common/spl/spl.c > @@ -49,9 +49,11 @@ DECLARE_GLOBAL_DATA_PTR; > > u32 *boot_params_ptr = NULL; > > +#if CONFIG_IS_ENABLED(BINMAN_SYMBOLS) > /* See spl.h for information about this */ > binman_sym_declare(ulong, u_boot_any, image_pos); > binman_sym_declare(ulong, u_boot_any, size); > +#endif > > #ifdef CONFIG_TPL > binman_sym_declare(ulong, u_boot_spl, image_pos); > @@ -140,6 +142,7 @@ void spl_fixup_fdt(void *fdt_blob) > #endif > } > > +#if CONFIG_IS_ENABLED(BINMAN_SYMBOLS) > ulong spl_get_image_pos(void) > { > return spl_phase() == PHASE_TPL ? > @@ -153,6 +156,7 @@ ulong spl_get_image_size(void) > binman_sym(ulong, u_boot_spl, size) : > binman_sym(ulong, u_boot_any, size); > } > +#endif /* BINMAN_SYMBOLS */ > > ulong spl_get_image_text_base(void) > {