diff --git a/modules/trusted-firmware-m/CMakeLists.txt b/modules/trusted-firmware-m/CMakeLists.txt index 59277c101a..b54f0eb0e0 100644 --- a/modules/trusted-firmware-m/CMakeLists.txt +++ b/modules/trusted-firmware-m/CMakeLists.txt @@ -49,6 +49,12 @@ if (CONFIG_BUILD_WITH_TFM) if (CONFIG_TFM_ISOLATION_LEVEL) list(APPEND TFM_CMAKE_ARGS -DTFM_ISOLATION_LEVEL=${CONFIG_TFM_ISOLATION_LEVEL}) endif() + if (CONFIG_TFM_ITS_NUM_ASSETS_OVERRIDE) + list(APPEND TFM_CMAKE_ARGS -DITS_NUM_ASSETS=${CONFIG_TFM_ITS_NUM_ASSETS}) + endif() + if (CONFIG_TFM_ITS_MAX_ASSET_SIZE_OVERRIDE) + list(APPEND TFM_CMAKE_ARGS -DITS_MAX_ASSET_SIZE=${CONFIG_TFM_ITS_MAX_ASSET_SIZE}) + endif() if (CONFIG_TFM_PROFILE) list(APPEND TFM_CMAKE_ARGS -DTFM_PROFILE=${CONFIG_TFM_PROFILE}) endif() diff --git a/modules/trusted-firmware-m/Kconfig.tfm b/modules/trusted-firmware-m/Kconfig.tfm index f2562654cb..e1c30796b4 100644 --- a/modules/trusted-firmware-m/Kconfig.tfm +++ b/modules/trusted-firmware-m/Kconfig.tfm @@ -139,6 +139,33 @@ config TFM_ISOLATION_LEVEL As isolation levels 2 and 3 require PSA_API (TFM_IPC) support, force level 1 when TFM_IPC is not enabled. +config TFM_ITS_NUM_ASSETS_OVERRIDE + bool "Override maximum number of Internal Trusted Storage assets" + help + Override the platform's default maximum number of assets to be stored in + Internal Trusted Storage (ITS) with TFM_ITS_NUM_ASSETS. + +config TFM_ITS_NUM_ASSETS + int "Maximum number of Internal Trusted Storage assets" + depends on TFM_ITS_NUM_ASSETS_OVERRIDE + default 0 + help + Maximum number of assets to be stored in Internal Trusted Storage (ITS). + +config TFM_ITS_MAX_ASSET_SIZE_OVERRIDE + bool "Override maximum Internal Trusted Storage asset size" + help + Override the platform's default maximum size of a single asset to be + stored in Internal Trusted Storage (ITS) with TFM_ITS_MAX_ASSET_SIZE. + +config TFM_ITS_MAX_ASSET_SIZE + int "Maximum Internal Trusted Storage asset size" + depends on TFM_ITS_MAX_ASSET_SIZE_OVERRIDE + default 0 + help + Maximum size (in bytes) of a single asset to be stored in Internal Trusted + Storage (ITS). + config TFM_BL2 bool "Add MCUboot to TFM" default y