diff options
author | Shawn Shan <Shawn.Shan@arm.com> | 2020-10-16 15:30:17 +0800 |
---|---|---|
committer | Shawn Shan <Shawn.Shan@arm.com> | 2020-11-03 15:09:20 +0800 |
commit | 6f33aad1996ad1dadf1f66153f45a139c107c433 (patch) | |
tree | 27be4b960139643dd5a92e9be031e9ff107125f6 | |
parent | 17d4e23654e4698bd65b07ca08281cb0f571943a (diff) | |
download | trusted-firmware-m-6f33aad1996ad1dadf1f66153f45a139c107c433.tar.gz |
Build: Add SPM log support for platforms
As SPM log functions have implemented, add SPM log support for
all the platforms. Set default TFM_SPM_LOG_LEVEL equal to
TFM_SPM_LOG_LEVEL_INFO.
Change-Id: I4111a9ac3840497a70302bbddb19605f8feafe08
Signed-off-by: Shawn Shan <Shawn.Shan@arm.com>
-rw-r--r-- | config/config_default.cmake | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | platform/CMakeLists.txt | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | secure_fw/spm/CMakeLists.txt | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/config/config_default.cmake b/config/config_default.cmake index afa0922c0e..952ed4069f 100644 --- a/config/config_default.cmake +++ b/config/config_default.cmake @@ -22,6 +22,8 @@ set(TFM_EXTRA_CONFIG_PATH "" CACHE PATH "Path to ext set(TFM_EXTRA_MANIFEST_LIST_PATH "" CACHE PATH "Path to extra manifest file, used to declare extra partitions. Appended to standard TFM manifest") set(TFM_EXTRA_GENERATED_FILE_LIST_PATH "" CACHE PATH "Path to extra generated file list. Appended to stardard TFM generated file list.") +set(TFM_SPM_LOG_LEVEL 2 CACHE STRING "Set SPM log level as INFO level") + ########################## BL2 ################################################# set(MCUBOOT_IMAGE_NUMBER 2 CACHE STRING "Whether to combine S and NS into either 1 image, or sign each seperately") diff --git a/platform/CMakeLists.txt b/platform/CMakeLists.txt index bf3ea537c9..04b6e1f104 100644..100755 --- a/platform/CMakeLists.txt +++ b/platform/CMakeLists.txt @@ -44,6 +44,7 @@ target_sources(platform_s ext/common/tfm_hal_its.c ext/common/tfm_platform.c ext/common/uart_stdout.c + ext/common/tfm_hal_spm_logdev_peripheral.c $<$<BOOL:${PLATFORM_DUMMY_ATTEST_HAL}>:ext/common/template/attest_hal.c> $<$<BOOL:${PLATFORM_DUMMY_NV_COUNTERS}>:ext/common/template/nv_counters.c> $<$<BOOL:${PLATFORM_DUMMY_CRYPTO_KEYS}>:ext/common/template/crypto_keys.c> @@ -61,6 +62,8 @@ target_link_libraries(platform_s ) target_compile_definitions(platform_s + PUBLIC + TFM_SPM_LOG_LEVEL=${TFM_SPM_LOG_LEVEL} PRIVATE $<$<BOOL:${SYMMETRIC_INITIAL_ATTESTATION}>:SYMMETRIC_INITIAL_ATTESTATION> ) diff --git a/secure_fw/spm/CMakeLists.txt b/secure_fw/spm/CMakeLists.txt index 7f7921cfc5..098e6bdb6e 100644..100755 --- a/secure_fw/spm/CMakeLists.txt +++ b/secure_fw/spm/CMakeLists.txt @@ -34,6 +34,7 @@ target_sources(tfm_spm $<$<BOOL:${TFM_PARTITION_INITIAL_ATTESTATION}>:common/tfm_boot_data.c> common/tfm_core_utils.c common/utilities.c + common/spm_log.c $<$<BOOL:${TFM_MULTI_CORE_TOPOLOGY}>:cmsis_psa/tfm_multi_core.c> $<$<BOOL:${TFM_MULTI_CORE_TOPOLOGY}>:cmsis_psa/tfm_multi_core_mem_check.c> $<$<BOOL:${TFM_MULTI_CORE_TOPOLOGY}>:cmsis_psa/tfm_rpc.c> |