Core: Rename services to partitions in SPM
To get closer to the terminology used in PSA, the symbols that in the
current TF-M terminology refer to services, should be changed to refer
to partitions. This commit does this renaming in SPM, and also updates
files that reference the changed symbols.
Change-Id: Id76f179846cbc11c600a5e72d15b99afc379d1fd
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
diff --git a/test/framework/non_secure_suites.c b/test/framework/non_secure_suites.c
index 9ba5f43..fa1c115 100644
--- a/test/framework/non_secure_suites.c
+++ b/test/framework/non_secure_suites.c
@@ -19,12 +19,12 @@
/* Non-secure SST test cases */
{®ister_testsuite_ns_sst_interface, 0, 0, 0},
-#ifdef SST_TEST_SERVICES
+#ifdef TFM_PARTITION_TEST_SST
/* Non-secure SST referenced access testsuite */
{®ister_testsuite_ns_sst_ref_access, 0, 0, 0},
#endif
-#ifdef CORE_TEST_SERVICES
+#ifdef TFM_PARTITION_TEST_CORE
/* Non-secure invert test cases */
/* Note: since this is sample code, only run if test services are enabled */
{®ister_testsuite_ns_invert_interface, 0, 0, 0},
diff --git a/test/framework/secure_suites.c b/test/framework/secure_suites.c
index 1b5360c..f0e7dca 100644
--- a/test/framework/secure_suites.c
+++ b/test/framework/secure_suites.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Arm Limited. All rights reserved.
+ * Copyright (c) 2017-2018, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -26,7 +26,7 @@
* {®ister_testsuite_s_sst_interface, 0, 0, 0},
*/
-#ifdef CORE_TEST_SERVICES
+#ifdef TFM_PARTITION_TEST_CORE
/* Secure invert test cases */
/* Note: since this is sample code, only run if test services are enabled */
{®ister_testsuite_s_invert_interface, 0, 0, 0},
diff --git a/test/suites/core/CMakeLists.inc b/test/suites/core/CMakeLists.inc
index 4c516d1..aff2f05 100644
--- a/test/suites/core/CMakeLists.inc
+++ b/test/suites/core/CMakeLists.inc
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2017, Arm Limited. All rights reserved.
+# Copyright (c) 2017-2018, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -24,9 +24,9 @@
message(FATAL_ERROR "Please set TFM_ROOT_DIR before including this file.")
endif()
-if (NOT DEFINED CORE_TEST_SERVICES)
+if (NOT DEFINED TFM_PARTITION_TEST_CORE)
message(FATAL_ERROR "Incomplete build configuration: CORE_TEST is undefined. ")
-elseif (CORE_TEST_SERVICES)
+elseif (TFM_PARTITION_TEST_CORE)
list(APPEND ALL_SRC_C_NS "${CORE_TEST_DIR}/non_secure/core_test_api.c"
"${CORE_TEST_DIR}/non_secure/svc_core_test_ns.c")
endif()
diff --git a/test/suites/sst/CMakeLists.inc b/test/suites/sst/CMakeLists.inc
index cd987d4..08f57ab 100644
--- a/test/suites/sst/CMakeLists.inc
+++ b/test/suites/sst/CMakeLists.inc
@@ -39,9 +39,9 @@
list(APPEND ALL_SRC_C_NS "${SECURE_STORAGE_TEST_DIR}/non_secure/sst_ns_interface_testsuite.c")
- if (NOT DEFINED SST_TEST_SERVICES)
- message(FATAL_ERROR "Incomplete build configuration: SST_TEST_SERVICES is undefined.")
- elseif (SST_TEST_SERVICES)
+ if (NOT DEFINED TFM_PARTITION_TEST_SST)
+ message(FATAL_ERROR "Incomplete build configuration: TFM_PARTITION_TEST_SST is undefined.")
+ elseif (TFM_PARTITION_TEST_SST)
list(APPEND ALL_SRC_C_NS "${SECURE_STORAGE_TEST_DIR}/non_secure/sst_ns_ref_access_testsuite.c")
endif()
diff --git a/test/test_services/CMakeLists.inc b/test/test_services/CMakeLists.inc
index c03c96e..4e042d0 100644
--- a/test/test_services/CMakeLists.inc
+++ b/test/test_services/CMakeLists.inc
@@ -42,9 +42,9 @@
)
endif()
-if (NOT DEFINED SST_TEST_SERVICES)
- message(FATAL_ERROR "Incomplete build configuration: SST_TEST_SERVICES is undefined. ")
-elseif (SST_TEST_SERVICES)
+if (NOT DEFINED TFM_PARTITION_TEST_SST)
+ message(FATAL_ERROR "Incomplete build configuration: TFM_PARTITION_TEST_SST is undefined. ")
+elseif (TFM_PARTITION_TEST_SST)
list(APPEND ALL_SRC_C_S "${CORE_TEST_DIR}/tfm_sst_test_service/sst_test_service.c"
"${CORE_TEST_DIR}/tfm_sst_test_service/sst_test_service_veneers.c"
)
diff --git a/test/test_services/tfm_core_test/tfm_ss_core_test.c b/test/test_services/tfm_core_test/tfm_ss_core_test.c
index 3438d06..a5d7143 100644
--- a/test/test_services/tfm_core_test/tfm_ss_core_test.c
+++ b/test/test_services/tfm_core_test/tfm_ss_core_test.c
@@ -16,18 +16,18 @@
#include "smm_mps2.h"
-static int32_t service_init_done;
+static int32_t partition_init_done;
int32_t core_test_init(void)
{
- service_init_done = 1;
+ partition_init_done = 1;
return TFM_SUCCESS;
}
int32_t spm_core_test_sfn_init_success(void)
{
- if (service_init_done) {
+ if (partition_init_done) {
return CORE_TEST_ERRNO_SUCCESS;
} else {
return CORE_TEST_ERRNO_SERVICE_NOT_INITED;
diff --git a/test/test_services/tfm_core_test/tfm_ss_core_test_veneers.c b/test/test_services/tfm_core_test/tfm_ss_core_test_veneers.c
index 0568411..653f82d 100644
--- a/test/test_services/tfm_core_test/tfm_ss_core_test_veneers.c
+++ b/test/test_services/tfm_core_test/tfm_ss_core_test_veneers.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Arm Limited. All rights reserved.
+ * Copyright (c) 2017-2018, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -12,20 +12,20 @@
int32_t tfm_core_test_sfn_init_success(void)
{
- TFM_CORE_SERVICE_REQUEST(TFM_SEC_FUNC_CORE_TEST_ID,
+ TFM_CORE_SERVICE_REQUEST(TFM_SP_CORE_TEST_ID,
spm_core_test_sfn_init_success,
0, 0, 0, 0);
}
int32_t tfm_core_test_sfn_direct_recursion(int32_t depth)
{
- TFM_CORE_SERVICE_REQUEST(TFM_SEC_FUNC_CORE_TEST_ID,
+ TFM_CORE_SERVICE_REQUEST(TFM_SP_CORE_TEST_ID,
spm_core_test_sfn_direct_recursion,
depth, 0, 0, 0);
}
int32_t tfm_core_test_sfn(int32_t a, int32_t b, int32_t c, int32_t d)
{
- TFM_CORE_SERVICE_REQUEST(TFM_SEC_FUNC_CORE_TEST_ID, spm_core_test_sfn,
+ TFM_CORE_SERVICE_REQUEST(TFM_SP_CORE_TEST_ID, spm_core_test_sfn,
a, b, c, d);
}
diff --git a/test/test_services/tfm_core_test_2/tfm_ss_core_test_2_veneers.c b/test/test_services/tfm_core_test_2/tfm_ss_core_test_2_veneers.c
index ca8d437..6e6fa3c 100644
--- a/test/test_services/tfm_core_test_2/tfm_ss_core_test_2_veneers.c
+++ b/test/test_services/tfm_core_test_2/tfm_ss_core_test_2_veneers.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Arm Limited. All rights reserved.
+ * Copyright (c) 2017-2018, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -13,7 +13,7 @@
/* Add functions to the service*/
int32_t tfm_core_test_2_veneer_slave_service(void)
{
- TFM_CORE_SERVICE_REQUEST(TFM_SEC_FUNC_CORE_TEST_2_ID,
+ TFM_CORE_SERVICE_REQUEST(TFM_SP_CORE_TEST_2_ID,
spm_core_test_2_slave_service,
0, 0, 0, 0);
}
@@ -21,7 +21,7 @@
int32_t tfm_core_test_2_sfn_invert(int32_t *res_ptr, uint32_t *in_ptr,
uint32_t *out_ptr, int32_t len)
{
- TFM_CORE_SERVICE_REQUEST(TFM_SEC_FUNC_CORE_TEST_2_ID,
+ TFM_CORE_SERVICE_REQUEST(TFM_SP_CORE_TEST_2_ID,
spm_core_test_2_sfn_invert,
res_ptr, in_ptr, out_ptr, len);
}
diff --git a/test/test_services/tfm_sst_test_service/sst_test_service_veneers.c b/test/test_services/tfm_sst_test_service/sst_test_service_veneers.c
index 802ba59..fc8d66b 100644
--- a/test/test_services/tfm_sst_test_service/sst_test_service_veneers.c
+++ b/test/test_services/tfm_sst_test_service/sst_test_service_veneers.c
@@ -13,7 +13,7 @@
enum tfm_sst_err_t sst_test_service_veneer_setup(void)
{
- TFM_CORE_SERVICE_REQUEST(TFM_SEC_FUNC_SST_TEST_SERVICE_ID,
+ TFM_CORE_SERVICE_REQUEST(TFM_SP_SST_TEST_PARTITION_ID,
sst_test_service_sfn_setup,
0, 0, 0, 0);
}
@@ -23,7 +23,7 @@
uint8_t *buf,
uint32_t buf_size)
{
- TFM_CORE_SERVICE_REQUEST(TFM_SEC_FUNC_SST_TEST_SERVICE_ID,
+ TFM_CORE_SERVICE_REQUEST(TFM_SP_SST_TEST_PARTITION_ID,
sst_test_service_sfn_dummy_encrypt,
app_id, key_uuid, buf, buf_size);
}
@@ -33,14 +33,14 @@
uint8_t *buf,
uint32_t buf_size)
{
- TFM_CORE_SERVICE_REQUEST(TFM_SEC_FUNC_SST_TEST_SERVICE_ID,
+ TFM_CORE_SERVICE_REQUEST(TFM_SP_SST_TEST_PARTITION_ID,
sst_test_service_sfn_dummy_decrypt,
app_id, key_uuid, buf, buf_size);
}
enum tfm_sst_err_t sst_test_service_veneer_clean(void)
{
- TFM_CORE_SERVICE_REQUEST(TFM_SEC_FUNC_SST_TEST_SERVICE_ID,
+ TFM_CORE_SERVICE_REQUEST(TFM_SP_SST_TEST_PARTITION_ID,
sst_test_service_sfn_clean,
0, 0, 0, 0);
}