Merge "feat(stm32mp2): improve BL31 size management" into integration
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.
diff --git a/plat/st/stm32mp2/stm32mp2_def.h b/plat/st/stm32mp2/stm32mp2_def.h
index d3290c3..615e5c9 100644
--- a/plat/st/stm32mp2/stm32mp2_def.h
+++ b/plat/st/stm32mp2/stm32mp2_def.h
@@ -109,10 +109,12 @@
#define STM32MP_BL2_RO_SIZE U(0x00020000) /* 128 KB */
#define STM32MP_BL2_SIZE U(0x00029000) /* 164 KB for BL2 */
-/* Allocate remaining sysram to BL31 */
+/* Allocate remaining sysram to BL31 Binary only */
#define STM32MP_BL31_SIZE (STM32MP_SEC_SYSRAM_SIZE - \
STM32MP_BL2_SIZE)
+#define BL31_PROGBITS_LIMIT STM32MP_BL31_SIZE
+
#define STM32MP_BL2_BASE (STM32MP_SYSRAM_BASE + \
STM32MP_SYSRAM_SIZE - \
STM32MP_BL2_SIZE)