aboutsummaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorDavid Hu <david.hu@arm.com>2019-12-25 11:21:25 +0800
committerDavid Hu <david.hu@arm.com>2020-05-28 16:50:02 +0800
commitd0da13a64fb64783abe3a03475ec5ec86e0aff23 (patch)
treea7e7a0710227173b58dbd786b90cde17ebb75207 /configs
parente954d6b5795c15b6eb5a4dfcd8957b150ab99f6a (diff)
downloadtrusted-firmware-m-d0da13a64fb64783abe3a03475ec5ec86e0aff23.tar.gz
Config: Add a top-level config file for TF-M Profile Small
Add a top-level configuration ConfigDefaultProfileS.cmake for TF-M Profile Small. The configuration file mainly sets following configurations: 1. Library Model 2. Isolation Level 1 3. Internal Trusted Storage 4. Crypto service 5. Other secure services are disabled by default Platform can provide a configuration extension file via argument TFM_PROFILE_CONFIG_EXT to overwrite the default configurations and add new settings. Change-Id: Ic8b3427b4ff7e8b8c3c0a90339a85ef7d48d75f1 Signed-off-by: David Hu <david.hu@arm.com>
Diffstat (limited to 'configs')
-rw-r--r--configs/ConfigDefaultProfileS.cmake90
1 files changed, 90 insertions, 0 deletions
diff --git a/configs/ConfigDefaultProfileS.cmake b/configs/ConfigDefaultProfileS.cmake
new file mode 100644
index 0000000000..b52a11ebe0
--- /dev/null
+++ b/configs/ConfigDefaultProfileS.cmake
@@ -0,0 +1,90 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2019-2020, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+# This file holds information of the configuration for TF-M Profile Small
+
+if(NOT DEFINED TFM_ROOT_DIR)
+ message(FATAL_ERROR "Variable TFM_ROOT_DIR is not set!")
+endif()
+
+#Include board specific config (CPU, etc...), select platform specific build
+#system settings file
+if(NOT DEFINED TARGET_PLATFORM)
+ message(FATAL_ERROR "ERROR: TARGET_PLATFORM is not set in command line")
+elseif(${TARGET_PLATFORM} STREQUAL "AN521")
+ set(PLATFORM_CMAKE_FILE "${TFM_ROOT_DIR}/platform/ext/Mps2AN521.cmake")
+elseif(${TARGET_PLATFORM} STREQUAL "AN519")
+ set (PLATFORM_CMAKE_FILE "${TFM_ROOT_DIR}/platform/ext/Mps2AN519.cmake")
+else()
+ message(FATAL_ERROR "ERROR: Target \"${TARGET_PLATFORM}\" is not supported.")
+endif()
+
+# These variables select the default setting of this TF-M Profile Small.
+# The settings can be overwritten by the customized platform specific settings
+
+# Library model
+set(CORE_IPC False)
+# TF-M isolation level: 1
+set(TFM_LVL 1)
+
+# BL2 settings can be overwritten in the profile extension configuration
+# or in platform specific cmake file.
+if(NOT DEFINED BL2)
+ set(BL2 True)
+endif()
+
+if(BL2)
+ # Single binary boot
+ set(MCUBOOT_IMAGE_NUMBER 1 CACHE STRING "Single binary boot by default")
+endif()
+
+# Enable Internal Trusted Storage service
+set(TFM_PARTITION_INTERNAL_TRUSTED_STORAGE ON)
+# Decrease the transient internal buffer size to 32 bytes
+set(ITS_BUF_SIZE 32)
+
+# Enable Crypto service
+set(TFM_PARTITION_CRYPTO ON)
+set(CRYPTO_ASYMMETRIC_MODULE_DISABLED ON)
+set(CRYPTO_KEY_DERIVATION_MODULE_DISABLED ON)
+# Set the dedicated mbed-crypto default config file
+set(MBEDTLS_CONFIG_FILE "tfm_profile_s_mbedcrypto_config.h")
+
+# Disable Audit Logging service
+set(TFM_PARTITION_AUDIT_LOG OFF)
+
+# Disable Platform service
+set(TFM_PARTITION_PLATFORM OFF)
+
+# Disable Secure Storage service
+set(TFM_PARTITION_SECURE_STORAGE OFF)
+
+# Disable Initial Attestation service temporarily
+set(TFM_PARTITION_INITIAL_ATTESTATION OFF)
+
+# Disable all the test cases
+set(REGRESSION False)
+set(CORE_TEST False)
+set(PSA_API_TEST False)
+
+# Include platform specific profile configuration extension file if it is
+# provided via argument TFM_PROFILE_CONFIG_EXT in command line.
+# The configuration extension file can be specified as an absolute path or a
+# relative path to TF-M root folder.
+if(TFM_PROFILE_CONFIG_EXT)
+ get_filename_component(TFM_PROFILE_CONFIG_EXT ${TFM_PROFILE_CONFIG_EXT}
+ ABSOLUTE BASE_DIR ${TFM_ROOT_DIR})
+
+ if(NOT EXISTS ${TFM_PROFILE_CONFIG_EXT})
+ message(FATAL_ERROR "The config extension ${TFM_PROFILE_CONFIG_EXT} is not found")
+ endif()
+
+ include(${TFM_PROFILE_CONFIG_EXT})
+ message("The config extension ${TFM_PROFILE_CONFIG_EXT} is included")
+endif()
+
+include("${TFM_ROOT_DIR}/CommonConfig.cmake")