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 X-Spam-Level: X-Spam-Status: No, score=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D607C433F5 for ; Thu, 9 Sep 2021 08:58:42 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 9151361051 for ; Thu, 9 Sep 2021 08:58:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9151361051 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D13CC8326D; Thu, 9 Sep 2021 10:58:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="W+lVQjL3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B829A83223; Thu, 9 Sep 2021 10:57:52 +0200 (CEST) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (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 86D458322D for ; Thu, 9 Sep 2021 10:57:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-wr1-x431.google.com with SMTP id z4so1431863wrr.6 for ; Thu, 09 Sep 2021 01:57:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b+Mj8T2r/EZ/POwwMvgGIDsQeiSvbuHlcIVWqRVR8Cs=; b=W+lVQjL3xTqRQ/jiKrVgY2JWPQgdS+E7rpY8d5Af9o+jjea6ukDqnCb3E2wMTiSlOt a5D7jNDHqa6Orl7r0UoVoXDV7ZurAcbl3oEfubMJtmHxqwLpmC/FbTzdy/w/hN7OwLpH IT/tAdv/6fHrUQdRKwRtPYoToU0ESZzjFAWXc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b+Mj8T2r/EZ/POwwMvgGIDsQeiSvbuHlcIVWqRVR8Cs=; b=7Osgp6v5xk2nwJP0Lch8+YBXIX6yVt92pwWGiXJZjSt4KS2nXIbEG2f28Qc8ZKQuVI yN1I2WggNVpEIvZlEjrSD5NLZVGJH9JHqn70kGyKAJvOnDBDZN6LW9l4bE847zujlNj0 N5/x/E5h5FpllfT0vSYd1QwrNdjEUhy+NtcXzrqlS7/N9dU3qf8oTyjZNTIGOr4yJmy5 RA9f5qlT5bnvrnyX9Z4qrATlrmVXhJQBgC9cpszHmk1OrYbIlYggwmY15F+eoN8cp7Qo amzYiw+hymKvwH4BgVkYTsDDuB6OIqDytYTBdOAmSk7OmTZ463kVwp5mM1dgLtrSj99e 4I/w== X-Gm-Message-State: AOAM5304jX0UeNFCOI7mrNGWHVkXdCSaXYRQAR+CNBeuuWMGaKkKuNv6 VvwaODwyToYakrOthZiRsQGCH/MSCHGEz1eHnrc5/A== X-Google-Smtp-Source: ABdhPJykN/MDwJuQ6gIss+5utxKrctmN9y10hsxDrC/Sw7njrc/jN0Z/2eH3G38ADIisYIDxAE7GD5SMAgusXWi9Cmo= X-Received: by 2002:a05:6000:1150:: with SMTP id d16mr2202120wrx.357.1631177855246; Thu, 09 Sep 2021 01:57:35 -0700 (PDT) MIME-Version: 1.0 References: <20210908133405.696481-1-sjg@chromium.org> <20210908073355.6.Id32ab4eff4b2a6b82fed22813a01fc2a08c6e0a5@changeid> In-Reply-To: From: Simon Glass Date: Thu, 9 Sep 2021 02:57:22 -0600 Message-ID: Subject: Re: [PATCH 06/35] x86: Create a 32/64-bit selection for the app To: Heinrich Schuchardt Cc: U-Boot Mailing List , Ilias Apalodimas , Bin Meng , Tom Rini , Christian Melki Content-Type: text/plain; charset="UTF-8" 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.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Heinrich, On Wed, 8 Sept 2021 at 11:40, Heinrich Schuchardt wrote: > > > > On 9/8/21 3:33 PM, Simon Glass wrote: > > Most EFI implementations use 64-bit. In order to spupose a 64-bit app, > > %s/spupose/support > > > update the Kconfig to add an option for 32/64 bit. Update the prompt for > > This commit message is unclear. We already can compile U-Boot as an > 64bit EFI application. "In order to support" would imply that we don't. Which board are you talking about? There is only the 64-bit payload at present, certainly no 64-bit app? > > > > the existing option so it is clear it relates to the stub. Move both > > up to just under the choice that controls them, since this looks better > > and the menu. > > > > Use CONFIG_EFI_APP in the Makefile instead of CONFIG_TARGET_EFI_APP, > > since the latter is specific to a single target and we will have two. > > > > Signed-off-by: Simon Glass > > --- > > > > arch/x86/cpu/intel_common/Makefile | 2 +- > > lib/efi/Kconfig | 34 +++++++++++++++++++++++------- > > 2 files changed, 27 insertions(+), 9 deletions(-) > > > > diff --git a/arch/x86/cpu/intel_common/Makefile b/arch/x86/cpu/intel_common/Makefile > > index 8b9a810f66d..1dc17b45879 100644 > > --- a/arch/x86/cpu/intel_common/Makefile > > +++ b/arch/x86/cpu/intel_common/Makefile > > @@ -27,7 +27,7 @@ obj-y += fast_spi.o > > obj-y += lpc.o > > obj-y += lpss.o > > obj-$(CONFIG_$(SPL_)INTEL_GENERIC_WIFI) += generic_wifi.o > > -ifndef CONFIG_TARGET_EFI_APP > > +ifndef CONFIG_EFI_APP > > obj-$(CONFIG_$(SPL_TPL_)X86_32BIT_INIT) += microcode.o > > ifndef CONFIG_$(SPL_)X86_64 > > obj-y += microcode.o > > diff --git a/lib/efi/Kconfig b/lib/efi/Kconfig > > index 93b85644920..e818cef0d15 100644 > > --- a/lib/efi/Kconfig > > +++ b/lib/efi/Kconfig > > @@ -26,18 +26,26 @@ config EFI_STUB > > > > endchoice > > > > -config EFI_RAM_SIZE > > - hex "Amount of EFI RAM for U-Boot" > > +choice > > + prompt "EFI app 32/64-bit selection" > > depends on EFI_APP > > - default 0x2000000 > > help > > - Set the amount of EFI RAM which is claimed by U-Boot for its own > > - use. U-Boot allocates this from EFI on start-up (along with a few > > - other smaller amounts) and it can never be increased after that. > > - It is used as the RAM size in with U-Boot. > > + EFI does not support mixing 32-bit and 64-bit modes. This is a > > + significant problem because it means that you must build a stub with > > + the correct type for EFI to load it correctly. If you are using > > + 32-bit EFI, select 32-bit here, else select 64-bit. Failure to do > > + this may produce no error message - it just won't start! > > + > > +config EFI_APP_32BIT > > + bool "Produce an app for running with 32-bit EFI" > > + > > +config EFI_APP_64BIT > > + bool "Produce an app for running with 64-bit EFI" > > + > > +endchoice > > > > choice > > - prompt "EFI 32/64-bit selection" > > + prompt "EFI stub 32/64-bit selection" > > depends on EFI_STUB > > help > > EFI does not support mixing 32-bit and 64-bit modes. This is a > > @@ -53,3 +61,13 @@ config EFI_STUB_64BIT > > bool "Produce a stub for running with 64-bit EFI" > > > > endchoice > > + > > +config EFI_RAM_SIZE > > + hex "Amount of EFI RAM for U-Boot" > > + depends on EFI_APP > > + default 0x2000000 > > 32 MiB is quite small for loading a kernel and an initrd. It does run nicely in qemu though without needing a special -m value. What do you suggest? Regards, Simon