u-boot/lib
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
..
acpi Merge patch series "acpi: simplify updating ACPI table header checksum" 2025-04-08 16:23:27 -06:00
aes aes: Allow to store randomly generated IV in the FIT 2024-12-19 09:10:34 -06:00
at91 lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
blake2 lib: Remove duplicate newlines 2024-07-15 12:12:18 -06:00
bzip2 lib: Remove duplicate newlines 2024-07-15 12:12:18 -06:00
crypt lib: Remove duplicate newlines 2024-07-15 12:12:18 -06:00
crypto Merge patch series "Integrate MbedTLS v3.6 LTS with U-Boot" 2024-10-14 17:59:04 -06:00
dhry lib: Remove duplicate newlines 2024-07-15 12:12:18 -06:00
ecdsa lib: ecdsa: fix prevent memory leak in ecdsa_add_verify_data 2025-03-03 14:24:48 -06:00
efi include: export uuid.h 2024-09-12 17:35:37 +02:00
efi_driver efi_driver: create a parent device for all EFI block devices 2025-02-20 11:07:44 +01:00
efi_loader efi: Fix efiboot for payloads loaded from memory 2025-04-11 13:20:38 +02:00
efi_selftest efi_loader: expose symbols to be used by the EFI network stack 2025-03-10 06:41:05 +01:00
fwu_updates fwu: do not allow capsule processing on exceeding Trial Counter threshold 2024-09-19 10:52:50 +03:00
libavb lib: Remove duplicate newlines 2024-07-15 12:12:18 -06:00
libfdt global: Rename SPL_TPL_ to PHASE_ 2024-10-11 11:44:48 -06:00
lwip lwip: tls: warn when no CA exists amd log certificate validation errors 2025-03-11 14:16:03 +01:00
lzma lib: Remove duplicate newlines 2024-07-15 12:12:18 -06:00
lzo lib: Remove duplicate newlines 2024-07-15 12:12:18 -06:00
mbedtls mbedtls: remove incorrect attribute type checker 2025-04-06 10:02:57 -06:00
optee lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
rsa lib: rsa: add NULL check for 'algo' in 2025-03-13 14:23:09 -06:00
zlib zlib: annotate switch/case fallthrough cases 2025-04-08 16:23:51 -06:00
zstd lib: Remove duplicate newlines 2024-07-15 12:12:18 -06:00
.gitignore
abuf.c abuf: Provide a constant buffer 2025-01-22 15:58:03 -06:00
addr_map.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
aes.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
alist.c alist: Add a way to efficiently filter an alist 2024-11-03 21:27:12 -06:00
asm-offsets.c global_data: Remove environment members if not used 2024-08-26 14:06:08 -06:00
asn1_decoder.c common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
bch.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
binman.c binman: Avoid skipping binman_init() 2024-12-02 07:40:30 -06:00
bitrev.c
charset.c efi_loader: add an EFI variable with the file contents 2024-04-20 08:22:24 +02:00
circbuf.c lib: Remove duplicate newlines 2024-07-15 12:12:18 -06:00
crc7.c lib: Remove duplicate newlines 2024-07-15 12:12:18 -06:00
crc8.c lib: Mark crc8 as relocation code 2025-02-03 16:01:36 -06:00
crc16-ccitt.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
crc16.c crc16: Move standard CRC-16 implementation from ubifs to lib 2022-04-21 14:32:40 -04:00
crc32.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
crc32c.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
ctype.c
date.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
display_options.c global: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILD 2024-10-11 11:44:48 -06:00
div64.c
elf.c lib: move phdr increment to for loop heading 2024-08-27 18:01:21 -06:00
errno.c sandbox: errno: avoid conflict with libc's errno 2021-05-24 14:21:30 -04:00
errno_str.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
fdt-libcrypto.c lib/rsa: Make fdt_add_bignum() available outside of RSA code 2021-04-14 15:06:08 -04:00
fdtdec.c Merge patch series "Keep the access to dtb_dt_embedded() within fdtdec" 2024-12-31 10:57:54 -06:00
fdtdec_common.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
fdtdec_test.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
getopt.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
gunzip.c lib: Mark gunzip as relocation code 2025-02-03 16:01:36 -06:00
gzip.c Revert "Revert "Merge patch series "zlib: Address CVE-2016-9841""" 2024-07-05 13:57:02 -06:00
hang.c global: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILD 2024-10-11 11:44:48 -06:00
hash-checksum.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
hashtable.c lib: hashtable: Prevent recursive calling of callback functions 2024-12-07 09:07:45 -03:00
hexdump.c global: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILD 2024-10-11 11:44:48 -06:00
image-sparse.c lib: sparse: Fix error checking for write_sparse_chunk_raw 2024-02-09 09:42:04 +01:00
initcall.c initcall: Correct use of relocation offset 2024-07-04 09:25:20 -06:00
Kconfig Kconfig: Fix "warning: style: quotes recommended" warnings 2025-04-01 08:46:18 -06:00
ldiv.c
linux_compat.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
linux_string.c
list_sort.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
lmb.c Prepare v2025.04-rc5 2025-03-24 20:10:55 -06:00
lz4.c lib: Mark lz4 as relocation code 2025-02-03 16:01:36 -06:00
lz4_wrapper.c lib: Mark lz4 as relocation code 2025-02-03 16:01:36 -06:00
Makefile membuff: Rename the files to membuf 2025-04-03 16:54:49 -06:00
md5.c net: disable MBEDTLS in SPL 2024-12-06 17:47:23 -06:00
membuf.c membuf: Minor code-style improvements 2025-04-03 16:54:49 -06:00
net_utils.c net: net_utils: Move ip_to_string to lib/net_utils.c 2024-11-18 16:12:35 +01:00
of_live.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
oid_registry.c
panic.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
physmem.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
qsort.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
rand.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
rational.c lib: rational: copy the rational fraction lib routines from Linux 2021-06-11 16:34:52 +05:30
rbtree.c
rc4.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
rtc-lib.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
semihosting.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
sha1.c net: disable MBEDTLS in SPL 2024-12-06 17:47:23 -06:00
sha256.c lib: sha256: add feature sha256_hmac 2025-01-18 17:12:47 -06:00
sha256_common.c lib: sha256: move common function to sha256_common.c 2025-01-18 17:12:47 -06:00
sha512.c net: disable MBEDTLS in SPL 2024-12-06 17:47:23 -06:00
slre.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
smbios-parser.c smbios: correctly name Structure Table Maximum Size field 2024-02-02 19:57:45 +01:00
smbios.c smbios: Fill UUID from sysinfo when available 2025-02-28 08:41:54 -06:00
sscanf.c
string.c lib: implement strnstr() 2025-02-12 12:37:12 -06:00
strto.c lib: provide function hextoull() 2024-11-13 08:14:23 -06:00
tables_csum.c lib: make table_compute_checksum() arguments const 2024-01-09 10:08:52 +01:00
time.c xpl: Rename spl_phase() to xpl_phase() 2024-10-11 11:44:47 -06:00
tiny-printf.c Merge patch series "Annotate switch/case fallthrough cases" 2025-04-08 16:24:12 -06:00
tpm-common.c lib: Remove <common.h> inclusion from these files 2023-12-21 08:54:37 -05:00
tpm-utils.h doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
tpm-v1.c sha1: Remove sha1 non-watchdog API 2024-10-14 17:58:30 -06:00
tpm-v2.c tpm: PCR allocate during PCR extend to disable the unsupported algorithms 2025-01-28 08:58:41 +02:00
tpm_api.c tpm: add TPM2_Shutdown command 2025-01-28 08:58:41 +02:00
tpm_tcg2.c tpm: get tpm event log from bloblist 2025-01-28 09:09:32 +02:00
trace.c Merge patch series "Add 'trace wipe'" 2025-01-01 10:40:33 -06:00
uuid.c lib: uuid: support more efi protocols in uuid_guid_get_str() 2025-02-20 08:40:52 +01:00
vsprintf.c lib: vsprintf: fix API build 2024-11-13 08:16:41 -06:00
xxhash.c