From e75ff8f7fbdf06f70cf4ea5eb28233d5a5ffb7c1 Mon Sep 17 00:00:00 2001 From: Ioannis Glaropoulos Date: Tue, 13 Apr 2021 12:08:18 +0200 Subject: [PATCH] modules: trusted-firmware-m: fix dependencies for isolation level Do not allow the TFM_ISOLATION_LEVEL to be non-hidden option, if the TFM_IPC (PSA_API) option is not set, since, in that case, only Isolation Level 1 is supported. Signed-off-by: Ioannis Glaropoulos --- modules/trusted-firmware-m/Kconfig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/trusted-firmware-m/Kconfig b/modules/trusted-firmware-m/Kconfig index 1530017e0d6..31492d4437a 100644 --- a/modules/trusted-firmware-m/Kconfig +++ b/modules/trusted-firmware-m/Kconfig @@ -120,10 +120,10 @@ config TFM_CMAKE_BUILD_TYPE_DEBUG endchoice config TFM_ISOLATION_LEVEL - int "Isolation level setting." if TFM_PROFILE_TYPE_NOT_SET + int "Isolation level setting." if (TFM_PROFILE_TYPE_NOT_SET && TFM_IPC) range 1 3 depends on BUILD_WITH_TFM - default 1 if TFM_PROFILE_TYPE_SMALL + default 1 if TFM_PROFILE_TYPE_SMALL || !TFM_IPC default 2 if TFM_PROFILE_TYPE_MEDIUM default 3 if TFM_PROFILE_TYPE_LARGE help @@ -131,6 +131,8 @@ config TFM_ISOLATION_LEVEL 1,2 or 3; the default is set by build configuration. When TF-M Profile option is supplied, do not allow manual setting of the isolation level, as it is determined by the profile setting. + As isolation levels 2 and 3 require PSA_API (TFM_IPC) support, + force level 1 when TFM_IPC is not enabled. config TFM_BL2 bool "Add MCUboot to TFM"