[PATCH 11/18] efi_firmware: fwu: Do not read FWU metadata on sandbox
Sughosh Ganu
sughosh.ganu at linaro.org
Mon Jan 22 12:54:32 CET 2024
The FWU metadata is being read for populating the firmware image's
version information. The sandbox platform does not have the FWU
metadata on any of it's storage devices. Skip attempting to read the
FWU metadata on the sandbox platform.
Signed-off-by: Sughosh Ganu <sughosh.ganu at linaro.org>
---
lib/efi_loader/efi_firmware.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/efi_loader/efi_firmware.c b/lib/efi_loader/efi_firmware.c
index 9fd13297a6..51797a169f 100644
--- a/lib/efi_loader/efi_firmware.c
+++ b/lib/efi_loader/efi_firmware.c
@@ -223,7 +223,8 @@ void efi_firmware_fill_version_info(struct efi_firmware_image_descriptor *image_
/* get the fw_version */
efi_create_indexed_name(varname, sizeof(varname), "FmpState",
fw_array->image_index);
- if (IS_ENABLED(CONFIG_FWU_MULTI_BANK_UPDATE)) {
+ if (!IS_ENABLED(CONFIG_SANDBOX) &&
+ IS_ENABLED(CONFIG_FWU_MULTI_BANK_UPDATE)) {
ret = fwu_get_active_index(&active_index);
if (ret)
return;
@@ -391,7 +392,8 @@ efi_status_t efi_firmware_set_fmp_state_var(struct fmp_state *state, u8 image_in
efi_create_indexed_name(varname, sizeof(varname), "FmpState",
image_index);
- if (IS_ENABLED(CONFIG_FWU_MULTI_BANK_UPDATE)) {
+ if (!IS_ENABLED(CONFIG_SANDBOX) &&
+ IS_ENABLED(CONFIG_FWU_MULTI_BANK_UPDATE)) {
ret = fwu_plat_get_update_index(&update_bank);
if (ret)
return EFI_INVALID_PARAMETER;
--
2.34.1
More information about the U-Boot
mailing list