[PATCH v3 13/24] efi_loader: fwu_arm_psa: Keep the FMP payload header
abdellatif.elkhlifi at arm.com
abdellatif.elkhlifi at arm.com
Mon Jul 21 13:18:05 CEST 2025
From: Abdellatif El Khlifi <abdellatif.elkhlifi at arm.com>
Allow sending the payload with its FMP header
The Secure world needs the data provided by the payload
FMP header. So, let's keep it in case of FWU_ARM_PSA.
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi at arm.com>
Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
Cc: Sughosh Ganu <sughosh.ganu at linaro.org>
Cc: Tom Rini <trini at konsulko.com>
Cc: Ilias Apalodimas <ilias.apalodimas at linaro.org>
Cc: Simon Glass <sjg at chromium.org>
Cc: Michal Simek <michal.simek at amd.com>
Cc: Marek Vasut <marek.vasut+renesas at mailbox.org>
Cc: Casey Connolly <casey.connolly at linaro.org>
Cc: Adriano Cordova <adrianox at gmail.com>
---
lib/efi_loader/efi_firmware.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/efi_loader/efi_firmware.c b/lib/efi_loader/efi_firmware.c
index 38945b34e7b..e1fc3f577d4 100644
--- a/lib/efi_loader/efi_firmware.c
+++ b/lib/efi_loader/efi_firmware.c
@@ -517,8 +517,11 @@ static void efi_firmware_get_fw_version(const void **p_image,
/* FMP header is inserted above the capsule payload */
state->fw_version = header->fw_version;
- *p_image += header->header_size;
- *p_image_size -= header->header_size;
+ if (!IS_ENABLED(CONFIG_FWU_ARM_PSA)) {
+ *p_image += header->header_size;
+ *p_image_size -= header->header_size;
+ }
+
}
}
--
2.25.1
More information about the U-Boot
mailing list