feat(stm32mp2): improve BL31 size management
Change the size of BL31 limit allocation to be half the sysram size.
Defining BL31_PROGBITS_LIMIT to detect overflows.
Signed-off-by: Maxime Méré <maxime.mere@foss.st.com>
Change-Id: Iccc1cc0826b8113a3c2fd6ffa77ca419795854d3
diff --git a/plat/st/stm32mp2/include/platform_def.h b/plat/st/stm32mp2/include/platform_def.h
index 89ca032..b98b56d 100644
--- a/plat/st/stm32mp2/include/platform_def.h
+++ b/plat/st/stm32mp2/include/platform_def.h
@@ -74,7 +74,7 @@
* BL31 specific defines.
******************************************************************************/
#define BL31_BASE 0
-#define BL31_LIMIT STM32MP_BL31_SIZE
+#define BL31_LIMIT (STM32MP_SEC_SYSRAM_SIZE / 2)
/*******************************************************************************
* BL33 specific defines.