Add test for multiple SPs with the same UUID
Add a new test SP which is used to test when multiple SPs have
the same FF-A UUID. This change carries the following modifications to
the spm-test deployments:
- introduce a new UUID which identifies the SP binary (like a file
name)
- ensure the binary UUID is used in output file names if set in the
opteesp deployments
- adds a new deployment to have two SPs with matching FF-A UUID
- refactor tests to check if SPMC allows discovering SPs with matching
FF-A UUID.
Change-Id: Icb82a67adf51cfdd2b20a21ecfe7ad2fa39c88a3
Signed-off-by: Jelle Sels <jelle.sels@arm.com>
Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
diff --git a/deployments/spm-test1/opteesp/CMakeLists.txt b/deployments/spm-test1/opteesp/CMakeLists.txt
index 7a2d614..b21bcf9 100644
--- a/deployments/spm-test1/opteesp/CMakeLists.txt
+++ b/deployments/spm-test1/opteesp/CMakeLists.txt
@@ -12,6 +12,7 @@
project(trusted-services LANGUAGES C ASM)
add_executable(spm-test1)
+set(SP_BIN_UUID_CANON "5c9edbc3-7b3a-4367-9f83-7c191ae86a37")
set(SP_UUID_CANON "5c9edbc3-7b3a-4367-9f83-7c191ae86a37")
set(SP_NUMBER 1)
include(${TS_ROOT}/components/service/spm_test/spm_test.cmake)
diff --git a/deployments/spm-test2/opteesp/CMakeLists.txt b/deployments/spm-test2/opteesp/CMakeLists.txt
index a3c3408..7942d50 100644
--- a/deployments/spm-test2/opteesp/CMakeLists.txt
+++ b/deployments/spm-test2/opteesp/CMakeLists.txt
@@ -12,6 +12,7 @@
project(trusted-services LANGUAGES C ASM)
add_executable(spm-test2)
+set(SP_BIN_UUID_CANON "7817164c-c40c-4d1a-867a-9bb2278cf41a")
set(SP_UUID_CANON "7817164c-c40c-4d1a-867a-9bb2278cf41a")
set(SP_NUMBER 2)
include(${TS_ROOT}/components/service/spm_test/spm_test.cmake)
diff --git a/deployments/spm-test3/opteesp/CMakeLists.txt b/deployments/spm-test3/opteesp/CMakeLists.txt
index f756bb7..d0e198c 100644
--- a/deployments/spm-test3/opteesp/CMakeLists.txt
+++ b/deployments/spm-test3/opteesp/CMakeLists.txt
@@ -12,6 +12,7 @@
project(trusted-services LANGUAGES C ASM)
add_executable(spm-test3)
+set(SP_BIN_UUID_CANON "23eb0100-e32a-4497-9052-2f11e584afa6")
set(SP_UUID_CANON "23eb0100-e32a-4497-9052-2f11e584afa6")
set(SP_NUMBER 3)
include(${TS_ROOT}/components/service/spm_test/spm_test.cmake)
diff --git a/deployments/spm-test4/opteesp/CMakeLists.txt b/deployments/spm-test4/opteesp/CMakeLists.txt
new file mode 100644
index 0000000..7197aa7
--- /dev/null
+++ b/deployments/spm-test4/opteesp/CMakeLists.txt
@@ -0,0 +1,32 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2022-2023, Arm Limited and Contributors. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
+set(TS_PLATFORM "arm/fvp/fvp_base_revc-2xaemv8a" CACHE STRING "Target platform location.")
+include(../../deployment.cmake REQUIRED)
+include(${TS_ROOT}/environments/opteesp/env.cmake)
+
+project(trusted-services LANGUAGES C ASM)
+add_executable(spm-test4)
+
+set(SP_BIN_UUID_CANON "423762ed-7772-406f-99d8-0c27da0abbf8")
+set(SP_UUID_CANON "23eb0100-e32a-4497-9052-2f11e584afa6")
+set(SP_NUMBER 4)
+include(${TS_ROOT}/components/service/spm_test/spm_test.cmake)
+#-------------------------------------------------------------------------------
+# Components that are spm-test specific to deployment in the opteesp
+# environment.
+#-------------------------------------------------------------------------------
+add_components(TARGET "spm-test${SP_NUMBER}"
+ BASE_DIR ${TS_ROOT}
+ COMPONENTS
+ "components/common/fdt"
+ "components/common/trace"
+ "components/common/utils"
+ "components/config/loader/sp"
+ "components/messaging/ffa/libsp"
+ "environments/opteesp"
+)
diff --git a/deployments/spm-test4/opteesp/default_spm_test4.dts.in b/deployments/spm-test4/opteesp/default_spm_test4.dts.in
new file mode 100644
index 0000000..fffc31f
--- /dev/null
+++ b/deployments/spm-test4/opteesp/default_spm_test4.dts.in
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2022-2023, Arm Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+@DTS_TAG@
+
+@DTS_NODE@ {
+ compatible = "arm,ffa-manifest-1.0";
+ ffa-version = <0x00010000>; /* 31:16 - Major, 15:0 - Minor */
+
+ /* Properties */
+ description = "SPMC test SP4";
+ uuid = <@EXPORT_SP_UUID_DT@>;
+ execution-ctx-count = <1>;
+ exception-level = <1>; /* S-EL0 */
+ execution-state = <0>; /* AARCH64 */
+ xlat-granule = <0>; /* 4KiB */
+ messaging-method = <3>; /* Direct messaging only */
+ ns-interrupts-action = <2>; /* Non-secure interrupts are signaled */
+ elf-format = <1>;
+};