aboutsummaryrefslogtreecommitdiff
path: root/CommonConfig.cmake
diff options
context:
space:
mode:
authorDavid Hu <david.hu@arm.com>2019-11-18 14:37:32 +0800
committerDavid Hu <david.hu@arm.com>2019-12-05 08:34:31 +0000
commit104388fc937e4db57a20a51065e0b0c6870e0fb4 (patch)
tree5713d3b95d33b3520dc4fe503e74d56afec6f586 /CommonConfig.cmake
parentdf40bcc3c20ea32cd5b0cc99c23326ccb1db79ea (diff)
downloadtrusted-firmware-m-104388fc937e4db57a20a51065e0b0c6870e0fb4.tar.gz
Build: Improve multi-core build in CommonConfig.cmake
Improve and fix the multi-core build configurations in CommonConfig.cmake Change-Id: I1e8abe81edaa6e76901f27ab02f2e8cbb15cc9a6 Signed-off-by: David Hu <david.hu@arm.com>
Diffstat (limited to 'CommonConfig.cmake')
-rw-r--r--CommonConfig.cmake10
1 files changed, 8 insertions, 2 deletions
diff --git a/CommonConfig.cmake b/CommonConfig.cmake
index 0e98af9fa3..ae6ff2c6e3 100644
--- a/CommonConfig.cmake
+++ b/CommonConfig.cmake
@@ -67,6 +67,10 @@ endif()
# building status in multi-core scenario.
# The updated configuration will be used in following compiler setting.
if (DEFINED TFM_MULTI_CORE_TOPOLOGY AND TFM_MULTI_CORE_TOPOLOGY)
+ if (NOT CORE_IPC)
+ message(FATAL_ERROR "CORE_IPC is OFF. Multi-core topology should work in IPC model.")
+ endif()
+
include("Common/MultiCore")
if (NOT DEFINED TFM_BUILD_IN_SPE)
@@ -74,9 +78,7 @@ if (DEFINED TFM_MULTI_CORE_TOPOLOGY AND TFM_MULTI_CORE_TOPOLOGY)
else()
select_arm_cpu_type(${TFM_BUILD_IN_SPE})
endif()
-endif()
-if (DEFINED TFM_MULTI_CORE_TOPOLOGY AND TFM_MULTI_CORE_TOPOLOGY)
# CMSE is unnecessary in multi-core scenarios.
# TODO: Need further discussion about if CMSE is required when an Armv8-M
# core acts as secure core in multi-core scenario.
@@ -180,6 +182,10 @@ if (TFM_PSA_API)
add_definitions(-DTFM_PSA_API)
endif()
+if (DEFINED TFM_MULTI_CORE_TOPOLOGY AND TFM_MULTI_CORE_TOPOLOGY)
+ add_definitions(-DTFM_MULTI_CORE_TOPOLOGY)
+endif()
+
if (TFM_LEGACY_API)
add_definitions(-DTFM_LEGACY_API)
endif()