u-boot/lib/efi_loader
Christian Kohlschütter 85403c46e6 efi: Fix efiboot for payloads loaded from memory
Calling bootefi on an address that was loaded from memory (e.g., cramfs
or SPI flash via "sf read", etc.), currently results in the EFI binary
not being able to access the EFI image device path.

For example, iPXE would fail with an error "EFI could not get loaded
image's device path: Error 0x7f39e082 (https://ipxe.org/7f39e082)".

This is due to an incomplete special-case in efi_binary_run, where a new
device path was created but not used in all required places.

Fix the in-memory special case, set the "bootefi_device_path" to the
generated "file_path".

iPXE will now boot, and report the device path as
"/MemoryMapped(0x0,0xSTART,0xLEN)"

Signed-off-by: Christian Kohlschütter <christian@kohlschutter.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-04-11 13:20:38 +02:00
..
.gitignore efi_loader: git ignore helloworld_efi.S 2020-01-07 18:08:20 +01:00
boothart.c efi_loader: add an EFI binary to print boot hart ID 2022-12-02 19:17:24 +01:00
capsule_esl.dtsi.in efi_loader: Fix capsule_esl.dtsi.in comment style 2024-06-10 15:05:09 +02:00
dtbdump.c efi_loader: Mark static function in dumpdtb 2024-10-30 21:45:39 +01:00
efi_acpi.c efi_loader: Install the ACPI table from the bloblist 2025-04-11 13:20:37 +02:00
efi_bootbin.c efi: Fix efiboot for payloads loaded from memory 2025-04-11 13:20:38 +02:00
efi_bootmgr.c efi_loader: efi_load_initrd: provide a memory mapped initrd 2025-04-11 13:20:37 +02:00
efi_boottime.c Merge branch 'next' 2025-04-08 11:43:23 -06:00
efi_capsule.c fwu: print a message if empty capsule checks fail 2024-09-19 10:52:50 +03:00
efi_conformance.c efi_loader: use LOGC_EFI consistently 2025-01-26 11:06:56 +01:00
efi_console.c Prepare v2024.10-rc6 2024-09-30 17:48:12 -06:00
efi_device_path_to_text.c efi_loader: fix ipv4 device path node conversion 2025-03-26 13:05:36 +02:00
efi_device_path_utilities.c efi_loader: use LOGC_EFI consistently 2025-01-26 11:06:56 +01:00
efi_device_path.c efi_loader: efi_net: Add device path cache 2025-03-10 07:02:25 +01:00
efi_disk.c efi_loader: Fix potential deref-after-null 2025-02-20 09:04:12 +01:00
efi_dt_fixup.c efi: Make FDT extra space configurable 2025-04-11 13:20:37 +02:00
efi_esrt.c efi_loader: use LOGC_EFI consistently 2025-01-26 11:06:56 +01:00
efi_fdt.c efi_loader: use LOGC_EFI consistently 2025-01-26 11:06:56 +01:00
efi_file.c efi_loader: support file rename in SetInfo() 2025-03-07 11:50:22 -06:00
efi_firmware.c board: remove capsule update support in set_dfu_alt_info() 2025-04-11 13:20:37 +02:00
efi_freestanding.c efi_loader: Remove <common.h> 2023-12-21 08:54:37 -05:00
efi_gop.c efi_loader: use LOGC_EFI consistently 2025-01-26 11:06:56 +01:00
efi_helper.c efi: Make FDT extra space configurable 2025-04-11 13:20:37 +02:00
efi_hii_config.c efi_loader: use LOGC_EFI consistently 2025-01-26 11:06:56 +01:00
efi_hii.c efi_loader: use LOGC_EFI consistently 2025-01-26 11:06:56 +01:00
efi_http.c efi_loader: efi_net: Add support for multiple efi_net_obj 2025-03-10 07:40:17 +01:00
efi_image_loader.c efi_loader: fix pe reloc pointer overrun 2025-01-05 02:30:48 +01:00
efi_ipconfig.c efi_loader: efi_net: Add device path cache 2025-03-10 07:02:25 +01:00
efi_load_initrd.c efi_loader: efi_load_initrd: provide a memory mapped initrd 2025-04-11 13:20:37 +02:00
efi_load_options.c efi_loader: Remove <common.h> 2023-12-21 08:54:37 -05:00
efi_memory.c efi_loader: allow for removal of memory from the EFI map 2025-03-26 13:28:08 +02:00
efi_net.c efi_loader: efi_net: Add support for multiple efi_net_obj 2025-03-10 07:40:17 +01:00
efi_riscv.c efi_loader: use LOGC_EFI consistently 2025-01-26 11:06:56 +01:00
efi_rng.c efi_loader: fix some function descriptions 2024-09-21 10:54:42 +02:00
efi_root_node.c efi_loader: use LOGC_EFI consistently 2025-01-26 11:06:56 +01:00
efi_runtime.c efi_loader: use LOGC_EFI consistently 2025-01-26 11:06:56 +01:00
efi_setup.c efi_loader: efi_net: Add device path cache 2025-03-10 07:02:25 +01:00
efi_signature.c efi_loader: use LOGC_EFI consistently 2025-01-26 11:06:56 +01:00
efi_smbios.c smbios: copy QEMU tables 2024-01-16 17:05:29 -05:00
efi_string.c efi_loader: use LOGC_EFI consistently 2025-01-26 11:06:56 +01:00
efi_tcg2.c tcg2: decouple eventlog size from efi 2025-01-28 08:59:23 +02:00
efi_unicode_collation.c efi_loader: use LOGC_EFI consistently 2025-01-26 11:06:56 +01:00
efi_var_common.c efi_loader: use LOGC_EFI consistently 2025-01-26 11:06:56 +01:00
efi_var_file.c efi_loader: reduce noisiness if ESP is missing 2024-10-18 16:17:29 +02:00
efi_var_mem.c efi_loader: remove comparisons to string literals from runtime 2025-02-20 09:22:53 +01:00
efi_var_seed.S efi_loader: pre-seed UEFI variables 2020-07-16 12:37:02 +02:00
efi_variable_tee.c efi_loader: remove comparisons to string literals from runtime 2025-02-20 09:22:53 +01:00
efi_variable.c include: export uuid.h 2024-09-12 17:35:37 +02:00
efi_watchdog.c efi_loader: use LOGC_EFI consistently 2025-01-26 11:06:56 +01:00
elf_efi.ldsi efi_loader: Move .dynamic out of .text in EFI 2025-03-17 09:22:06 +01:00
helloworld.c efi_loader: Show FirmwareVendor and FirmwareRevision in helloworld 2024-10-09 22:04:56 -06:00
initrddump.c efi_loader: rename struct efi_initrd_dp to efi_lo_dp_prefix 2024-06-10 11:43:37 +02:00
Kconfig board: remove capsule update support in set_dfu_alt_info() 2025-04-11 13:20:37 +02:00
Makefile efi_loader: efi_net: add EFI_HTTP_PROTOCOL 2024-12-04 12:24:38 +01:00
smbiosdump.c efi_loader: Mark static functions in smbiosdump 2024-10-30 21:45:51 +01:00
testapp.c efi_loader: Add a test app 2024-11-09 09:59:41 +01:00