[PATCH v3 18/24] fwu_arm_psa: Add ExitBootService() notification handler
abdellatif.elkhlifi at arm.com
abdellatif.elkhlifi at arm.com
Mon Jul 21 13:18:10 CEST 2025
From: Abdellatif El Khlifi <abdellatif.elkhlifi at arm.com>
Provide a weak function that can be overridden
Some boards need to perform custom actions on ExitBootService()
related to FWU. This function can be overridden by the board.
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi at arm.com>
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>
---
lib/fwu_updates/fwu_arm_psa.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/lib/fwu_updates/fwu_arm_psa.c b/lib/fwu_updates/fwu_arm_psa.c
index 7297e724569..6a829c631b0 100644
--- a/lib/fwu_updates/fwu_arm_psa.c
+++ b/lib/fwu_updates/fwu_arm_psa.c
@@ -1252,6 +1252,21 @@ static bool fwu_all_images_accepted(const struct fwu_data *fwu_data)
return true;
}
+/**
+ * fwu_notify_exit_boot_services() - FWU notification handler
+ *
+ * Some boards need to perform custom actions on ExitBootService()
+ * related to FWU. This function can be overridden by the board.
+ *
+ * Return:
+ *
+ * EFI_SUCCESS on success. Otherwise, failure
+ */
+efi_status_t __weak fwu_notify_exit_boot_services(void)
+{
+ return EFI_SUCCESS;
+}
+
/**
* fwu_accept_notify_exit_boot_services() - ExitBootServices callback
*
@@ -1292,6 +1307,8 @@ static void EFIAPI fwu_accept_notify_exit_boot_services(struct efi_event *event,
}
out:
+ fwu_notify_exit_boot_services();
+
EFI_EXIT(efi_ret);
}
--
2.25.1
More information about the U-Boot
mailing list