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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 D2501C11F66 for ; Tue, 29 Jun 2021 14:14:33 +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 2079D610E6 for ; Tue, 29 Jun 2021 14:14:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2079D610E6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 14FDE8313E; Tue, 29 Jun 2021 16:14: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="ZV88zFry"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B661882D76; Tue, 29 Jun 2021 16:14:29 +0200 (CEST) Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) (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 83FB582D76 for ; Tue, 29 Jun 2021 16:14:25 +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-pg1-x530.google.com with SMTP id e20so18654856pgg.0 for ; Tue, 29 Jun 2021 07:14:25 -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=F9Zhc1GJd1tt3/ftT069ZL0naIHiumLQ2i21Yhl2sDM=; b=ZV88zFryxUVOntjeThLSX+kyg/u6nzdmAGERuBr6iwKlN6ZtRCitCta+b7wgkCQ/yu 5W7x3zbb7cT3clv7181j+U38Y/d+2mgFKDqO8H3AdXPXxIrXKWsd3N8urb+QmcM1f5YX A6fir+dWKFydvQ0Kiy7QOvPI4yRQfkeIUAsWO9vIh0UGEi3WCgao3KcY0xuvydp72wfT DqpSgUsGCxwt91ppiTVACyu7265mDYUuGBpLdwOxvQGPo7uP9MZjnAk/TOOHjucP7hjb 9pFQsx4DqD6Llfn9p321ouNLmg66EYAjD4yU6wGEKJ56CApvxKFRX+/kUKMxG383xEro NB3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=F9Zhc1GJd1tt3/ftT069ZL0naIHiumLQ2i21Yhl2sDM=; b=rBo8L4kcKQpMWwmnAdutkz1/+fbS4LRXJ8Dn5FBvxdOhr2LOhl4m8qNaCaEsAdvUkV vBX0PdtUOonabkQ1j/g7rnDWmh/VgV1nlKjFFa0/DUYf3fdL8iEvz6CPS0yM/RloYI+T /qvGiThsTwkhk2XGqOIN7lCoHJid1moQugDt5LwSMA0lZiATPJ6KrZMH6Uz84vpA7q7G wHEgRCUinQVjRMRu2IbkwWu96dtgRFY8DwCvGuSLdbGVFN330vogr9B/6d5nkgaSOvEP 1/mj/jjqiEDM6STmIn/SmrtN3KwGAo99TOjQ/f6+q8pg7jx+REFDlDi9+QVjP2S4UIJ/ iajQ== X-Gm-Message-State: AOAM533AvQ6CtCaUqjV3ly0Wa7tREIvfmS56xW8d3GWG+zIjEXEfRnjo KnyOCL1Vgpa1dwxFYlIUbzX9Xg== X-Google-Smtp-Source: ABdhPJyl8jejVVzc+K5s+bpN+NycKL0BtWb5Co3E1ZytiSXGpQgtTUpiP/g0emBX1nEpZmf+y5mISg== X-Received: by 2002:a65:508d:: with SMTP id r13mr29113001pgp.36.1624976063925; Tue, 29 Jun 2021 07:14:23 -0700 (PDT) Received: from laputa (p3dd30534.tkyea130.ap.so-net.ne.jp. [61.211.5.52]) by smtp.gmail.com with ESMTPSA id h24sm18489331pjv.27.2021.06.29.07.14.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Jun 2021 07:14:23 -0700 (PDT) Date: Tue, 29 Jun 2021 23:14:18 +0900 From: AKASHI Takahiro To: Heinrich Schuchardt Cc: Simon Glass , Tom Rini , Mark Kettenis , U-Boot Mailing List , Pali Roh??r , Ilias Apalodimas , Alex Graf , Masahiro Yamada Subject: Re: [PATCH 0/7] efi: Various tidy-ups and drop the default Message-ID: <20210629141418.GE48515@laputa> Mail-Followup-To: AKASHI Takahiro , Heinrich Schuchardt , Simon Glass , Tom Rini , Mark Kettenis , U-Boot Mailing List , Pali Roh??r , Ilias Apalodimas , Alex Graf , Masahiro Yamada References: <20210628014841.501036-1-sjg@chromium.org> <5613706c36261e2a@bloch.sibelius.xs4all.nl> <20210628133711.GY9516@bill-the-cat> <5a197768-3d0a-3b3b-5897-ed28d4e0f566@gmx.de> <20210628172744.GQ9516@bill-the-cat> <20210629125613.GA48515@laputa> <5a2667b1-7a65-cd73-652a-a3be2d508ffe@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5a2667b1-7a65-cd73-652a-a3be2d508ffe@gmx.de> 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 Tue, Jun 29, 2021 at 04:01:38PM +0200, Heinrich Schuchardt wrote: > On 6/29/21 2:56 PM, AKASHI Takahiro wrote: > > On Mon, Jun 28, 2021 at 12:08:27PM -0600, Simon Glass wrote: > > > Hi Tom, > > > > > > On Mon, 28 Jun 2021 at 11:27, Tom Rini wrote: > > > > > > > > On Mon, Jun 28, 2021 at 10:26:35AM -0600, Simon Glass wrote: > > > > > Hi Heinrich, > > > > > > > > > > On Mon, 28 Jun 2021 at 09:20, Heinrich Schuchardt wrote: > > > > > > > > > > > > On 6/28/21 4:18 PM, Simon Glass wrote: > > > > > > > Hi Tom, Mark, > > > > > > > > > > > > > > On Mon, 28 Jun 2021 at 07:37, Tom Rini wrote: > > > > > > > > > > > > > > > > On Mon, Jun 28, 2021 at 10:38:50AM +0200, Mark Kettenis wrote: > > > > > > > > > > From: Simon Glass > > > > > > > > > > Date: Sun, 27 Jun 2021 19:48:34 -0600 > > > > > > > > > > > > > > > > > > > > It has come to light that EFI_LOADER adds an extraordinary amount of > > > > > > > > > > code to U-Boot. For example, with nokia_rx51 the size delta is about > > > > > > > > > > 90KB. About 170 boards explicitly disable the option, but is is clear > > > > > > > > > > that many more could, thus saving image size and boot time. > > > > > > > > > > > > > > > > > > EFI_LOADER used to be a lot smaller. It is great to see that over the > > > > > > > > > years UEFI support has become more complete, but a lot of that new > > > > > > > > > code implements features that are not at all essential for just > > > > > > > > > booting an OS from storage. If that growth leads to the suggestion to > > > > > > > > > disable EFI_LOADER completely by default, we're putting the cart > > > > > > > > > before the horse. > > > > > > > > > > > > > > > > Well, I see I forgot to prefix my patch with RFC, but I hadn't found > > > > > > > > EFI_LOADER being used in the wild on armv7, but wasn't sure about the > > > > > > > > BSD families. I did see that Debian doesn't use it, and that Armbian > > > > > > > > doesn't even use it on aarch64. > > > > > > > > > > > > > > > > > > The current situation is affecting U-Boot's image as a svelt bootloader. > > > > > > > > > > > > > > > > > > Really? I know UEFI has a bad reputation in the Open Source world, > > > > > > > > > and some of its Microsoft-isms are really annoying (yay UCS-2). But > > > > > > > > > it works, it provides a standardized approach across several platforms > > > > > > > > > (ARMv7, AMRv8, RISC-V) and the industry seems to like it. Personally > > > > > > > > > I'd wish the industry had standardized on Open Firmware instead, but > > > > > > > > > that ship sailed a long time ago... > > > > > > > > > > > > > > > > > > I find it hard to imagine that 90k is a serious amount of storage for > > > > > > > > > something that is going to include a multi-MB Linux kernel. This > > > > > > > > > isn't code that lives in SPL or TPL where severe size restrictions > > > > > > > > > apply. > > > > > > > > > > > > > > > > In one of those cases where I need to pop back in to the other (Nokia > > > > > > > > N900 specific) thread and see if the big size reduction really was just > > > > > > > > disabling EFI_LOADER, it's perhaps just one of those "fun" things about > > > > > > > > Kconfig and anything other than "make oldconfig" for spotting new config > > > > > > > > options that default to enabled. > > > > > > > > > > > > > > Yes it will be interesting to see what you find there. My results on > > > > > > > nokia_rx51 were something like this: > > > > > > > > > > > > > > default > > > > > > > arm: (for 1/1 boards) all +129370.0 bss +1136.0 data +7399.0 > > > > > > > rodata +10989.0 text +109846.0 > > > > > > > > > > > > > > without ebbr > > > > > > > arm: (for 1/1 boards) all +38460.0 bss +1040.0 data +2375.0 > > > > > > > rodata +5333.0 text +29712.0 > > > > > > > > > > > > > > with various other things: > > > > > > > CONFIG_OF_LIBFDT_ASSUME_MASK=7 > > > > > > > # CONFIG_OF_TRANSLATE is not set > > > > > > > # CONFIG_SIMPLE_BUS is not set > > > > > > > # CONFIG_TI_SYSC is not set > > > > > > > # CONFIG_CMD_FDT is not set > > > > > > > > > > > > > > arm: (for 1/1 boards) all +19170.0 bss -16.0 data +360.0 rodata > > > > > > > +3274.0 text +15552.0 > > > > > > > > > > > > > > (Mark, in the same email:) > > > > > > > > > FIT simply isn't fit for purpose (pun intended). It only really works > > > > > > > > > for booting Linux, and forces people to combine u-boot, kernel, > > > > > > > > > initial ramdisk and other firmware components into a single image. > > > > > > > > > That is really undesirable as: > > > > > > > > > - This makes it sigificantly harder to update individual components of > > > > > > > > > such an image. Making it hard to update a kernel is obviously a > > > > > > > > > serious security risk. > > > > > > > > > - This makes it impossible to build an OS install image that works om > > > > > > > > > multiple boards/SoCs. > > > > > > > > > > > > > > > > > > > > > I would really like to understand this better. The whole thing is a > > > > > > > complete mystery to me. > > > > > > > > > > > > > > Firstly I have sometimes fiddled with booting other OSes using FIT. It > > > > > > > seemed OK. I can't see why it only works with Linux. > > > > > > > > > > > > > > Secondly, I don't expect that U-Boot itself would be in the FIT. > > > > > > > > > > > > > > Thirdly, do you really want the kernel and initrd to be separate? At > > > > > > > least in the systems I have used, they are built together, even having > > > > > > > the same name, e.g.: > > > > > > > > > > > > > > initrd.img-5.10.40-1rodete1-amd64 > > > > > > > System.map-5.10.40-1rodete1-amd64 > > > > > > > vmlinuz-5.10.28-1rodete2-amd64 > > > > > > > > > > > > I have not hit any distro that builds FIT images. All install vmlinux > > > > > > and initrd as separate files. > > > > > > > > > > > > Why would you want to change that? > > > > > > > > > > Well there is no point in having two files if one will do. Also it > > > > > allows for a hash / signature check. > > > > > > > > The question of "how great would it be and how many problems would it > > > > have solved if FIT images had become popular" is one for another time. > > > > It will always have its use cases and users but never the broad adoption > > > > many of us felt it should have. Bringing it up in this context won't > > > > change that. > > > > > > I see Peter's reply below so will make time to dig into this and > > > understand the problems with FIT better. I feel that EFI comes with > > > all sorts of problems so I'm far from convinced, at this point. Sorry. > > > > It seems to me that we are discussing three different things: > > - the code size increase by enabling UEFI interfaces > > - how the UEFI interface be implemented on U-Boot > > - The primary (or default/standard) boot mechanism in the future > > > > I don't think they are totally independent, but we'd better > > distinguish them some how in the following discussions. > > > > > > > > > > I'm saying this because I think there are some important technical > > > > questions within U-Boot to resolve because the EFI loader part of U-Boot > > > > is critical to our long term future. And DM is an important part of our > > > > internal design and we're (probably later than I should have) pulling > > > > out the parts that haven't been updated so that we can deliver on some > > > > of the overall promise of DM better, too. > > > > > > Yes, migration has certainly been slow. As you know I mostly stopped > > > pushing it a few years back when I saw all the reluctance. I'm very > > > pleased you are taking that on and I think it will help a lot. > > > > I posted this patch[1] two years ago and I thought that we had had > > some sort of consensus that UEFI interfaces be integrated more elegantly > > with DM in the future. > > > > So I was a bit surprised with Heinrich's recent patch. > > > > In [1], I was trying to define all the UEFI handles, including some > > protocols?, as DM objects. > > I thought that it was the best way for unifying the two worlds even if > > there are no corresponding *notions* in the existing DM objects. > > > > [1] https://lists.denx.de/pipermail/u-boot/2019-February/357923.html > > > > -Takahiro Akashi > > You wrote yourself: "bootefi doesn't work with this patch set yet". > > Your series completely disregarded UEFI and DM logic, e.g. you defined > DM devices per protocol. > > You tried to integrate UEFI and DM world at an inappropriate level: > Instead of changing DM block device uclass you touched individual > drivers like USB and SCSI completely disregarding all other block device > classes. Yes, I can agree, but the point is not there. Why not discuss how UEFI and DM be integrated instead as Simon suggested? -Takahiro Akashi > Best regards > > Heinrich > > > > > > > > If what you say comes to pass, it is even more important that EFI is > > > more integrated, rather than being a bolt on. Thanks largely to > > > Heinrich, the tests are in quite good shape, so refactoring should be > > > feasible. > > > > > > Regards, > > > Simon >