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 AD32BC61DA4 for ; Sun, 5 Feb 2023 02:01:54 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3A0238576B; Sun, 5 Feb 2023 03:01:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="kAcCDxY/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 82E378576F; Sun, 5 Feb 2023 03:01:50 +0100 (CET) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (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 7DFD085745 for ; Sun, 5 Feb 2023 03:01:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x836.google.com with SMTP id x10so2588007qtr.2 for ; Sat, 04 Feb 2023 18:01:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=xI9o9PYhRx5yXw/2LvGIF8NPy62HO0l/cNLn1ID+PHg=; b=kAcCDxY/+DYjBE5kWPp3KLkfFb9kmOV5kMNm4hwHoHqLj99Uo6ASvjhBT1HS3shxMo petwYVGMWP3xwFP2ZSuz27hv1fZ66MR+64Z0cMRYhwJbH8tflt1YgT+1gA7iGBKf8m5U Lg6k9TKkwGW+6sES36ugHg6ifI9BU6hy7VrKE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xI9o9PYhRx5yXw/2LvGIF8NPy62HO0l/cNLn1ID+PHg=; b=wEfu1u3SprRAEEzsYJujcPINl7s7Kv2uoh2zT1mrcHXdKT1uWJbY9oc4EZh+UaFRCV F/iS2Vbb9lGw3nxLbECKP7j2JjxjutNCs1TsPotjCys+cBYoVMq8Q7Z2jdzr2epIAEOU Do9zRNuuGd5tKiO7NQ4p9RYBujUdm+er8spKiZUDqo1qKhKG15nYWq44PUFaE7Wywy/j BbloMAiSxFm2UUTNBHs8yzs1pA1igoB9OFTdR9PwfUwoMtG9yLdO+PvHe0euGA7ond/f 2LR7t3fAjYmUnLXKqvWMH+uGAPLCbSVNYVqjsRvEqOrmN52rsZBAgxC7wE0XvwAt6f1Q 1+iw== X-Gm-Message-State: AO0yUKVp0fHGCFsyZE/+MWcVhYyRdjrEf3Flci3tC6uySTtAZ3BGM46A ZJijnr9b4RQSjriZRx2b3Yh2SQ== X-Google-Smtp-Source: AK7set9UpRAXQwgpnBQjs94Loneg5VKKJJAoai26SxNy7jHD4euoRwQb28on/r6h+ZONEDvKRbNp2Q== X-Received: by 2002:ac8:5b06:0:b0:3b8:2ddc:3474 with SMTP id m6-20020ac85b06000000b003b82ddc3474mr28648423qtw.45.1675562506149; Sat, 04 Feb 2023 18:01:46 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-e262-5321-61d7-c2e4.res6.spectrum.com. [2603:6081:7b00:6400:e262:5321:61d7:c2e4]) by smtp.gmail.com with ESMTPSA id o28-20020ac8429c000000b003b880ef08acsm4531238qtl.35.2023.02.04.18.01.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Feb 2023 18:01:44 -0800 (PST) Date: Sat, 4 Feb 2023 21:01:42 -0500 From: Tom Rini To: Simon Glass Cc: Heinrich Schuchardt , Ilias Apalodimas , U-Boot Mailing List Subject: Re: [PATCH 020/171] efi: Add a Kconfig for SPL_EFI_LOADER et all Message-ID: References: <20230130144324.206208-1-sjg@chromium.org> <20230130144324.206208-21-sjg@chromium.org> <238e6d5b-4ac2-a16f-a3ec-b3df8194be51@gmx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="HpCyEselLrdQZ6NG" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett 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.6 at phobos.denx.de X-Virus-Status: Clean --HpCyEselLrdQZ6NG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 04, 2023 at 06:21:48PM -0700, Simon Glass wrote: > Hi Tom, Heinrich, >=20 > On Mon, 30 Jan 2023 at 07:51, Tom Rini wrote: > > > > On Mon, Jan 30, 2023 at 03:48:44PM +0100, Heinrich Schuchardt wrote: > > > On 1/30/23 15:40, Simon Glass wrote: > > > > This and EFI_DEVICE_PATH_TO_TEXT are implicitly used in the source = and > > > > > > This code is not compiled in SPL. So it cannot be used there. > > > > > > > seem useful, so add them. > > > > > > > > Signed-off-by: Simon Glass > > > > --- > > > > > > > > lib/efi_loader/Kconfig | 8 ++++++++ > > > > 1 file changed, 8 insertions(+) > > > > > > > > diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig > > > > index 9fe9a2df9ea..0bd42b9e196 100644 > > > > --- a/lib/efi_loader/Kconfig > > > > +++ b/lib/efi_loader/Kconfig > > > > @@ -32,6 +32,10 @@ config EFI_LOADER > > > > > > > > if EFI_LOADER > > > > > > > > +config SPL_EFI_LOADER > > > > + def_bool n # Support running UEFI applications (SPL) > > > > + depends on SPL > > > > + > > > > > > I cannot see how this could be used: > > > > > > * The size of the EFI code is too big to fit into SPL on most boards. > > > > OK, so please do a series to correct all CONFIG_IS_ENABLED(EFI_*) to be > > IS_ENABLED(CONFIG_EFI_*), other than EFI_PARTITIONS which can be in SPL. >=20 > This is another case where I think it is actually needed. >=20 > Heinrich makes the point that this code cannot be used in SPL. It is > precisely because of that that we need an SPL version of the config. > Otherwise it will be enabled everywhere. The fact that it currently > works is due to CONFIG_IS_ENABLED() not caring whether the Kconfig > options it is checking are present or not. That needs to change with > split config. OK, so this belongs in the split config series then. That today CONFIG_IS_ENABLED(FOO) evaluates to false if we never define SPL/TPL/VPL_FOO as a symbol is a feature, not a glitch, of the system. It's used both in cases like you further explained around EFI_LOADER where we do have some additions to core functionality (like printing EFI paths in lib/vsprintf.c) that will never be needed in SPL, but modify code that is included in SPL, so it cannot just use IS_ENABLED or an ifdef as that would be true in SPL, and bloat the code, so we rely on an always false test. It's also been used a time or two for the case of "today no one has SPL_FOO, but in the future they may, and would want this path to be taken". That is rarer, but I know I did that at least once. --=20 Tom --HpCyEselLrdQZ6NG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmPfDgMACgkQFHw5/5Y0 tyy71gwAjxOz24h0dKz4T4voN5MP/Z+rU25ouZly9uO8Dh53yG8nG7/NmrYO0dze xulTUpeJXmiUjHhWipJaZDi9/NKZoLbj98SjWEuIZkPuhWlyZauLgEkW8fpZlzf/ SB28gzzVHHSxQ3PDur/9zCcTPhmfJUr3+bUJ9Bs5+q1G3fYcSsjmEVWUj0aCNUL+ N9jjMs6GOJHUIwVT7Kb1+Pn9Wwi575rIc3IiwURZODnyJC2f+/ZciZupaywLnOMx FHJ2ZFm92KwB/KsHRwxF0PoIA8VuCk/5l64XOnyjsmc5i3Q94+rbb27LldEFDMIr QjzzrBfKHxqofI8cQnt7xUCYqawKBrlsfi/Ol4O/C5pmVxYXH4cl9YKXh+Jog1YJ OcdVFo5z53OB3EI7SgWpznDWbTlh24OSKT9JPymzfvCB4ksAfSGX1O77XgbUQR+W BryQjSZHODT9mWY/1lL8iLw2h5O36KzixSBAlSYLDBkK01VnhzRxx7xRKUvhhkzV skfEUIlM =12/c -----END PGP SIGNATURE----- --HpCyEselLrdQZ6NG--