From: Abdellatif El Khlifi <abdellatif.elkhl...@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.elkhl...@arm.com> Cc: Heinrich Schuchardt <xypron.g...@gmx.de> Cc: Sughosh Ganu <sughosh.g...@linaro.org> Cc: Tom Rini <tr...@konsulko.com> Cc: Ilias Apalodimas <ilias.apalodi...@linaro.org> Cc: Simon Glass <s...@chromium.org> Cc: Michal Simek <michal.si...@amd.com> Cc: Marek Vasut <marek.vasut+rene...@mailbox.org> Cc: Casey Connolly <casey.conno...@linaro.org> Cc: Adriano Cordova <adria...@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