opengnsys_ipxe/src/interface/efi
Michael Brown 6a004be0cc [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>
2023-02-15 17:36:47 +00:00
..
efi_acpi.c [acpi] Allow for platforms that provide ACPI tables individually 2021-03-01 00:08:23 +00:00
efi_autoboot.c [efi] Create VLAN autoboot device automatically 2023-01-15 22:42:30 +00:00
efi_autoexec.c [efi] Allow autoexec script to be located alongside iPXE binary 2023-02-01 23:54:19 +00:00
efi_block.c [efi] Add efi_path_terminate() utility function 2023-01-23 19:27:11 +00:00
efi_bofm.c [efi] Retain a long-lived reference to the EFI_PCI_IO_PROTOCOL instance 2020-11-04 15:16:22 +00:00
efi_cachedhcp.c [cachedhcp] Include VLAN tag in filter for applying cached DHCPACK 2022-12-22 14:59:29 +00:00
efi_cmdline.c [efi] Accept a command line passed to an iPXE image via LoadOptions 2023-01-29 18:56:11 +00:00
efi_console.c [efi] Support Unicode character output via text console 2022-03-15 17:09:58 +00:00
efi_debug.c [efi] Allow for longer device paths in debug messages 2020-12-29 13:16:22 +00:00
efi_download.c [efi] Claim SNP devices early in efi_download_start() 2020-07-15 10:09:46 +01:00
efi_driver.c [efi] Avoid dropping below TPL as at entry to iPXE 2020-11-20 16:57:50 +00:00
efi_entropy.c [efi] Run ExitBootServices shutdown hook at TPL_NOTIFY 2021-11-23 15:55:01 +00:00
efi_fbcon.c [efi] Support Unicode character output via framebuffer console 2022-03-15 17:30:52 +00:00
efi_fdt.c [efi] Register a device tree if provided by the platform firmware 2019-07-19 17:43:02 +01:00
efi_file.c [efi] Support the initrd autodetection mechanism in newer Linux kernels 2023-02-15 17:36:47 +00:00
efi_guid.c [efi] Fix typo in efi_acpi_table_protocol_guid 2017-04-10 16:46:11 +01:00
efi_hii.c [efi] Fix uninitialised data in HII IFR structures 2016-06-29 15:17:12 +01:00
efi_init.c [efi] Accept a command line passed to an iPXE image via LoadOptions 2023-01-29 18:56:11 +00:00
efi_local.c [efi] Expose efi_path_next() utility function 2022-12-22 13:34:28 +00:00
efi_null.c [efi] Provide VLAN configuration protocol 2022-12-14 11:51:52 +00:00
efi_path.c [legal] Add missing FILE_LICENCE declaration to efi_path.c 2023-01-28 17:15:16 +00:00
efi_pci.c [efi] Do not attempt to drive PCI bridge devices 2023-02-03 16:10:31 +00:00
efi_pxe.c [netdevice] Separate concept of scope ID from network device name index 2023-01-14 00:09:20 +00:00
efi_reboot.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:50:42 +00:00
efi_smbios.c [smbios] Add support for the 64-bit SMBIOS3 entry point 2020-12-29 14:41:50 +00:00
efi_snp.c [netdevice] Separate concept of scope ID from network device name index 2023-01-14 00:09:20 +00:00
efi_snp_hii.c [efi] Add efi_path_terminate() utility function 2023-01-23 19:27:11 +00:00
efi_strings.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
efi_time.c [efi] Add EFI time source 2015-04-14 11:55:08 +01:00
efi_timer.c [efi] Run ExitBootServices shutdown hook at TPL_NOTIFY 2021-11-23 15:55:01 +00:00
efi_uaccess.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
efi_umalloc.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
efi_usb.c [efi] Leave asynchronous USB endpoints open until device is removed 2021-01-03 20:23:51 +00:00
efi_utils.c [efi] Extend efi_locate_device() to allow searching up the device path 2023-01-23 19:27:13 +00:00
efi_veto.c [efi] Veto the Itautec Ip4ConfigDxe driver 2021-06-11 15:14:21 +01:00
efi_watchdog.c [efi] Disable EFI watchdog timer when shutting down to boot an OS 2021-11-25 09:30:59 +00:00
efi_wrap.c [efi] Modify global system table when wrapping a loaded image 2021-11-21 13:34:10 +00:00
efidrvprefix.c [efi] Avoid dropping below TPL as at entry to iPXE 2020-11-20 16:57:50 +00:00
efiprefix.c [efi] Allow autoexec script to be located alongside iPXE binary 2023-02-01 23:54:19 +00:00