Test: Create SST test service
This patch adds a new secure service for use by
the SST test suites. The initial implementation
enables testing of the SST access by reference
feature.
Change-Id: I41663255bd65aa72168ba6d32c47b23e65586001
Signed-off-by: Jamie Fox <jamie.fox@arm.com>
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index d32bb39..6e84182 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -137,6 +137,12 @@
set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS " --predefine=\"-DCORE_TEST_SERVICES\"")
endif()
+if (NOT DEFINED SST_TEST_SERVICES)
+ message(FATAL_ERROR "Incomplete build configuration: SST_TEST_SERVICES is undefined. ")
+elseif (SST_TEST_SERVICES)
+ set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS " --predefine=\"-DSST_TEST_SERVICES\"")
+endif()
+
#Set BL2 specific settings.
if (NOT DEFINED BL2)
message(FATAL_ERROR "Incomplete build configuration: BL2 is undefined. ")
diff --git a/app/main_ns.c b/app/main_ns.c
index a0d64d5..fb7b10a 100644
--- a/app/main_ns.c
+++ b/app/main_ns.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
*
@@ -19,6 +19,9 @@
#ifdef CORE_TEST_SERVICES
#include "test/suites/core/non_secure/svc_core_test_ns.h"
#endif
+#ifdef SST_TEST_SERVICES
+#include "test/test_services/tfm_sst_test_service/sst_test_service_svc.h"
+#endif
#ifdef TEST_FRAMEWORK_NS
#include "test/framework/integ_test.h"
#endif
@@ -56,6 +59,13 @@
(void *)svc_tfm_core_test_multiple_calls,
#endif /* CORE_TEST_SERVICES */
+#if defined(SST_TEST_SERVICES)
+ (void *)sst_test_service_svc_setup,
+ (void *)sst_test_service_svc_dummy_encrypt,
+ (void *)sst_test_service_svc_dummy_decrypt,
+ (void *)sst_test_service_svc_clean,
+#endif /* SST_TEST_SERVICES */
+
//(void *)user_function1,
// ...
};