Introduce RD-1 AE platform
1- Introduce a new SE-Proxy SP to support RD-1 AE platform
2- Enable Crypto, Protected Storage and Internal Trusted
Storage proxy services.
Signed-off-by: Ziad Elhanafy <ziad.elhanafy@arm.com>
Change-Id: I76eb4cb92dfb182ddf63996cc4273cd744dbbf64
diff --git a/deployments/se-proxy/config/rd1ae-opteesp/CMakeLists.txt b/deployments/se-proxy/config/rd1ae-opteesp/CMakeLists.txt
new file mode 100644
index 0000000..ba1ff90
--- /dev/null
+++ b/deployments/se-proxy/config/rd1ae-opteesp/CMakeLists.txt
@@ -0,0 +1,92 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
+
+# Set default platform.
+set(TS_PLATFORM "arm/automotive-rd/rd1ae" CACHE STRING "Target platform location.")
+include(../../../deployment.cmake REQUIRED)
+
+#-------------------------------------------------------------------------------
+# The CMakeLists.txt for building the se-proxy deployment for RD-1 AE
+# using the "opteesp" environment.
+#
+#-------------------------------------------------------------------------------
+include(${TS_ROOT}/environments/opteesp/env.cmake)
+project(trusted-services LANGUAGES C ASM)
+add_executable(se-proxy)
+target_include_directories(se-proxy PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
+set(SP_BIN_UUID_CANON "46bb39d1-b4d9-45b5-88ff-040027dab249")
+set(SP_FFA_UUID_CANON "${TS_RPC_UUID_CANON}")
+
+set(SP_HEAP_SIZE "32 * 1024" CACHE STRING "SP heap size in bytes")
+set(SP_BOOT_ORDER "1" CACHE STRING "Boot order of the SP")
+set(TRACE_PREFIX "SEPROXY" CACHE STRING "Trace prefix")
+
+target_include_directories(se-proxy PRIVATE
+ ${CMAKE_CURRENT_LIST_DIR}
+)
+
+#-------------------------------------------------------------------------------
+# Components that are specific to deployment in the opteesp environment.
+#
+#-------------------------------------------------------------------------------
+
+add_components(TARGET "se-proxy"
+ BASE_DIR ${TS_ROOT}
+ COMPONENTS
+ "environments/opteesp"
+)
+
+include(../../env/commonsp/se_proxy_sp.cmake REQUIRED)
+include(../../infra/automotive-rd/rd1ae/infra.cmake REQUIRED)
+include(../../se-proxy.cmake REQUIRED)
+
+#-------------------------------------------------------------------------------
+# Set target platform to provide drivers needed by the deployment
+#
+#-------------------------------------------------------------------------------
+add_platform(TARGET "se-proxy")
+
+#-------------------------------------------------------------------------------
+# Deployment specific build options
+#-------------------------------------------------------------------------------
+target_compile_definitions(se-proxy PRIVATE
+ ARM64=1
+)
+
+if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ target_compile_options(se-proxy PRIVATE
+ -std=c99
+ )
+endif()
+
+#-------------------------------------------------------------------------------
+# Deployment specific install options
+#-------------------------------------------------------------------------------
+if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
+endif()
+#TODO: api headers
+
+install(TARGETS se-proxy
+ PUBLIC_HEADER DESTINATION ${TS_ENV}/include
+ RUNTIME DESTINATION ${TS_ENV}/bin
+ )
+
+get_property(_PROTO_FILES TARGET se-proxy PROPERTY PROTOBUF_FILES)
+install(FILES ${_PROTO_FILES} DESTINATION ${TS_ENV}/lib/protobuf)
+
+include(${TS_ROOT}/tools/cmake/common/ExportSp.cmake)
+export_sp(
+ SP_FFA_UUID_CANON ${SP_FFA_UUID_CANON}
+ SP_BIN_UUID_CANON ${SP_BIN_UUID_CANON}
+ SP_BOOT_ORDER ${SP_BOOT_ORDER}
+ SP_NAME "se-proxy"
+ MK_IN ${TS_ROOT}/environments/opteesp/sp.mk.in
+ DTS_IN ${CMAKE_CURRENT_LIST_DIR}/default_se-proxy.dts.in
+ JSON_IN ${TS_ROOT}/environments/opteesp/sp_pkg.json.in
+)
diff --git a/deployments/se-proxy/config/rd1ae-opteesp/default_se-proxy.dts.in b/deployments/se-proxy/config/rd1ae-opteesp/default_se-proxy.dts.in
new file mode 100644
index 0000000..b0ddff0
--- /dev/null
+++ b/deployments/se-proxy/config/rd1ae-opteesp/default_se-proxy.dts.in
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2024, 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 = <@CFG_FFA_VERSION@>; /* 31:16 - Major, 15:0 - Minor */
+ uuid = <@EXPORT_SP_UUID_DT@>;
+ description = "SE Proxy";
+ execution-ctx-count = <1>;
+ exception-level = <1>; /* S-EL0 */
+ execution-state = <0>; /* AArch64 */
+ xlat-granule = <0>; /* 4KiB */
+ boot-order = /bits/ 16 <@EXPORT_SP_BOOT_ORDER@>;
+ messaging-method = <3>; /* Direct messaging only */
+ ns-interrupts-action = <2>; /* Non-secure interrupts are signaled */
+ elf-format = <1>;
+
+ device-regions {
+ compatible = "arm,ffa-manifest-device-regions";
+ mhu-sender {
+ /* Armv8 A Foundation Platform values */
+ base-address = <0x00000000 0x2AB20000>;
+ pages-count = <16>;
+ attributes = <0x3>; /* read-write */
+ };
+ mhu-receiver {
+ /* Armv8 A Foundation Platform values */
+ base-address = <0x00000000 0x2AB30000>;
+ pages-count = <16>;
+ attributes = <0x3>; /* read-write */
+ };
+ };
+};
diff --git a/deployments/se-proxy/config/rd1ae-opteesp/optee_sp_user_defines.h b/deployments/se-proxy/config/rd1ae-opteesp/optee_sp_user_defines.h
new file mode 100644
index 0000000..f6c5740
--- /dev/null
+++ b/deployments/se-proxy/config/rd1ae-opteesp/optee_sp_user_defines.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/*
+ * Copyright (c) 2024, Arm Limited and Contributors. All rights reserved.
+ */
+
+#ifndef SP_HEADER_DEFINES_H
+#define SP_HEADER_DEFINES_H
+
+#define OPTEE_SP_FLAGS 0
+
+/* Provisioned stack size */
+#define OPTEE_SP_STACK_SIZE (64 * 1024)
+
+#endif /* SP_HEADER_DEFINES_H */