aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBalint Dobszay <balint.dobszay@arm.com>2021-03-29 18:39:55 +0200
committerBalint Dobszay <balint.dobszay@arm.com>2021-04-13 18:45:23 +0200
commit0fdceeabdc4d29317dbcd2607ea2b5e78179e1f5 (patch)
tree4b06165f66e78a3bfd639ba4e5138a5e482e3a83
parent840696b9ac1ba6aa9ccd024ca9dc3b4be12bf837 (diff)
downloadtrusted-services-0fdceeabdc4d29317dbcd2607ea2b5e78179e1f5.tar.gz
Add example SP manifests
Add manifest DTS for crypto and secure-storage SPs. The manifests contain the minimal required set of fields. The files are exported to the install directory (along with the executables, etc). Signed-off-by: Balint Dobszay <balint.dobszay@arm.com> Change-Id: Ifb42e4fb8e7f8e4a97cc46f51f0ffc670f490ae9
-rw-r--r--deployments/crypto/opteesp/default_crypto.dts.in19
-rw-r--r--deployments/secure-storage/opteesp/default_secure-storage.dts.in19
-rw-r--r--environments/opteesp/ExportSp.cmake22
-rw-r--r--environments/opteesp/sp.mk.in1
4 files changed, 61 insertions, 0 deletions
diff --git a/deployments/crypto/opteesp/default_crypto.dts.in b/deployments/crypto/opteesp/default_crypto.dts.in
new file mode 100644
index 0000000..92b709b
--- /dev/null
+++ b/deployments/crypto/opteesp/default_crypto.dts.in
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2021, 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 */
+ uuid = <@EXPORT_SP_UUID_DT@>;
+ description = "Crypto";
+ execution-ctx-count = <1>;
+ exception-level = <1>; /* S-EL0 */
+ execution-state = <0>; /* AArch64 */
+ xlat-granule = <0>; /* 4KiB */
+ messaging-method = <0>; /* Direct messaging only */
+};
diff --git a/deployments/secure-storage/opteesp/default_secure-storage.dts.in b/deployments/secure-storage/opteesp/default_secure-storage.dts.in
new file mode 100644
index 0000000..1a8d6a3
--- /dev/null
+++ b/deployments/secure-storage/opteesp/default_secure-storage.dts.in
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2021, 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 */
+ uuid = <@EXPORT_SP_UUID_DT@>;
+ description = "Secure Storage";
+ execution-ctx-count = <1>;
+ exception-level = <1>; /* S-EL0 */
+ execution-state = <0>; /* AArch64 */
+ xlat-granule = <0>; /* 4KiB */
+ messaging-method = <0>; /* Direct messaging only */
+};
diff --git a/environments/opteesp/ExportSp.cmake b/environments/opteesp/ExportSp.cmake
index b71a657..23e03ac 100644
--- a/environments/opteesp/ExportSp.cmake
+++ b/environments/opteesp/ExportSp.cmake
@@ -16,5 +16,27 @@ endforeach()
configure_file(${CMAKE_CURRENT_LIST_DIR}/sp.mk.in ${CMAKE_CURRENT_BINARY_DIR}/${EXPORT_SP_NAME}.mk @ONLY NEWLINE_STYLE UNIX)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${EXPORT_SP_NAME}.mk DESTINATION ${TS_ENV}/lib/make)
+get_filename_component(PARENT_LIST_DIR ${CMAKE_PARENT_LIST_FILE} DIRECTORY)
+string(REGEX REPLACE
+ "([a-f0-9]+)-([a-f0-9]+)-([a-f0-9]+)-([a-f0-9]+)-([a-f0-9][a-f0-9][a-f0-9][a-f0-9])([a-f0-9]+)"
+ "0x\\1 0x\\2\\3 0x\\4\\5 0x\\6"
+ EXPORT_SP_UUID_DT ${EXPORT_SP_UUID})
+
+set(DTS_TAG "")
+set(DTS_NODE "${EXPORT_SP_NAME}")
+configure_file(${PARENT_LIST_DIR}/default_${EXPORT_SP_NAME}.dts.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${EXPORT_SP_UUID}.dtsi @ONLY NEWLINE_STYLE UNIX)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${EXPORT_SP_UUID}.dtsi DESTINATION ${TS_ENV}/manifest)
+
+set(DTS_TAG "/dts-v1/;")
+set(DTS_NODE "/")
+configure_file(${PARENT_LIST_DIR}/default_${EXPORT_SP_NAME}.dts.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${EXPORT_SP_UUID}.dts @ONLY NEWLINE_STYLE UNIX)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${EXPORT_SP_UUID}.dts DESTINATION ${TS_ENV}/manifest)
+
+unset(DTS_TAG)
+unset(DTS_NODE)
+unset(PARENT_LIST_DIR)
+unset(EXPORT_SP_UUID_DT)
unset(EXPORT_SP_NAME)
unset(EXPORT_SP_UUID)
diff --git a/environments/opteesp/sp.mk.in b/environments/opteesp/sp.mk.in
index d29baeb..c0439f8 100644
--- a/environments/opteesp/sp.mk.in
+++ b/environments/opteesp/sp.mk.in
@@ -14,3 +14,4 @@ ifeq (,${@EXPORT_SP_UUID@-included})
endif
OPTEE_OS_COMMON_EXTRA_FLAGS+=EARLY_TA_PATHS+=${TS_INSTALL_PREFIX}/opteesp/bin/@EXPORT_SP_UUID@.stripped.elf
+TS_SP_DTSI_LIST+="\\n\#include \"${TS_INSTALL_PREFIX}/opteesp/manifest/@EXPORT_SP_UUID@.dtsi\""