Re: [PATCH] efi: stub: override RT_PROP table supported mask based on EFI variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 08, 2021 at 02:34:48PM +0100, Ard Biesheuvel wrote:
> On Sun, 7 Mar 2021 at 12:02, Shawn Guo <shawn.guo@xxxxxxxxxx> wrote:
> >
> > On Sat, Mar 06, 2021 at 12:35:19PM +0100, Ard Biesheuvel wrote:
> > > Allow EFI systems to override the set of supported runtime services
> > > declared via the RT_PROP table, by checking for the existence of a
> > > 'OverrideSupported' EFI variable of the appropriate size under the
> > > RT_PROP table GUID, and if it does, combine the supported mask using
> > > logical AND. (This means the override can only remove support, not
> > > add it back).
> > >
> > > Cc: Jeffrey Hugo <jhugo@xxxxxxxxxxxxxx>,
> > > Cc: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
> > > Cc: Shawn Guo <shawn.guo@xxxxxxxxxx>
> > > Cc: Rob Clark <robdclark@xxxxxxxxx>
> > > Cc: Leif Lindholm <leif@xxxxxxxxxxxx>
> > > Cc: linux-arm-msm@xxxxxxxxxxxxxxx
> > >
> > > Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
> >
> > Awesome, Ard!  On both Lenovo Yoga C630 and Flex 5G latops:
> >
> > Tested-by: Shawn Guo <shawn.guo@xxxxxxxxxx>
> >
> > With 'OverrideSupported' EFI variable added from UEFI Shell, we can drop
> > 'efi=novamap' kernel cmdline and get around the broken poweroff runtime
> > services nicely.  Thanks!
> >
> 
> Thanks for confirming.
> 
> However, I am not going to merge this without some justification, and
> hopefully some input from other folks (Leif?)
> 
> RTPROP already provides what we need on all platforms that use
> DtbLoader, and the patch for that is queued up for v5.12-rcX, with a
> cc:stable to v5.10. This allows any RT service to be marked as
> disabled, including SetVirtualAddressMap().
> 
> So afaict, that means that this patch would be a special case for
> Flex5G, right?

It's for all Snapdragon based laptops, as we need to disable
SetVirtualAddressMap runtime services on all of them.

> So how are platforms such as this one going to load the
> DTB? If some loader will be involved (or even just GRUB),

Yes, GRUB.

> shouldn't it
> be that component that sets RTPROP like DtbLoader will, not the kernel
> itself.
> 
> Btw I don't think ACPI boot is a use case here. I don't see a software
> framebuffer with no wifi support as a usage mode that justifies
> carrying EFI stub hacks for everyone.

Okay.  I'm fine to carry it as an out-of-tree patch until someday you
consider ACPI boot is useful for everyone.  But I do boot these laptops
with ACPI at daily basis right now as arm64 native build machine, with
USB Ethernet adapter.

Shawn



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux