Skip to content

Commit fd1a0f7

Browse files
Vge0rgenordicjm
authored andcommitted
modules: tf-m: Add Kconfig option for older PS format
TF-M recently added a new format for the protected storage data. In order to keep backwards compatibility it added the configuration TFM_PS_SUPPORT_FORMAT_TRANSITION to allow new versions of TF-M to read the older data format. This allows the option to be selected as a Kconfig option in sdk-nrf. Signed-off-by: Georgios Vasilakis <[email protected]>
1 parent 51e366c commit fd1a0f7

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

modules/trusted-firmware-m/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ set_property(TARGET zephyr_property_target
8585
$<$<BOOL:${CONFIG_NRF_SECURE_APPROTECT_LOCK}>:-DCONFIG_NRF_SECURE_APPROTECT_LOCK=ON>
8686
$<$<BOOL:${CONFIG_NRF_SECURE_APPROTECT_USER_HANDLING}>:-DCONFIG_NRF_SECURE_APPROTECT_USER_HANDLING=ON>
8787
$<$<BOOL:${CONFIG_IDENTITY_KEY_TFM}>:-DCONFIG_IDENTITY_KEY_TFM=ON>
88+
$<$<BOOL:${CONFIG_TFM_PS_SUPPORT_FORMAT_TRANSITION}>:-DPS_SUPPORT_FORMAT_TRANSITION=ON>
89+
8890
)
8991

9092
if(CONFIG_TFM_PROFILE_TYPE_MINIMAL)

modules/trusted-firmware-m/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,16 @@ config TFM_PS_STACK_SIZE
286286
default 0x1200 if TFM_PS_NUM_ASSETS > 70
287287
default 0xC00 if TFM_PS_NUM_ASSETS > 30
288288
default 0x700
289+
290+
config TFM_PS_SUPPORT_FORMAT_TRANSITION
291+
bool "Allow reading Protected Storage data from TF-M versions prior to 2.2"
292+
help
293+
TF-M version 2.2 introduced a new storage format for the Protected Storage
294+
data. To avoid breaking firmware upgrades to version 2.2 TF-M allows reading
295+
the Protected Storage data stored with earlier versions using this configuration.
296+
This is relevant for TF-M enabled applications built with NCS version 3.1 and prior
297+
that want to perform a firmware upgrade to NCS version 3.2 onwards.
298+
289299
endmenu
290300

291301
# Copied from secure_fw/spm/Kconfig, removed CONFIG prefix

0 commit comments

Comments
 (0)