aboutsummaryrefslogtreecommitdiff
path: root/secure_fw
diff options
context:
space:
mode:
authorKen Liu <Ken.Liu@arm.com>2021-06-04 17:41:12 +0800
committerKen Liu <ken.liu@arm.com>2021-06-07 04:29:39 +0200
commit2bedfcddb0df0bacaeb769d617708de12c61ea8c (patch)
treef97147b0ed728e2aa5de9959f68139ab531a68f1 /secure_fw
parent6a45e1cccfa5c62ed4f95b2225ac95362671e410 (diff)
downloadtrusted-firmware-m-2bedfcddb0df0bacaeb769d617708de12c61ea8c.tar.gz
SPM: Rename SVC numbers to make more sense
- 'TFM_SVC_HANDLER_MODE' works for SPM initialization. - 'TFM_SVC_NUMBER_DIVIDER' is actually the end number for thread mode supervisor call. - Define a new name to indicate handler mode SVC number start. Change-Id: I754b3cb62c892e42b439dc12fe2b3efb0ee72709 Signed-off-by: Ken Liu <Ken.Liu@arm.com>
Diffstat (limited to 'secure_fw')
-rw-r--r--secure_fw/spm/cmsis_psa/tfm_core_svcalls_ipc.c4
-rw-r--r--secure_fw/spm/include/interface/svc_num.h9
2 files changed, 8 insertions, 5 deletions
diff --git a/secure_fw/spm/cmsis_psa/tfm_core_svcalls_ipc.c b/secure_fw/spm/cmsis_psa/tfm_core_svcalls_ipc.c
index 60d83e9f5..51adfc396 100644
--- a/secure_fw/spm/cmsis_psa/tfm_core_svcalls_ipc.c
+++ b/secure_fw/spm/cmsis_psa/tfm_core_svcalls_ipc.c
@@ -158,7 +158,7 @@ uint32_t tfm_core_svc_handler(uint32_t *msp, uint32_t *psp, uint32_t exc_return)
tfm_core_panic();
}
switch (svc_number) {
- case TFM_SVC_HANDLER_MODE:
+ case TFM_SVC_SPM_INIT:
tfm_arch_clear_fp_status();
exc_return = tfm_spm_init();
break;
@@ -177,7 +177,7 @@ __attribute__ ((naked)) void tfm_core_handler_mode(void)
{
__ASM volatile("SVC %0 \n"
"BX LR \n"
- : : "I" (TFM_SVC_HANDLER_MODE));
+ : : "I" (TFM_SVC_SPM_INIT));
}
void tfm_access_violation_handler(void)
diff --git a/secure_fw/spm/include/interface/svc_num.h b/secure_fw/spm/include/interface/svc_num.h
index 1ffa32ee1..23b9e04b8 100644
--- a/secure_fw/spm/include/interface/svc_num.h
+++ b/secure_fw/spm/include/interface/svc_num.h
@@ -40,11 +40,14 @@
/* TF-M specific, starts from 0x40 */
#define TFM_SVC_SPM_REQUEST (0x40)
#define TFM_SVC_GET_BOOT_DATA (0x41)
-#define TFM_SVC_HANDLER_MODE (0x42)
+#define TFM_SVC_SPM_INIT (0x42)
+#define TFM_SVC_THREAD_NUMBER_END (0x7F)
#if (TFM_SPM_LOG_LEVEL > TFM_SPM_LOG_LEVEL_SILENCE)
-#define TFM_SVC_OUTPUT_UNPRIV_STRING (0x7F)
+#define TFM_SVC_OUTPUT_UNPRIV_STRING (TFM_SVC_THREAD_NUMBER_END)
#endif
-#define TFM_SVC_NUMBER_DIVIDER (0x7F)
+
+#define TFM_SVC_HANDLER_NUMBER_START (0x80)
+
/********************* SVC for interrupt handling *****************************/
#endif /* __SVC_NUM_H__ */