Build: Set ns_agent partition flags
Remove defaults for CONFIG_TFM_USE_TRUSTZONE and
TFM_MULTI_CORE_TOPOLOGY.
Derive TFM_PARTITION_NS_AGENT_MAILBOX and TFM_PARTITION_NS_AGENT_TZ
from other configuration flags, and then use those flags where more
appropriate.
The goal is to open the path to other ns_agent configurations.
Change-Id: Ia866fd43d0cfbbaea0f70c9f9ee200644ce8bf9b
Signed-off-by: Chris Brand <chris.brand@cypress.com>
diff --git a/config/tfm_ipc_config_default.cmake b/config/tfm_ipc_config_default.cmake
index e1f9b93..f2ee8ab 100644
--- a/config/tfm_ipc_config_default.cmake
+++ b/config/tfm_ipc_config_default.cmake
@@ -1,5 +1,7 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2022 Cypress Semiconductor Corporation (an Infineon company)
+# or an affiliate of Cypress Semiconductor Corporation. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -11,3 +13,14 @@
set(CONFIG_TFM_SPM_BACKEND_IPC ON)
set(CONFIG_TFM_SPM_BACKEND_SFN OFF)
set(CONFIG_TFM_PARTITION_META ON)
+# Derive ns_agent partitions
+if (TFM_MULTI_CORE_TOPOLOGY)
+ set(TFM_PARTITION_NS_AGENT_MAILBOX ON CACHE BOOL "Enable Non-Secure Mailbox Agent partition")
+else()
+ set(TFM_PARTITION_NS_AGENT_MAILBOX OFF CACHE BOOL "Enable Non-Secure Mailbox Agent partition")
+endif()
+if (CONFIG_TFM_USE_TRUSTZONE)
+ set(TFM_PARTITION_NS_AGENT_TZ ON CACHE BOOL "Enable Non-Secure TrustZone Agent partition")
+else()
+ set(TFM_PARTITION_NS_AGENT_TZ OFF CACHE BOOL "Enable Non-Secure TrustZone Agent partition")
+endif()