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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 244BBC433EF for ; Fri, 29 Oct 2021 14:03:35 +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 68BE96117A for ; Fri, 29 Oct 2021 14:03:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 68BE96117A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.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 7D22883390; Fri, 29 Oct 2021 16:03:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="eHpcg8in"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EF8458356D; Fri, 29 Oct 2021 16:03:29 +0200 (CEST) Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) (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 81C588321B for ; Fri, 29 Oct 2021 16:03:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pj1-x102c.google.com with SMTP id oa4so7288196pjb.2 for ; Fri, 29 Oct 2021 07:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=psvIEkVqf+F2xe0QTnnmXGYUGXlWOrJVqdzwVVto0FQ=; b=eHpcg8inGJK+fQTVPXWyLU+Tr6YON/7oJKD5nCDjNnRropzgHreTZAQQj6JLt0wPd9 YhVod7EFPhHLCfvL6SV2Dyu8Qa8ZPaA7WIp9FhpaqiUqziqm7nf9zjPAgvkGvpz8CN7r tztGOKVcKxZjEeI2V/RKCV5v1Jd46wzYej4an9KLKcV0f8OFAhPxIU9ie1m4ij8ERojr rYmAMrEtQ7bfvcds0Wx8BNt+HAzj3+4lEDsnUBTww86/SYiCg7zVKhngKVdvM+3oEIKJ r757y9q9d6gaSWhJvp+PzF+BAXprMZz7+hXJJNJIykEFbT8mbB2Xn92qA7qJUxsbbXRu kLFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=psvIEkVqf+F2xe0QTnnmXGYUGXlWOrJVqdzwVVto0FQ=; b=wanyrKjXUJG/obOZ1D+UgW+Bp1UUOlOWGAro6btABGEsMJ3qN3XJNsuQZHjbgAgcAB 2j8IhHTU0DspGYr/3PMs3j2kJNaLuWTUPJ04P8qPJcZsNNQVBMHTA2ytzezkcGe7kRgw TZT0gMBwF2bNGTlFlHodJ0fHlY3qiPvW+ktcqkDMqYbozgR05fJp04K38PbO82n+U7iv B3peHIjOOF3yzj7Oxe0OaHcOhDhFM4l4tbh5KwjmsTeW2iNtkH42/wyJBTlhabe6EBNU STC1TmSP6tngOIjOkMO32CETbvmU7MFFoumrILo1f23mLwn+sCTKIf8XnIBptM868IYw SlvQ== X-Gm-Message-State: AOAM531es6ULaQogejZDCD3hA/dwKYgKFUEOGRF5nwDpJqB1xG0L6YvW CL8kqu26IMaLoc3ECNFSEUSfMA== X-Google-Smtp-Source: ABdhPJykDN+Sc5sei2McRHZbl1kADgpzqWXxN9pzxFZkzfNYoerIAScpmuM/ms8AotbMzJqnBiTGVQ== X-Received: by 2002:a17:902:7885:b0:13e:ecb:f214 with SMTP id q5-20020a170902788500b0013e0ecbf214mr9785765pll.87.1635516200966; Fri, 29 Oct 2021 07:03:20 -0700 (PDT) Received: from laputa ([2400:4050:c3e1:100:99fd:f5c5:d3a8:a6cf]) by smtp.gmail.com with ESMTPSA id k3sm10257874pjg.43.2021.10.29.07.03.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Oct 2021 07:03:20 -0700 (PDT) Date: Fri, 29 Oct 2021 23:03:15 +0900 From: AKASHI Takahiro To: Ilias Apalodimas Cc: Tom Rini , Simon Glass , U-Boot Mailing List , Michal Simek , Heinrich Schuchardt , Daniel Schwierzeck , Steffen Jaeckel , Marek Beh??n , Lukas Auer , Dennis Gilmore Subject: Re: [PATCH v2 31/41] bootstd: Add an implementation of EFI boot Message-ID: <20211029140315.GA81821@laputa> Mail-Followup-To: AKASHI Takahiro , Ilias Apalodimas , Tom Rini , Simon Glass , U-Boot Mailing List , Michal Simek , Heinrich Schuchardt , Daniel Schwierzeck , Steffen Jaeckel , Marek Beh??n , Lukas Auer , Dennis Gilmore References: <20211023232635.9195-1-sjg@chromium.org> <20211023232635.9195-22-sjg@chromium.org> <20211029123907.GS8284@bill-the-cat> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Fri, Oct 29, 2021 at 04:42:45PM +0300, Ilias Apalodimas wrote: > Hi Tom, > > On Fri, 29 Oct 2021 at 15:39, Tom Rini wrote: > > > > On Fri, Oct 29, 2021 at 08:45:06AM +0300, Ilias Apalodimas wrote: > > > On Wed, Oct 27, 2021 at 12:34:40PM -0600, Simon Glass wrote: > > > > Hi Ilias, > > > > > > > > On Wed, 27 Oct 2021 at 08:48, Ilias Apalodimas > > > > wrote: > > > > > > > > > > Hi Simon, > > > > > > > > > > On Wed, Oct 27, 2021 at 08:09:04AM -0600, Simon Glass wrote: > > > > > > Hi Ilias, > > > > > > > > > > > > On Wed, 27 Oct 2021 at 02:36, Ilias Apalodimas > > > > > > wrote: > > > > > > > > > > > > > > Hi Simon, > > > > > > > > > > > > > > On Sun, 24 Oct 2021 at 02:27, Simon Glass wrote: > > > > > > > > > > > > > > > > Add a bootmeth driver which handles EFI boot, using EFI_LOADER. > > > > > > > > > > > > > > > > In effect, this provides the same functionality as the 'bootefi' command > > > > > > > > and shares the same code. But the interface into it is via a bootmeth, > > > > > > > > so it does not require any special scripts, etc. > > > > > > > > > > > > > > > > For now this requires the 'bootefi' command be enabled. Future work may > > > > > > > > tidy this up so that it can be used without CONFIG_CMDLINE being enabled. > > > > > > > > > > > > > > I'll leave this up to Heinrich, but personally I wouldn't include this > > > > > > > patch at all. EFI has it's bootmgr which can handle booting just fine. > > > > > > > I don't see why we should duplicate the functionality. The new boot > > > > > > > method can just have an entry called 'EFI' and then let the existing > > > > > > > EFI code to decide. > > > > > > > > > > > > This is needed so that EFI boot is actually invoked. If bootmgr starts > > > > > > being used then it can still be invoked from standard boot. The point > > > > > > is that there is a standard way of booting that supports EFI and other > > > > > > things. > > > > > > > > > > This patch tries to reason about the default naming EFI imposes on it's > > > > > boot files. distro_efi_read_bootflow() will try to find files following the > > > > > EFI naming convention (e.g bootaarch64.efi, bootarm.efi etc). If those are > > > > > found it will try to boot them right? That's not the right thing to do though. > > > > > On the EFI spec these files are tried if no Boot#### variables are found. > > > > > So we can get rid of this entirely, add a dummy entry on the bootflow that > > > > > says 'boot the efi manager' (which is what the next patch does). > > > > > > > > > > The efibootmgr then will check Boot#### variables and if none are found, > > > > > it's going to fallback into loading bootaarch64.efi, bootarm.efi etc > > > > > essentially offering identical functionality. > > > > > > > > Yes that's fine, and when EFI's boot manager is in use I have a driver > > > > for that too, as you can see in the other patch. We may need to adjust > > > > the order, by the sound of it, if it needs to run before EFI things. > > > > But that is easy enough. > > > > > > That's the point though. I don't want to have 2 different ways of booting EFI > > > as I don't see any benefit. Do you? > > > > Unless we're saying that "bootefi bootmgr" is ready to be used always > > and without further pre-req support (which I don't think is quite the > > case, since we don't have persistent EFI vars, so can't set Boot### > > persistently or via userspace) _something_ is likely needed to either > > set those, or scan a configurable list of where, to find the EFI > > payload. > > The efibootmgr will try to boot bootaa64.efi, bootarm.efi etc if > Boot### variables are not found. To be clear, the current efibootmgr (or "bootefi bootmgr" command) doesn't have this feature. Instead, distro_bootcmd mimics it in some way. # I have an experimental patch to efibootmgr for the support, though. Nevertheless, > The Boot#### themselves are > obviously configurable from U-Boot(at boot time). Since this method > doesn't allow Linux to edit the boot options either,> Yeah. Please remember that, even on normal PCs, specifying an order of boot devices (for "removable media" with the default path) is done through UEFI UI. -Takahiro Akashi > is it something > we need? Since distros usually name their SHIM as bootaa64.efi, I am > afraid we are adding code that we will rarely (if at all) ever use. > > Regards > > > /Ilias > > > > -- > > Tom