Simon Glass ee4bcfc659 bootstd: efi: Handle prior-stage FDT in network path
When CONFIG_OF_HAS_PRIOR_STAGE is enabled and fdtfile is not set,
efi_get_distro_fdt_name() returns -EALREADY to indicate the prior-stage
FDT should be used. The block-device EFI path handles this by setting
BOOTFLOWF_USE_PRIOR_FDT, but the network path treats it as an error,
causing the bootflow to stay in 'base' state with a -EALREADY error.

This also means fdt_addr_r is required even when no FDT download is
needed, giving a spurious  -EINVAL error.

Fix this by calling efi_get_distro_fdt_name() before checking
fdt_addr_r, and handling -EALREADY by setting BOOTFLOWF_USE_PRIOR_FDT
to skip the FDT download, matching the block-device behaviour.

THere is no test for this at present, since sandbox does not enable
CONFIG_OF_HAS_PRIOR_STAGE and lacks infra for network-based EFI boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
2026-04-17 08:09:41 +02:00
..
2025-04-03 16:54:49 -06:00
2025-05-30 09:49:32 +01:00
2024-10-18 14:10:22 -06:00
2025-05-30 09:49:32 +01:00
2022-01-19 18:11:34 +01:00
2024-11-14 18:14:06 -06:00
2025-11-22 08:48:13 -06:00
2025-01-22 09:47:49 -06:00