feat(stm32mp2): add FWU support
Add stm32_get_bkpr_fwu_info_addr() function.
Call stm32_fwu_set_boot_idx() in bl2_plat_handle_post_image_load().
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: Ieb57dffa4ce784d1ed61b401dc17376fe745c111
diff --git a/plat/st/stm32mp2/stm32mp2_private.c b/plat/st/stm32mp2/stm32mp2_private.c
index 5be4c5a..ea9d2fc 100644
--- a/plat/st/stm32mp2/stm32mp2_private.c
+++ b/plat/st/stm32mp2/stm32mp2_private.c
@@ -10,6 +10,7 @@
#include <platform_def.h>
+#define BKPR_FWU_INFO 48U
#define BKPR_BOOT_MODE 96U
#if defined(IMAGE_BL31)
@@ -328,6 +329,13 @@
return tamp_bkpr(BKPR_BOOT_MODE);
}
+#if PSA_FWU_SUPPORT
+uintptr_t stm32_get_bkpr_fwu_info_addr(void)
+{
+ return tamp_bkpr(BKPR_FWU_INFO);
+}
+#endif /* PSA_FWU_SUPPORT */
+
uintptr_t stm32_ddrdbg_get_base(void)
{
return DDRDBG_BASE;