Merge changes from topic "mb/spm+rme-tb-mb-support" into integration

* changes:
  fix(fvp): increase the maximum size of Event Log
  fix(fvp): increase maximum MMAP and XLAT entries count
  fix(arm): add Event Log area behind Trustzone Controller
  fix(tbbr): unrecognised 'tos-fw-key-cert' option
This commit is contained in:
Manish V Badarkhe 2023-09-12 10:12:51 +02:00 committed by TrustedFirmware Code Review
commit bc6bd65bf0
3 changed files with 33 additions and 12 deletions

View file

@ -39,6 +39,20 @@ typedef struct arm_tzc_regions_info {
* - Region 1 with secure access only; * - Region 1 with secure access only;
* - the remaining DRAM regions access from the given Non-Secure masters. * - the remaining DRAM regions access from the given Non-Secure masters.
******************************************************************************/ ******************************************************************************/
#if ENABLE_RME
#define ARM_TZC_RME_REGIONS_DEF \
{ARM_AP_TZC_DRAM1_BASE, ARM_AP_TZC_DRAM1_END, TZC_REGION_S_RDWR, 0},\
{ARM_EL3_TZC_DRAM1_BASE, ARM_L1_GPT_END, TZC_REGION_S_RDWR, 0}, \
{ARM_NS_DRAM1_BASE, ARM_NS_DRAM1_END, ARM_TZC_NS_DRAM_S_ACCESS, \
PLAT_ARM_TZC_NS_DEV_ACCESS}, \
/* Realm and Shared area share the same PAS */ \
{ARM_REALM_BASE, ARM_EL3_RMM_SHARED_END, ARM_TZC_NS_DRAM_S_ACCESS, \
PLAT_ARM_TZC_NS_DEV_ACCESS}, \
{ARM_DRAM2_BASE, ARM_DRAM2_END, ARM_TZC_NS_DRAM_S_ACCESS, \
PLAT_ARM_TZC_NS_DEV_ACCESS}
#endif
#if SPM_MM #if SPM_MM
#define ARM_TZC_REGIONS_DEF \ #define ARM_TZC_REGIONS_DEF \
{ARM_AP_TZC_DRAM1_BASE, ARM_EL3_TZC_DRAM1_END + ARM_L1_GPT_SIZE,\ {ARM_AP_TZC_DRAM1_BASE, ARM_EL3_TZC_DRAM1_END + ARM_L1_GPT_SIZE,\
@ -52,16 +66,16 @@ typedef struct arm_tzc_regions_info {
PLAT_ARM_TZC_NS_DEV_ACCESS} PLAT_ARM_TZC_NS_DEV_ACCESS}
#elif ENABLE_RME #elif ENABLE_RME
#define ARM_TZC_REGIONS_DEF \ #if (defined(SPD_tspd) || defined(SPD_opteed) || defined(SPD_spmd)) && \
{ARM_AP_TZC_DRAM1_BASE, ARM_AP_TZC_DRAM1_END, TZC_REGION_S_RDWR, 0},\ MEASURED_BOOT
{ARM_EL3_TZC_DRAM1_BASE, ARM_L1_GPT_END, TZC_REGION_S_RDWR, 0}, \ #define ARM_TZC_REGIONS_DEF \
{ARM_NS_DRAM1_BASE, ARM_NS_DRAM1_END, ARM_TZC_NS_DRAM_S_ACCESS, \ ARM_TZC_RME_REGIONS_DEF, \
PLAT_ARM_TZC_NS_DEV_ACCESS}, \ {ARM_EVENT_LOG_DRAM1_BASE, ARM_EVENT_LOG_DRAM1_END, \
/* Realm and Shared area share the same PAS */ \ TZC_REGION_S_RDWR, 0}
{ARM_REALM_BASE, ARM_EL3_RMM_SHARED_END, ARM_TZC_NS_DRAM_S_ACCESS, \ #else
PLAT_ARM_TZC_NS_DEV_ACCESS}, \ #define ARM_TZC_REGIONS_DEF \
{ARM_DRAM2_BASE, ARM_DRAM2_END, ARM_TZC_NS_DRAM_S_ACCESS, \ ARM_TZC_RME_REGIONS_DEF
PLAT_ARM_TZC_NS_DEV_ACCESS} #endif
#else #else
#define ARM_TZC_REGIONS_DEF \ #define ARM_TZC_REGIONS_DEF \

View file

@ -118,8 +118,10 @@ endif
ifeq (${NEED_BL32},yes) ifeq (${NEED_BL32},yes)
$(if ${BL32_KEY},$(eval $(call CERT_ADD_CMD_OPT,${BL32_KEY},--tos-fw-key))) $(if ${BL32_KEY},$(eval $(call CERT_ADD_CMD_OPT,${BL32_KEY},--tos-fw-key)))
$(eval $(call TOOL_ADD_PAYLOAD,${BUILD_PLAT}/tos_fw_content.crt,--tos-fw-cert)) $(eval $(call TOOL_ADD_PAYLOAD,${BUILD_PLAT}/tos_fw_content.crt,--tos-fw-cert))
ifneq (${COT},cca)
$(eval $(call TOOL_ADD_PAYLOAD,${BUILD_PLAT}/tos_fw_key.crt,--tos-fw-key-cert)) $(eval $(call TOOL_ADD_PAYLOAD,${BUILD_PLAT}/tos_fw_key.crt,--tos-fw-key-cert))
endif endif
endif
# Add the BL33 CoT (key cert + img cert) # Add the BL33 CoT (key cert + img cert)
ifneq (${BL33},) ifneq (${BL33},)

View file

@ -168,8 +168,8 @@
# define MAX_XLAT_TABLES 6 # define MAX_XLAT_TABLES 6
# endif # endif
#elif !USE_ROMLIB #elif !USE_ROMLIB
# define PLAT_ARM_MMAP_ENTRIES 11 # define PLAT_ARM_MMAP_ENTRIES 12
# define MAX_XLAT_TABLES 5 # define MAX_XLAT_TABLES 6
#else #else
# define PLAT_ARM_MMAP_ENTRIES 12 # define PLAT_ARM_MMAP_ENTRIES 12
# if (defined(SPD_tspd) || defined(SPD_opteed) || defined(SPD_spmd)) && \ # if (defined(SPD_tspd) || defined(SPD_opteed) || defined(SPD_spmd)) && \
@ -437,7 +437,12 @@ defined(IMAGE_BL2) && MEASURED_BOOT
/* /*
* Maximum size of Event Log buffer used in Measured Boot Event Log driver * Maximum size of Event Log buffer used in Measured Boot Event Log driver
*/ */
#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
#define PLAT_ARM_EVENT_LOG_MAX_SIZE UL(0x400) #define PLAT_ARM_EVENT_LOG_MAX_SIZE UL(0x400)
#endif
/* /*
* Maximum size of Event Log buffer used for DRTM * Maximum size of Event Log buffer used for DRTM