diff options
| author | Michael Brown | 2023-02-15 16:48:31 +0100 |
|---|---|---|
| committer | Michael Brown | 2023-02-15 18:36:47 +0100 |
| commit | 6a004be0cceab5d669eedb5a2e6ee2feab31d5bd (patch) | |
| tree | 433b4f9bb316d977b23d1e6bc7cec8467435c1d5 /src/interface/efi/efi_path.c | |
| parent | [efi] Fix debug message when reading from EFI virtual files (diff) | |
| download | ipxe-6a004be0cceab5d669eedb5a2e6ee2feab31d5bd.tar.gz ipxe-6a004be0cceab5d669eedb5a2e6ee2feab31d5bd.tar.xz ipxe-6a004be0cceab5d669eedb5a2e6ee2feab31d5bd.zip | |
[efi] Support the initrd autodetection mechanism in newer Linux kernels
Linux 5.7 added the ability to autodetect an initrd by searching for a
handle via a fixed vendor-specific "Linux initrd device path" and then
locating and using the EFI_LOAD_FILE2_PROTOCOL instance on that
handle.
This maps quite naturally onto our existing concept of a "magic
initrd" as introduced for EFI in commit e5f0255 ("[efi] Provide an
"initrd.magic" file for use by UEFI kernels").
Add an EFI_LOAD_FILE2_PROTOCOL instance to our EFI virtual files
(backed by simply calling the existing EFI_SIMPLE_FILE_SYSTEM_PROTOCOL
method to read from the file), and install the protocol instance for
the "initrd.magic" virtual file onto a new device handle that also
provides the Linux initrd device path.
The design choice in Linux of using a single fixed device path makes
this unfortunately messy to support, since device paths must be unique
within a system. When multiple bootloaders are used (e.g. GRUB
loading iPXE loading Linux) then only one bootloader can ever install
the device path onto a handle. Subsequent bootloaders must locate the
existing handle and replace the load file protocol instance with their
own.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/efi/efi_path.c')
0 files changed, 0 insertions, 0 deletions
