SPM: Remove memory data list from template
- Move stack member out of memory data, and put it into partition
static type.
- Move the isolation level 3 data 'mems' into static info. There is
only one member included in it at present, but eventually, this
member would include multiple memory items.
Change-Id: I007fa622b3e65887fa556fda253d7a6672c08cbf
Signed-off-by: Ken Liu <Ken.Liu@arm.com>
diff --git a/secure_fw/spm/cmsis_psa/spm_ipc.c b/secure_fw/spm/cmsis_psa/spm_ipc.c
index 3c20fed..65b1bd7 100644
--- a/secure_fw/spm/cmsis_psa/spm_ipc.c
+++ b/secure_fw/spm/cmsis_psa/spm_ipc.c
@@ -659,7 +659,6 @@
/* Skip NULL checking on statically reserved arraries. */
partition->p_static = &static_data_list[i];
- partition->memory_data = &memory_data_list[i];
if (!(partition->p_static->flags & SPM_PART_FLAG_IPC)) {
tfm_core_panic();
@@ -722,8 +721,9 @@
tfm_core_thrd_init(pth,
(tfm_core_thrd_entry_t)partition->p_static->entry,
NULL,
- (uintptr_t)partition->memory_data->stack_top,
- (uintptr_t)partition->memory_data->stack_bottom);
+ (uintptr_t)(partition->p_static->stack_base_addr +
+ partition->p_static->stack_size),
+ (uintptr_t)partition->p_static->stack_base_addr);
pth->prior = partition->p_static->priority;
@@ -819,15 +819,15 @@
/* FIXME: only MPU-based implementations are supported currently */
#ifdef TFM_FIH_PROFILE_ON
FIH_CALL(tfm_hal_mpu_update_partition_boundary, fih_rc,
- p_next_partition->memory_data->data_start,
- p_next_partition->memory_data->data_limit);
+ p_next_partition->p_static->mems.start,
+ p_next_partition->p_static->mems.limit);
if (fih_not_eq(fih_rc, fih_int_encode(TFM_HAL_SUCCESS))) {
tfm_core_panic();
}
#else /* TFM_FIH_PROFILE_ON */
if (tfm_hal_mpu_update_partition_boundary(
- p_next_partition->memory_data->data_start,
- p_next_partition->memory_data->data_limit)
+ p_next_partition->p_static->mems.start,
+ p_next_partition->p_static->mems.limit)
!= TFM_HAL_SUCCESS) {
tfm_core_panic();
}