All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/3] Change logic of EFI LoadFile2 protocol for initrd loading
@ 2021-01-13 11:11 Ilias Apalodimas
  2021-01-13 11:11 ` [RFC PATCH 1/3] efi_loader: Introduce helper functions for EFI Ilias Apalodimas
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Ilias Apalodimas @ 2021-01-13 11:11 UTC (permalink / raw)
  To: u-boot

Hi, 

This is the revised version of [1].

After the discussion we had with Akashi and Heinrich, storing a device path
in the variable is preferable to a custom U-Boot string.

In hindsight and after reading the EFI spec a bit further, using a custom 
EFI variable to hold that device path doesn't look great either, we can do 
better than that.
Turns out we can use the array of device paths defined in the EFI spec and
store OS specific device paths [2].
So I converted this to an RFC instead, exploring this idea. The variabale is 
now stored as the second array member in the EFI_LOAD_OPTIONS and later 
retrieved in order to load the file when the kernel requests it.
Another big change is that installing the EFI protocol itself will cause an
error if the file's not found and the bootmgr will fallback to other valid 
boot options.

The efi selftest for the load option itself is not included in the RFC.
I'll go ahead and change it if there's general agreement on the feature.

[1] https://lists.denx.de/pipermail/u-boot/2020-December/436080.html
[2] https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_final.pdf section 3.1.3

Ilias Apalodimas (3):
  efi_loader: Introduce helper functions for EFI
  efi_loader: efi_loader: Replace config option for initrd loading
  efidebug: add multiple device path instances on Boot####

 cmd/bootefi.c                    |   3 +
 cmd/efidebug.c                   |  89 ++++++++++++++++--
 include/efi_helper.h             |  23 +++++
 include/efi_loader.h             |   1 +
 lib/efi_loader/Kconfig           |  13 +--
 lib/efi_loader/efi_bootmgr.c     |   3 +
 lib/efi_loader/efi_helper.c      | 146 +++++++++++++++++++++++++++++
 lib/efi_loader/efi_load_initrd.c | 154 ++++++++++++++++---------------
 8 files changed, 341 insertions(+), 91 deletions(-)
 create mode 100644 include/efi_helper.h
 create mode 100644 lib/efi_loader/efi_helper.c

-- 
2.30.0.rc2

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

end of thread, other threads:[~2021-01-15  2:16 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13 11:11 [RFC 0/3] Change logic of EFI LoadFile2 protocol for initrd loading Ilias Apalodimas
2021-01-13 11:11 ` [RFC PATCH 1/3] efi_loader: Introduce helper functions for EFI Ilias Apalodimas
2021-01-13 12:41   ` Heinrich Schuchardt
2021-01-13 13:30     ` Ilias Apalodimas
2021-01-14  4:48   ` AKASHI Takahiro
2021-01-14  4:57     ` Heinrich Schuchardt
2021-01-14 10:54       ` Ilias Apalodimas
2021-01-14  9:46     ` Ilias Apalodimas
2021-01-13 11:11 ` [RFC PATCH 2/3] efi_loader: efi_loader: Replace config option for initrd loading Ilias Apalodimas
2021-01-13 13:08   ` Heinrich Schuchardt
2021-01-13 13:23     ` Ilias Apalodimas
2021-01-14  4:23   ` AKASHI Takahiro
2021-01-14  9:40     ` Ilias Apalodimas
2021-01-13 11:11 ` [RFC PATCH 3/3] efidebug: add multiple device path instances on Boot#### Ilias Apalodimas
2021-01-13 13:13   ` Heinrich Schuchardt
2021-01-13 13:21     ` Ilias Apalodimas
2021-01-14  5:11   ` AKASHI Takahiro
2021-01-14  9:55     ` Ilias Apalodimas
2021-01-14 12:07       ` Heinrich Schuchardt
2021-01-14 12:36         ` Ilias Apalodimas
2021-01-15  2:16           ` AKASHI Takahiro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.