aboutsummaryrefslogtreecommitdiff
path: root/interface
diff options
context:
space:
mode:
authorDavid Hu <david.hu@arm.com>2020-12-04 17:20:27 +0800
committerDavid Hu <david.hu@arm.com>2020-12-28 13:53:02 +0800
commitb7a131e0b0f1835f7a2fae4c3bd5778a88c30549 (patch)
treed5c2a762424e549da053e0d7c6950efedce11101 /interface
parentdb067ebbb172799e2aa29f2443499babd3fa3e99 (diff)
downloadtrusted-firmware-m-b7a131e0b0f1835f7a2fae4c3bd5778a88c30549.tar.gz
Build: Move psa_ns_api build to NS side
Move NS interface source code build to NS side. NS interface build should be executed during NS build. Change-Id: I7ac3bbf1a9e975d8a9e2f4fb5cd6f367ff94cc9d Signed-off-by: David Hu <david.hu@arm.com>
Diffstat (limited to 'interface')
-rw-r--r--interface/CMakeLists.txt70
1 files changed, 11 insertions, 59 deletions
diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt
index 0f7540b9c..3af7daa84 100644
--- a/interface/CMakeLists.txt
+++ b/interface/CMakeLists.txt
@@ -51,6 +51,17 @@ target_compile_definitions(psa_interface
$<$<BOOL:${FORWARD_PROT_MSG}>:FORWARD_PROT_MSG=${FORWARD_PROT_MSG}>
)
+# A dummy interface library to make sure platform NS build can proceed when NS
+# is disabled, if a platform doesn't use NS flag to control platform NS build.
+if (NOT NS)
+ add_library(tfm_ns_interface INTERFACE)
+
+ target_link_libraries(tfm_ns_interface
+ INTERFACE
+ psa_interface
+ )
+endif()
+
###################### PSA api (S lib) #########################################
target_sources(tfm_secure_api
@@ -60,62 +71,3 @@ target_sources(tfm_secure_api
$<$<BOOL:${TFM_PSA_API}>:${CMAKE_CURRENT_SOURCE_DIR}/src/psa/psa_lifecycle.c>
${CMAKE_CURRENT_SOURCE_DIR}/src/log/tfm_log_raw.c
)
-
-###################### PSA api (NS lib) ########################################
-
-add_library(psa_api_ns STATIC)
-
-target_sources(psa_api_ns
- PRIVATE
- $<$<BOOL:${TFM_NS_CLIENT_IDENTIFICATION}>:src/tfm_nspm_svc_handler.c>
- $<$<BOOL:${TFM_NS_CLIENT_IDENTIFICATION}>:src/tfm_nspm_api.c>
-)
-
-if (${TFM_PSA_API})
- target_sources(psa_api_ns PRIVATE
- $<$<OR:$<BOOL:{$FORWARD_PROT_MSG}>,$<BOOL:${TFM_PARTITION_PLATFORM}>>:${CMAKE_CURRENT_SOURCE_DIR}/src/tfm_platform_ipc_api.c>
- $<$<OR:$<BOOL:{$FORWARD_PROT_MSG}>,$<BOOL:${TFM_PARTITION_PROTECTED_STORAGE}>>:${CMAKE_CURRENT_SOURCE_DIR}/src/tfm_ps_ipc_api.c>
- $<$<OR:$<BOOL:{$FORWARD_PROT_MSG}>,$<BOOL:${TFM_PARTITION_INTERNAL_TRUSTED_STORAGE}>>:${CMAKE_CURRENT_SOURCE_DIR}/src/tfm_its_ipc_api.c>
- $<$<OR:$<BOOL:{$FORWARD_PROT_MSG}>,$<BOOL:${TFM_PARTITION_CRYPTO}>>:${CMAKE_CURRENT_SOURCE_DIR}/src/tfm_crypto_ipc_api.c>
- $<$<OR:$<BOOL:{$FORWARD_PROT_MSG}>,$<BOOL:${TFM_PARTITION_INITIAL_ATTESTATION}>>:${CMAKE_CURRENT_SOURCE_DIR}/src/tfm_initial_attestation_ipc_api.c>
- )
-
- if (TFM_MULTI_CORE_TOPOLOGY)
- target_sources(psa_api_ns PRIVATE
- src/tfm_ns_mailbox.c
- src/tfm_multi_core_api.c
- src/tfm_multi_core_psa_ns_api.c
- )
- else()
- target_sources(psa_api_ns PRIVATE
- src/tfm_ns_interface.c
- src/tfm_psa_ns_api.c
- )
- endif()
-else()
- target_sources(psa_api_ns PRIVATE
- $<$<BOOL:${TFM_PARTITION_PLATFORM}>:${CMAKE_CURRENT_SOURCE_DIR}/src/tfm_platform_func_api.c>
- $<$<BOOL:${TFM_PARTITION_AUDIT_LOG}>:${CMAKE_CURRENT_SOURCE_DIR}/src/tfm_audit_func_api.c>
- $<$<BOOL:${TFM_PARTITION_PROTECTED_STORAGE}>:${CMAKE_CURRENT_SOURCE_DIR}/src/tfm_ps_func_api.c>
- $<$<BOOL:${TFM_PARTITION_INTERNAL_TRUSTED_STORAGE}>:${CMAKE_CURRENT_SOURCE_DIR}/src/tfm_its_func_api.c>
- $<$<BOOL:${TFM_PARTITION_CRYPTO}>:${CMAKE_CURRENT_SOURCE_DIR}/src/tfm_crypto_func_api.c>
- $<$<BOOL:${TFM_PARTITION_INITIAL_ATTESTATION}>:${CMAKE_CURRENT_SOURCE_DIR}/src/tfm_initial_attestation_func_api.c>
- src/tfm_psa_ns_api.c
- )
- if (NOT TFM_MULTI_CORE_TOPOLOGY)
- target_sources(psa_api_ns PRIVATE
- src/tfm_ns_interface.c
- )
- endif()
-
-endif()
-
-target_link_libraries(psa_api_ns
- PUBLIC
- psa_interface
- PRIVATE
- platform_ns
- # CMSIS is currently only required to provide the NS client IDs. In
- # future, this should probably be made more OS agnostic
- $<$<BOOL:${TFM_NS_CLIENT_IDENTIFICATION}>:CMSIS_5_tfm_ns>
-)