Config: Disable Doorbell API for SFN backend
Doorbell APIs are not supported in SFN backend. Though CONFIG_TFM_DOORBELL_API
is redefined to 0 in config_spm.h when SFN backend is selected, there
will be a warning for the redefinition. To avoid this warning message,
better to disable Doorbell APIs in project config header files if SFN is
the default backend.
This patch does the following things:
1. Change CONFIG_TFM_DOORBELL_API to 0 in all project config header files
that use SFN backend.
2. Add invalid config check in config_spm.h to make sure that doorbell
APIs are disabled when SFN backend is used.
Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
Change-Id: I46978643185fa9756f657cc8d3c780811892cab0
diff --git a/config/config_base.h b/config/config_base.h
index 2853a30..37cff07 100644
--- a/config/config_base.h
+++ b/config/config_base.h
@@ -151,7 +151,7 @@
/* The maximal number of secure services that are connected or requested at the same time */
#define CONFIG_TFM_CONN_HANDLE_MAX_NUM 8
-/* Enable the doorbell APIs */
-#define CONFIG_TFM_DOORBELL_API 1
+/* Disable the doorbell APIs */
+#define CONFIG_TFM_DOORBELL_API 0
#endif /* __CONFIG_BASE_H__ */
diff --git a/config/profile/config_profile_medium_arotless.h b/config/profile/config_profile_medium_arotless.h
index cdc7665..d5d49d4 100644
--- a/config/profile/config_profile_medium_arotless.h
+++ b/config/profile/config_profile_medium_arotless.h
@@ -148,7 +148,7 @@
/* The maximal number of secure services that are connected or requested at the same time */
#define CONFIG_TFM_CONN_HANDLE_MAX_NUM 8
-/* Enable the doorbell APIs */
-#define CONFIG_TFM_DOORBELL_API 1
+/* Disable the doorbell APIs */
+#define CONFIG_TFM_DOORBELL_API 0
#endif /* __CONFIG_PROFILE_MEDIUM_AROTLESS_H__ */
diff --git a/config/profile/config_profile_small.h b/config/profile/config_profile_small.h
index ee5229d..dae747b 100644
--- a/config/profile/config_profile_small.h
+++ b/config/profile/config_profile_small.h
@@ -145,7 +145,7 @@
/* The maximal number of secure services that are connected or requested at the same time */
#define CONFIG_TFM_CONN_HANDLE_MAX_NUM 3
-/* Enable the doorbell APIs */
-#define CONFIG_TFM_DOORBELL_API 1
+/* Disable the doorbell APIs */
+#define CONFIG_TFM_DOORBELL_API 0
#endif /* __CONFIG_PROFILE_SMALL_H__ */
diff --git a/config/tests/config_test_psa_api.cmake b/config/tests/config_test_psa_api.cmake
index d458202..c7e323d 100644
--- a/config/tests/config_test_psa_api.cmake
+++ b/config/tests/config_test_psa_api.cmake
@@ -37,6 +37,7 @@
target_compile_definitions(tfm_config
INTERFACE
$<$<STREQUAL:${TEST_PSA_API},CRYPTO>:TEST_PSA_API_CRYPTO>
+ $<$<STREQUAL:${TEST_PSA_API},IPC>:TEST_PSA_API_IPC>
)
set(PROJECT_CONFIG_HEADER_FILE "${CMAKE_SOURCE_DIR}/config/tests/config_test_psa_api.h" CACHE FILEPATH "User defined header file for TF-M config")
diff --git a/config/tests/config_test_psa_api.h b/config/tests/config_test_psa_api.h
index 3e37a32..7af36f1 100644
--- a/config/tests/config_test_psa_api.h
+++ b/config/tests/config_test_psa_api.h
@@ -159,7 +159,12 @@
/* The maximal number of secure services that are connected or requested at the same time */
#define CONFIG_TFM_CONN_HANDLE_MAX_NUM 8
-/* Enable the doorbell APIs */
+/* Set the doorbell APIs */
+#ifdef TEST_PSA_API_IPC
+/* IPC test suite uses IPC backend */
#define CONFIG_TFM_DOORBELL_API 1
+#else
+#define CONFIG_TFM_DOORBELL_API 0
+#endif
#endif /* __CONFIG_TEST_PSA_API_H__ */