fix(fvp): increase EventLog size for OP-TEE with multiple SPs
When OP-TEE runs with multiple Secure Partitions (SPs), a larger
EventLog size is required to accommodate the additional measurements.
This patch updates the configuration to allocate sufficient memory
in such cases.
In the future, the Maximum EventLog size should be calculated based
on the maximum number of images loaded by BL2. That enhancement can
be addressed in a separate patch.
Change-Id: Ibd9bed0a5b1029158142711fd08809729dd05b08
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
diff --git a/plat/arm/board/fvp/include/platform_def.h b/plat/arm/board/fvp/include/platform_def.h
index b90ba37..f412ec0 100644
--- a/plat/arm/board/fvp/include/platform_def.h
+++ b/plat/arm/board/fvp/include/platform_def.h
@@ -509,16 +509,19 @@
/*
* Maximum size of Event Log buffer used in Measured Boot Event Log driver
+ * TODO: calculate maximum EventLog size using the calculation:
+ * Maximum size of Event Log * Number of images
*/
-#if ENABLE_RME && (defined(SPD_tspd) || defined(SPD_opteed) || defined(SPD_spmd))
-/* Account for additional measurements of secure partitions and SPM. */
-#define PLAT_ARM_EVENT_LOG_MAX_SIZE UL(0x800)
-#else
-#if defined(IMAGE_BL1) && TRANSFER_LIST
+#if (defined(SPD_spmd)) || (ENABLE_RME && (defined(SPD_tspd) || defined(SPD_opteed)))
+/*
+ * Account for additional measurements of secure partitions and SPM.
+ * Also, account for OP-TEE running with maximum number of SPs.
+ */
+#define PLAT_ARM_EVENT_LOG_MAX_SIZE UL(0x800)
+#elif defined(IMAGE_BL1) && TRANSFER_LIST
#define PLAT_ARM_EVENT_LOG_MAX_SIZE UL(0x200)
#else
-#define PLAT_ARM_EVENT_LOG_MAX_SIZE UL(0x400)
-#endif
+#define PLAT_ARM_EVENT_LOG_MAX_SIZE UL(0x400)
#endif
/*