aboutsummaryrefslogtreecommitdiff
path: root/secure_fw/partitions
diff options
context:
space:
mode:
authorKevin Peng <kevin.peng@arm.com>2022-08-05 17:56:30 +0800
committerDavid Hu <david.hu@arm.com>2022-08-29 07:43:23 +0200
commit8b8f7a4104b584635ae9374963919451f61c8446 (patch)
treea86dd3c3b2cf6a9413c2097f9bb9702e8d277b52 /secure_fw/partitions
parentb42ed862a0d6db2e91ec692211fc178202d66015 (diff)
downloadtrusted-firmware-m-8b8f7a4104b584635ae9374963919451f61c8446.tar.gz
Build: Merge secure_api & sp_log_raw into tfm_sprt
This patch merges tfm_secure_api and tfm_sp_log_raw library into tfm_sprt. The APIs in tfm_secure_api and tfm_sp_log_raw are for Secure Partitions usage thereforce they can naturally be moved to tfm_sprt as tfm_sprt is intended for Secure Partition usages. This patch also changes tfm_sprt to publicly link psa_interface. With these changes, Secure Partition libraries need to link a single tfm_sprt for all interactions with the framework. This patch also removes some unnecessary links. Change-Id: I99b1e3c6ae1e956435bcfdf5b0db77d9f6f2a3f3 Signed-off-by: Kevin Peng <kevin.peng@arm.com>
Diffstat (limited to 'secure_fw/partitions')
-rw-r--r--secure_fw/partitions/audit_logging/CMakeLists.txt5
-rw-r--r--secure_fw/partitions/crypto/CMakeLists.txt2
-rw-r--r--secure_fw/partitions/firmware_update/CMakeLists.txt2
-rw-r--r--secure_fw/partitions/initial_attestation/CMakeLists.txt3
-rw-r--r--secure_fw/partitions/internal_trusted_storage/CMakeLists.txt2
-rw-r--r--secure_fw/partitions/lib/runtime/CMakeLists.txt44
-rw-r--r--secure_fw/partitions/ns_agent_mailbox/CMakeLists.txt4
-rw-r--r--secure_fw/partitions/platform/CMakeLists.txt4
-rw-r--r--secure_fw/partitions/protected_storage/CMakeLists.txt4
-rw-r--r--secure_fw/partitions/psa_proxy/CMakeLists.txt5
10 files changed, 12 insertions, 63 deletions
diff --git a/secure_fw/partitions/audit_logging/CMakeLists.txt b/secure_fw/partitions/audit_logging/CMakeLists.txt
index 98ebcbf767..feffa033df 100644
--- a/secure_fw/partitions/audit_logging/CMakeLists.txt
+++ b/secure_fw/partitions/audit_logging/CMakeLists.txt
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -29,8 +29,7 @@ target_include_directories(tfm_psa_rot_partition_audit
target_link_libraries(tfm_psa_rot_partition_audit
PRIVATE
platform_s
- tfm_secure_api
- psa_interface
+ tfm_sprt
)
########################### Audit defs #########################################
diff --git a/secure_fw/partitions/crypto/CMakeLists.txt b/secure_fw/partitions/crypto/CMakeLists.txt
index 7721daf66e..3991438020 100644
--- a/secure_fw/partitions/crypto/CMakeLists.txt
+++ b/secure_fw/partitions/crypto/CMakeLists.txt
@@ -57,10 +57,8 @@ target_include_directories(tfm_partitions
# Linking to external interfaces
target_link_libraries(tfm_psa_rot_partition_crypto
PRIVATE
- tfm_secure_api
platform_s
crypto_service_mbedcrypto
- psa_interface
tfm_sprt
)
target_compile_definitions(tfm_psa_rot_partition_crypto
diff --git a/secure_fw/partitions/firmware_update/CMakeLists.txt b/secure_fw/partitions/firmware_update/CMakeLists.txt
index 4456ab8a8c..2cc1786938 100644
--- a/secure_fw/partitions/firmware_update/CMakeLists.txt
+++ b/secure_fw/partitions/firmware_update/CMakeLists.txt
@@ -47,8 +47,6 @@ add_subdirectory(bootloader/${TFM_FWU_BOOTLOADER_LIB})
target_link_libraries(tfm_psa_rot_partition_fwu
PRIVATE
- tfm_secure_api
- psa_interface
platform_s
tfm_sprt
)
diff --git a/secure_fw/partitions/initial_attestation/CMakeLists.txt b/secure_fw/partitions/initial_attestation/CMakeLists.txt
index 54d3270c56..d79cde7438 100644
--- a/secure_fw/partitions/initial_attestation/CMakeLists.txt
+++ b/secure_fw/partitions/initial_attestation/CMakeLists.txt
@@ -58,12 +58,9 @@ target_include_directories(tfm_partitions
target_link_libraries(tfm_psa_rot_partition_attestation
PRIVATE
- tfm_secure_api
platform_s
tfm_qcbor_s
tfm_t_cose_s
- secure_fw
- psa_interface
tfm_sprt
tfm_boot_status
)
diff --git a/secure_fw/partitions/internal_trusted_storage/CMakeLists.txt b/secure_fw/partitions/internal_trusted_storage/CMakeLists.txt
index 9631eea284..882fbb4059 100644
--- a/secure_fw/partitions/internal_trusted_storage/CMakeLists.txt
+++ b/secure_fw/partitions/internal_trusted_storage/CMakeLists.txt
@@ -55,9 +55,7 @@ target_sources(tfm_partitions
target_link_libraries(tfm_psa_rot_partition_its
PRIVATE
- tfm_secure_api
platform_s
- psa_interface
tfm_sprt
)
diff --git a/secure_fw/partitions/lib/runtime/CMakeLists.txt b/secure_fw/partitions/lib/runtime/CMakeLists.txt
index d7826aff1a..a83a80fdf5 100644
--- a/secure_fw/partitions/lib/runtime/CMakeLists.txt
+++ b/secure_fw/partitions/lib/runtime/CMakeLists.txt
@@ -26,16 +26,16 @@ target_sources(tfm_sprt
$<$<BOOL:${CONFIG_TFM_PARTITION_META}>:./sprt_partition_metadata_indicator.c>
$<$<BOOL:${CONFIG_TFM_PARTITION_META}>:./rt_main.c>
$<$<BOOL:${CONFIG_TFM_SPM_BACKEND_IPC}>:./sfn_common_thread.c>
+ $<$<BOOL:${TFM_SP_LOG_RAW_ENABLED}>:./tfm_sp_log_raw.c>
+ $<$<BOOL:${TFM_SP_LOG_RAW_ENABLED}>:${CMAKE_SOURCE_DIR}/platform/ext/common/tfm_hal_sp_logdev_periph.c>
)
target_link_libraries(tfm_sprt
PUBLIC
- $<$<BOOL:${TFM_SP_LOG_RAW_ENABLED}>:tfm_sp_log_raw>
- PRIVATE
- platform_s
- tfm_secure_api
psa_interface
- tfm_boot_status
+ tfm_spm_defs
+ tfm_partition_defs
+ platform_s
)
target_compile_definitions(tfm_partition_defs
@@ -48,37 +48,3 @@ target_include_directories(tfm_partitions
INTERFACE
$<BUILD_INTERFACE:$<$<BOOL:${CONFIG_TFM_PARTITION_META}>:${CMAKE_CURRENT_SOURCE_DIR}/include>>
)
-
-# Create a dedicated tfm_sp_log_raw library for some regression test modules
-# which don't include tfm_sprt.
-# tfm_sp_log_raw shall be controlled by TFM_SP_LOG_RAW_ENABLED.
-# Otherwise, build will fail if TFM_SP_LOG_RAW_ENABLED is disabled since some
-# definitions are unavailable with TFM_SP_LOG_RAW_ENABLED disabled.
-if (TFM_SP_LOG_RAW_ENABLED)
- add_library(tfm_sp_log_raw INTERFACE)
-
- target_sources(tfm_sp_log_raw
- INTERFACE
- ${CMAKE_CURRENT_SOURCE_DIR}/tfm_sp_log_raw.c
- ${CMAKE_SOURCE_DIR}/platform/ext/common/tfm_hal_sp_logdev_periph.c
- )
-
- target_include_directories(tfm_sp_log_raw
- INTERFACE
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
- )
-
- target_link_libraries(tfm_sp_log_raw
- INTERFACE
- platform_s
- psa_interface
- tfm_secure_api
- )
-
- target_compile_definitions(tfm_sp_log_raw
- INTERFACE
- $<$<BOOL:${TFM_PSA_API}>:TFM_PSA_API>
- TFM_PARTITION_LOG_LEVEL=${TFM_PARTITION_LOG_LEVEL}
- TFM_SP_LOG_RAW_ENABLED
- )
-endif()
diff --git a/secure_fw/partitions/ns_agent_mailbox/CMakeLists.txt b/secure_fw/partitions/ns_agent_mailbox/CMakeLists.txt
index b33552ec3c..f270b2cc82 100644
--- a/secure_fw/partitions/ns_agent_mailbox/CMakeLists.txt
+++ b/secure_fw/partitions/ns_agent_mailbox/CMakeLists.txt
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2021, Arm Limited. All rights reserved.
+# Copyright (c) 2021-2022, Arm Limited. All rights reserved.
# Copyright (c) 2021-2022 Cypress Semiconductor Corporation (an Infineon company)
# or an affiliate of Cypress Semiconductor Corporation. All rights reserved.
#
@@ -26,11 +26,9 @@ target_sources(tfm_psa_rot_partition_ns_agent_mailbox
target_link_libraries(tfm_psa_rot_partition_ns_agent_mailbox
PRIVATE
platform_common_interface
- psa_interface
tfm_spm
tfm_sprt
platform_s
- tfm_secure_api
)
# The generated sources
diff --git a/secure_fw/partitions/platform/CMakeLists.txt b/secure_fw/partitions/platform/CMakeLists.txt
index 3070f89d6d..9afd4cdec4 100644
--- a/secure_fw/partitions/platform/CMakeLists.txt
+++ b/secure_fw/partitions/platform/CMakeLists.txt
@@ -42,9 +42,7 @@ target_include_directories(tfm_partitions
target_link_libraries(tfm_psa_rot_partition_platform
PRIVATE
platform_s
- psa_interface
- tfm_secure_api
- tfm_spm
+ tfm_sprt
)
target_compile_definitions(tfm_psa_rot_partition_platform
diff --git a/secure_fw/partitions/protected_storage/CMakeLists.txt b/secure_fw/partitions/protected_storage/CMakeLists.txt
index e8b2c173a7..7feb08651c 100644
--- a/secure_fw/partitions/protected_storage/CMakeLists.txt
+++ b/secure_fw/partitions/protected_storage/CMakeLists.txt
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -61,8 +61,6 @@ target_sources(tfm_partitions
target_link_libraries(tfm_app_rot_partition_ps
PRIVATE
- tfm_secure_api
- psa_interface
secure_fw
platform_s
tfm_sprt
diff --git a/secure_fw/partitions/psa_proxy/CMakeLists.txt b/secure_fw/partitions/psa_proxy/CMakeLists.txt
index d1443803be..fe4c46f8f6 100644
--- a/secure_fw/partitions/psa_proxy/CMakeLists.txt
+++ b/secure_fw/partitions/psa_proxy/CMakeLists.txt
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -47,8 +47,7 @@ target_sources(tfm_partitions
target_link_libraries(tfm_psa_rot_partition_psa_proxy
PRIVATE
- tfm_secure_api
- psa_interface
+ tfm_sprt
secure_fw
platform_s
)