path: root/secure_fw
diff options
authorKen Liu <Ken.Liu@arm.com>2021-05-24 15:46:46 +0800
committerKen Liu <Ken.Liu@arm.com>2021-05-25 14:06:26 +0800
commit25e09c7d347b4646c9a24741329eae8c024ddd15 (patch)
tree424f1bdd3cc275f129dd74dc873142a00b434634 /secure_fw
parent37e97844687203ee779d8d38cc5d5378fbbc92b8 (diff)
SPM: Fix Musca_B1 Regression Test Issue
The 'TFM_SP_CORE_TEST' declares FPGA IO, while Musca_B1 doesn't have such a peripheral. Therefore Musca_B1 defines a dummy NULL peripheral instance for this peripheral, but HAL API does not accept a NULL peripheral instance and it triggers a panic. Skip init a NULL peripheral instance at current. Eventually, this 'TFM_SP_CORE_TEST' should be bound to the platform. Change-Id: I8160830a5d56c950e19dbb8c68aed8cc84fa43fd Signed-off-by: Ken Liu <Ken.Liu@arm.com>
Diffstat (limited to 'secure_fw')
1 files changed, 15 insertions, 0 deletions
diff --git a/secure_fw/spm/cmsis_psa/spm_ipc.c b/secure_fw/spm/cmsis_psa/spm_ipc.c
index b3fd61cef..1642626ea 100644
--- a/secure_fw/spm/cmsis_psa/spm_ipc.c
+++ b/secure_fw/spm/cmsis_psa/spm_ipc.c
@@ -761,6 +761,21 @@ uint32_t tfm_spm_init(void)
platform_data_p = POSITION_TO_PTR(p_asset_load[i].dev.addr_ref,
struct platform_data_t *);
+ /*
+ * TODO: some partitions declare MMIO not exist on specific
+ * platforms, and the platform defines a dummy NULL reference
+ * for these MMIO items, which cause 'nassets' to contain several
+ * NULL items. Skip these NULL items initialization temporarily to
+ * avoid HAL API panic.
+ * Eventually, these platform-specific partitions need to be moved
+ * into a platform-specific folder. Then this workaround can be
+ * removed.
+ */
+ if (!platform_data_p) {
+ continue;
+ }
FIH_CALL(tfm_spm_hal_configure_default_isolation, fih_rc, part_idx,