linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] use RT_PROPERTIES table to implement efi=novamap
@ 2021-03-05  9:39 Ard Biesheuvel
  2021-03-05  9:39 ` [PATCH 1/1] efi: stub: omit SetVirtualAddressMap() if marked unsupported in RT_PROP table Ard Biesheuvel
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Ard Biesheuvel @ 2021-03-05  9:39 UTC (permalink / raw)
  To: linux-efi
  Cc: linux-arm-kernel, Ard Biesheuvel, Jeffrey Hugo, Bjorn Andersson,
	Shawn Guo, Rob Clark, Leif Lindholm, linux-arm-msm

This patch addresses an oversight on my part when I implemented Linux
side support for the EFI RT properties table: SetVirtualAddressMap() is
itself a runtime service which is only callable at runtime to begin with,
and so the EFI stub should only call it if it is not marked as unsupported.

This may be useful for the Snapdragon EFI based laptops, which already rely
on a special EFI driver to expose the correct DT based on metadata exposed
by EFI. These systems ship with a broken implementation of SetVirtualAddressMap,
which is currently being worked around by passing efi=novamap on the kernel.
command line.

After applying this patch (which I intend to propose for backporting to 5.10),
the same can be achieved by exposing a RT_PROP table that marks SetVAMap() as
unsupported. And while at it, better mark the variable services as unsupported
as well, since they don't work under Linux either.

I'm open to extending this with a Linux specific override value kept in a
EFI variable, so that platforms that cannot support DtbLoader are able to
implement something similar.

Cc: Jeffrey Hugo <jhugo@codeaurora.org>,
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: linux-arm-msm@vger.kernel.org

Ard Biesheuvel (1):
  efi: stub: omit SetVirtualAddressMap() if marked unsupported in
    RT_PROP table

 drivers/firmware/efi/libstub/efi-stub.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

-- 
2.30.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-26 19:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05  9:39 [PATCH 0/1] use RT_PROPERTIES table to implement efi=novamap Ard Biesheuvel
2021-03-05  9:39 ` [PATCH 1/1] efi: stub: omit SetVirtualAddressMap() if marked unsupported in RT_PROP table Ard Biesheuvel
2021-03-06  9:45   ` Shawn Guo
2021-03-05 11:44 ` [PATCH 0/1] use RT_PROPERTIES table to implement efi=novamap Ard Biesheuvel
2021-03-06 10:05 ` Shawn Guo
2021-05-26 19:03 ` patchwork-bot+linux-arm-msm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).