SPM: tfm_hal_post_partition_init_hook - platform hook
tfm_hal_post_partition_init_hook is a new hook that is optionally called
if CONFIG_TFM_POST_PARTITION_INIT_HOOK macro is set to 1. It allows
platform to implement some additional stuff after last partition has
been bounded right before starting scheduler.
Signed-off-by: Roman Mazurak <roman.mazurak@infineon.com>
Change-Id: I743bb7870b7fb68683596c097f7d57490558863c
diff --git a/platform/include/tfm_hal_isolation.h b/platform/include/tfm_hal_isolation.h
index 2ae0abb..2228b25 100644
--- a/platform/include/tfm_hal_isolation.h
+++ b/platform/include/tfm_hal_isolation.h
@@ -125,6 +125,19 @@
FIH_RET_TYPE(bool) tfm_hal_boundary_need_switch(uintptr_t boundary_from,
uintptr_t boundary_to);
+#if CONFIG_TFM_POST_PARTITION_INIT_HOOK == 1
+/**
+ * \brief This API let the platform to finish static isolation after all partitions
+ * have been bound.
+ *
+ * It's called by SPM right before starting scheduler.
+ *
+ * \return TFM_HAL_SUCCESS - Booting has been successful.
+ * TFM_HAL_ERROR_GENERIC - Error occurred.
+ */
+FIH_RET_TYPE(enum tfm_hal_status_t) tfm_hal_post_partition_init_hook(void);
+#endif /* CONFIG_TFM_POST_PARTITION_INIT_HOOK == 1 */
+
#ifdef __cplusplus
}
#endif