diff options
author | Antonio de Angelis <antonio.deangelis@arm.com> | 2019-05-30 21:51:10 +0100 |
---|---|---|
committer | Antonio de Angelis <antonio.deangelis@arm.com> | 2019-05-31 10:23:05 +0100 |
commit | e6322c3f6d5154fe1d3a93a0dd26b16a0dcc1f56 (patch) | |
tree | 0a7ee3b3c13bceb28069aa8e3b982c45171cd4d9 | |
parent | c430b998b391743cd8061b8fd6f2b5eb270095fa (diff) | |
download | trusted-firmware-m-TF-Mv1.0-RC1.tar.gz |
Platform: Adjust required RAM size for SPE in MUSCA_ATF-Mv1.0-RC1
This patch adjusts the required RAM size for the SPE
in a MUSCA_A target to meet the worst case scenario
which is 96 KB for SPE. The remaining 32 KB are
reserved for the NSPE.
Change-Id: Iadc72cc40b084cffd09f4461f6d088a4fdefaf31
Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
-rw-r--r-- | platform/ext/target/musca_a/partition/region_defs.h | 13 | ||||
-rw-r--r-- | platform/ext/target/musca_a/target_cfg.c | 17 |
2 files changed, 8 insertions, 22 deletions
diff --git a/platform/ext/target/musca_a/partition/region_defs.h b/platform/ext/target/musca_a/partition/region_defs.h index ed1e3011fb..69f7773286 100644 --- a/platform/ext/target/musca_a/partition/region_defs.h +++ b/platform/ext/target/musca_a/partition/region_defs.h @@ -102,14 +102,11 @@ #define S_CODE_LIMIT (S_CODE_START + S_CODE_SIZE - 1) #define S_DATA_START (S_RAM_ALIAS(0x0)) - -#if defined(TEST_FRAMEWORK_S) || defined(TEST_FRAMEWORK_NS) -/* Increase secure DATA area to run the regression tests on Musca-A */ -#define S_DATA_SIZE ((TOTAL_RAM_SIZE / 4) * 3) -#else -#define S_DATA_SIZE (TOTAL_RAM_SIZE / 2) -#endif - +/* Reserve 96 KB of RAM to the SPE to meet worst case scenario + * requirements which are encountered in IPC mode and regression + * tests enabled. Leave the remaining 32 KB to the NSPE. + */ +#define S_DATA_SIZE ((TOTAL_RAM_SIZE / 2) + (TOTAL_RAM_SIZE / 4)) #define S_DATA_LIMIT (S_DATA_START + S_DATA_SIZE - 1) /* CMSE Veneers region */ diff --git a/platform/ext/target/musca_a/target_cfg.c b/platform/ext/target/musca_a/target_cfg.c index f02518a0c5..0cc31b9a29 100644 --- a/platform/ext/target/musca_a/target_cfg.c +++ b/platform/ext/target/musca_a/target_cfg.c @@ -261,24 +261,13 @@ void mpc_init_cfg(void) ARM_MPC_ATTR_SECURE); mpc_data_region2->Initialize(); - -#if defined(TEST_FRAMEWORK_S) || defined(TEST_FRAMEWORK_NS) - /* To run the regression tests on Musca-A, it is required to assign more - * RAM memory in the secure execution environment. - * So, the secure RAM memory size is 96KB and the non-secure one is 32 KB. - * When it is not required to run the regression tests, the RAM memory - * partition is the original one which is 64KB of the RAM memory for each - * execution environment. - */ mpc_data_region2->ConfigRegion(MPC_ISRAM2_RANGE_BASE_S, MPC_ISRAM2_RANGE_LIMIT_S, ARM_MPC_ATTR_SECURE); -#else - mpc_data_region2->ConfigRegion(MPC_ISRAM2_RANGE_BASE_NS, - MPC_ISRAM2_RANGE_LIMIT_NS, - ARM_MPC_ATTR_NONSECURE); -#endif + /* First three regions (96KB) are marked Secure, the last region of + * 32 KB is marked Non-Secure + */ mpc_data_region3->Initialize(); mpc_data_region3->ConfigRegion(MPC_ISRAM3_RANGE_BASE_NS, MPC_ISRAM3_RANGE_LIMIT_NS, |