Skip to content

Commit 176e29d

Browse files
committed
modules: tfm: disable SECURE_UART when TFM_LOG_LEVEL_SILENCE
Explicitly disable the SECURE_UART TFM define when `CONFIG_TFM_LOG_LEVEL_SILENCE=y`. Signed-off-by: Jordan Yates <[email protected]>
1 parent 81283c6 commit 176e29d

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

modules/trusted-firmware-m/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ if (CONFIG_BUILD_WITH_TFM)
154154
list(APPEND TFM_CMAKE_ARGS -DTFM_SPM_LOG_LEVEL=${TFM_SPM_LOG_LEVEL})
155155
endif()
156156

157+
if (CONFIG_TFM_SECURE_UART)
158+
list(APPEND TFM_CMAKE_ARGS -DSECURE_UART1=1)
159+
else()
160+
list(APPEND TFM_CMAKE_ARGS -DSECURE_UART1=0)
161+
endif()
162+
157163
# Enable TFM partitions as specified in Kconfig
158164
foreach(partition ${TFM_VALID_PARTITIONS})
159165
if (CONFIG_${partition})

modules/trusted-firmware-m/Kconfig.tfm

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,15 @@ config TFM_SPM_LOG_LEVEL_SILENCE
508508
bool "Off"
509509
endchoice
510510

511+
config TFM_SECURE_UART
512+
bool "TF-M configure UART instance as secure peripheral"
513+
default y if !TFM_LOG_LEVEL_SILENCE
514+
help
515+
Configure the UART instance as a secure peripheral for TF-M logging.
516+
This makes the UART instance unavailable to the non-secure application.
517+
When this option is selected the device tree node for the UART instance
518+
needs to be disabled for the non-secure application.
519+
511520
config TFM_EXCEPTION_INFO_DUMP
512521
bool "TF-M exception info dump"
513522
default y

0 commit comments

Comments
 (0)