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=-12.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 B7326C433DB for ; Tue, 16 Mar 2021 07:53:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8C00E64F75 for ; Tue, 16 Mar 2021 07:53:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232908AbhCPHwl (ORCPT ); Tue, 16 Mar 2021 03:52:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232893AbhCPHwY (ORCPT ); Tue, 16 Mar 2021 03:52:24 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0774C061756 for ; Tue, 16 Mar 2021 00:52:23 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id z5so16566155plg.3 for ; Tue, 16 Mar 2021 00:52:23 -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:references:mime-version :content-disposition:in-reply-to:user-agent; bh=hOZ9Rg7lcXXkQQAolqlRhzXrZO7Pm9+F+419RRBDPiM=; b=Qs59s5q9s2tgd0hQ7Q3t0uym5pFq1OCiWUr1AaaJjTsMr3SA2UEVQGlbJ7N0uyIRKM HFhS3FH5A1sjwse4f/CcsuAHdctYXjbd/zMpdtvK5LnkNxvFyqFQGhNziNqjA99bopVB ZT2VsyRTsKw8av1Oy7bI0y6mI0B3ClvfUMDK2pjG44fvVliXwLTy7UmtSfY5PEg8ROeg JKqNCx4vYHbr1qOXTH+PJCmPvIrALRI0KlZBZ7laW4n8jYtJSKbZlcPk1obiIvf23sHe QbNNcfvubaa7rzXzYJoV97EEey0tWyxQ248FyKtYjzhsdl7eUzMMHM401pXZ47c5VhE3 DRrg== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hOZ9Rg7lcXXkQQAolqlRhzXrZO7Pm9+F+419RRBDPiM=; b=C+L/Al6aM/dJme/v0WbJ/1uEHqJDFboDThxO/5zCu6Jg2u3QcVhKVID1kYZIfCcF0c tUjJAEBMJADGLqzF/RpM4JpMoIZv1y1ENr8RN/eyXEkPL21tw+krZSrCpgqu5gUKlZ9E 63X9/Ll8OySbEMT5mKktdTnTvQ0DtYFYM0DObsgpzemEXLv0z//qyW3i1QxWeY3915Fk OTctFvzyg5gFWhf0gCx5rp8Bz1dJ4VU90HCTtUoBp24l5No9SQ1kPIj5LGDK6bK0hCDs CYCbt/cRlPsHOi4IiRcVlq6u97/APFByswor6nU2lQ8CB+sz/BOgwB30ZQSE0heFCkfl QNFQ== X-Gm-Message-State: AOAM532nvxv/XDR5vLJkPAOEzjfg2VtU2ojsUbHDTYCbdhsllpOingDq ReXH3qOdhyVtCfgDRYopkSTgew== X-Google-Smtp-Source: ABdhPJwYQyzof0mrKMDKPOpJ1ILnqUY4bPmeePn+KWgJ8vl+iGeqb3GIj8qVA28Cuc4nE8UkvF6oDA== X-Received: by 2002:a17:902:7c14:b029:e6:5d7e:62a2 with SMTP id x20-20020a1709027c14b02900e65d7e62a2mr15589753pll.42.1615881143252; Tue, 16 Mar 2021 00:52:23 -0700 (PDT) Received: from dragon (80.251.214.228.16clouds.com. [80.251.214.228]) by smtp.gmail.com with ESMTPSA id v14sm2016407pju.19.2021.03.16.00.52.20 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Mar 2021 00:52:22 -0700 (PDT) Date: Tue, 16 Mar 2021 15:52:15 +0800 From: Shawn Guo To: Ard Biesheuvel Cc: Heinrich Schuchardt , Atish Patra , Ilias Apalodimas , Steve McIntyre , Rob Clark , linux-efi , Jeffrey Hugo , Bjorn Andersson , Leif Lindholm , linux-arm-msm Subject: Re: [PATCH] efi: stub: override RT_PROP table supported mask based on EFI variable Message-ID: <20210316075214.GA32651@dragon> References: <20210306113519.294287-1-ardb@kernel.org> <20210307110228.GP17424@dragon> <20210309032248.GR17424@dragon> <20210315031119.GY17424@dragon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Mon, Mar 15, 2021 at 02:07:01PM +0100, Ard Biesheuvel wrote: > On Mon, 15 Mar 2021 at 04:11, Shawn Guo wrote: > > > > On Tue, Mar 09, 2021 at 07:47:25PM +0100, Ard Biesheuvel wrote: > > > On Tue, 9 Mar 2021 at 19:10, Rob Clark wrote: > > > > > ... > > > > fwiw, the valid use-case for ACPI boot on these things is for distro > > > > installer.. it might not be the shiny accelerated experience, but you > > > > want to be able to get thru the installer and then install updates to > > > > get latest kernel/dtb/etc > > > > > > > > it is a small use-case, but kinda an important step ;-) > > > > > > > > > > That is a fair point. However, as I understand it, we need this to work around > > > - the need to pass efi=novamap > > > - broken poweroff on Flex5g > > > > One more: broken EFI variable runtime services on all Snapdragon laptops > > > > It's been another pain of running debian-installer (d-i) on these > > laptops, where EFI NV variables are just stored on UFS disk. So after > > Linux takes over the control of UFS, EFI NV variable runtime services > > then become out of service. Currently, we have to apply a hack [1] on > > d-i grub-installer to get around the issue, and it's been the only > > remaining out-of-tree patch we have to carry for d-i. With this nice > > `OverrideSupported` support, we will be able to drop that hack > > completely. > > > > > > > > So an installer either needs to set the EFI variable, or pass > > > efi=novamap on the first boot. Note that there are no arm64 EFI > > > systems known where efi=novamap causes problems. In fact, I would > > > prefer to stop using SetVirtualAddressMap() altogether, as it does not > > > provide any benefit whatsoever. So perhaps we should make efi=novamap > > > the default and be done with it. > > > > > > Broken poweroff is hardly a showstopper for an installer, given that > > > we cannot even install GRUB correctly. > > > > > > In summary, I am more than happy to collaborate constructively on this > > > (which is why I wrote the patch), but I don't think we're at a point > > > yet where this is the only thing standing in our way when it comes to > > > a smooth out-of-the-box Linux installation experience. > > > > There might be more to be done for getting a smooth Linux installation > > experience. But IMHO, this `OverrideSupported` thing is definitely > > a big step to that. > > > > So the problem here seems to be that grub-install (or efibootmgr) > tolerates efivarfs being absent entirely, but bails out if it exists > but gives an error when trying to access it, right? Yes, with EFI variables runtime service marked as unsupported, efibootmgr will just exit on efi_variables_supported() check [1] in a way that its parent process, i.e. grub-install, doesn't take as an error. But otherwise, efibootmgr will go much further and exit with a real error when trying to access efivars. Shawn [1] https://github.com/rhboot/efibootmgr/blob/master/src/efibootmgr.c#L1764