Commit 2572a53a authored by Joakim Andersson's avatar Joakim Andersson Committed by Anas Nashif
Browse files

tfm: Remove library model support



In TF-M 1.7.0 release the Library model has been removed.
Remove the library model support from zephyr before updating TF-M
version.

Signed-off-by: default avatarJoakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: default avatarDavid Brown <david.brown@linaro.org>
parent d5e0fdaf
Loading
Loading
Loading
Loading
+16 −36
Original line number Diff line number Diff line
@@ -31,9 +31,6 @@ set(TFM_CRYPTO_MODULES


if (CONFIG_BUILD_WITH_TFM)
  if (CONFIG_TFM_LIBRARY)
    list(APPEND TFM_CMAKE_ARGS -DTFM_LIB_MODEL=ON)
  else()
  list(APPEND TFM_CMAKE_ARGS -DTFM_LIB_MODEL=OFF)
  # PSA API awareness for the Non-Secure application
  target_compile_definitions(app PRIVATE "TFM_PSA_API")
@@ -42,7 +39,6 @@ if (CONFIG_BUILD_WITH_TFM)
  else() # CONFIG_TFM_IPC
    list(APPEND TFM_CMAKE_ARGS -DCONFIG_TFM_SPM_BACKEND="IPC")
  endif()
  endif()
  if (CONFIG_TFM_REGRESSION_S)
    list(APPEND TFM_CMAKE_ARGS -DTEST_S=ON)
  endif()
@@ -219,13 +215,6 @@ if (CONFIG_BUILD_WITH_TFM)

    ${TFM_INTERFACE_SOURCE_DIR}/tfm_psa_ns_api.c

    ${TFM_INTERFACE_SOURCE_DIR}/tfm_platform_func_api.c
    ${TFM_INTERFACE_SOURCE_DIR}/tfm_ps_func_api.c
    ${TFM_INTERFACE_SOURCE_DIR}/tfm_its_func_api.c
    ${TFM_INTERFACE_SOURCE_DIR}/tfm_crypto_func_api.c
    ${TFM_INTERFACE_SOURCE_DIR}/tfm_initial_attestation_func_api.c
    ${TFM_INTERFACE_SOURCE_DIR}/tfm_firmware_update_func_api.c

    # Specific to nordic_nrf platform
    ${TFM_INTERFACE_SOURCE_DIR}/tfm_ioctl_core_ns_api.c
    )
@@ -380,7 +369,6 @@ if (CONFIG_BUILD_WITH_TFM)
  endif()

  if(NOT CONFIG_TFM_BUILD_NS)
    if(CONFIG_TFM_IPC OR CONFIG_TFM_SFN)
    zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_PLATFORM                 ${TFM_INTERFACE_SOURCE_DIR}/tfm_platform_ipc_api.c)
    zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_PROTECTED_STORAGE        ${TFM_INTERFACE_SOURCE_DIR}/tfm_ps_ipc_api.c)
    zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_INTERNAL_TRUSTED_STORAGE ${TFM_INTERFACE_SOURCE_DIR}/tfm_its_ipc_api.c)
@@ -389,14 +377,6 @@ if (CONFIG_BUILD_WITH_TFM)
    zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_FIRMWARE_UPDATE          ${TFM_INTERFACE_SOURCE_DIR}/tfm_firmware_update_ipc_api.c)

    zephyr_library_sources(${TFM_INTERFACE_SOURCE_DIR}/tfm_psa_ns_api.c)
    else()
      zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_PLATFORM                 ${TFM_INTERFACE_SOURCE_DIR}/tfm_platform_func_api.c)
      zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_PROTECTED_STORAGE        ${TFM_INTERFACE_SOURCE_DIR}/tfm_ps_func_api.c)
      zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_INTERNAL_TRUSTED_STORAGE ${TFM_INTERFACE_SOURCE_DIR}/tfm_its_func_api.c)
      zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_CRYPTO                   ${TFM_INTERFACE_SOURCE_DIR}/tfm_crypto_func_api.c)
      zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_INITIAL_ATTESTATION      ${TFM_INTERFACE_SOURCE_DIR}/tfm_initial_attestation_func_api.c)
      zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_FIRMWARE_UPDATE          ${TFM_INTERFACE_SOURCE_DIR}/tfm_firmware_update_func_api.c)
    endif()

    if(CONFIG_SOC_FAMILY_NRF)
      zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_PLATFORM               ${TFM_INTERFACE_SOURCE_DIR}/tfm_ioctl_core_ns_api.c)
+0 −10
Original line number Diff line number Diff line
@@ -283,16 +283,6 @@ choice TFM_MODEL
	  The Firmware Framework M (FF-M) provides different programming models
	  for Secure Partitions.

config TFM_LIBRARY
	bool "Library Model"
	help
	  Use the library model instead of PSA API.

	  The library model conforms to the PSA Firmware Framework for M (FF-M)
	  v1.0.

	  NOTE: The Library Model will be removed and replaced by the SFN model.

config TFM_IPC
	bool "IPC Model"
	help
+0 −14
Original line number Diff line number Diff line
@@ -65,20 +65,6 @@ config TFM_PARTITION_PLATFORM
	  options are handled by the build system in the trusted-firmware-m
	  repository.

config TFM_PARTITION_AUDIT_LOG
	bool "Secure partition 'Audit Log'"
	depends on TFM_LIBRARY
	default y
	help
	  Setting this option will cause '-DTFM_PARTITION_AUDIT_LOG'
	  to be passed to the TF-M build system. Look at 'config_default.cmake'
	  in the trusted-firmware-m repository for details regarding this
	  parameter. Any dependencies between the various TFM_PARTITION_*
	  options are handled by the build system in the trusted-firmware-m
	  repository.
	  Note: the Audit Log service does not implement the IPC model
	  interface so it may not be enabled together with IPC option.

config TFM_PARTITION_FIRMWARE_UPDATE
	bool "Include the secure parition 'Firmware Update'"
	select TFM_MCUBOOT_DATA_SHARING
+0 −4
Original line number Diff line number Diff line
@@ -17,10 +17,6 @@ sample:
  name: "TFM Regression Test"

tests:
  sample.tfm.regression_lib_mode:
    extra_args: CONFIG_TFM_LIBRARY=y CONFIG_TFM_ISOLATION_LEVEL=1 CONFIG_TFM_PARTITION_AUDIT_LOG=y
    timeout: 200

  sample.tfm.regression_ipc_lvl1:
    extra_args: CONFIG_TFM_IPC=y CONFIG_TFM_ISOLATION_LEVEL=1
    timeout: 200
+0 −3
Original line number Diff line number Diff line
@@ -20,6 +20,3 @@ sample:
tests:
  sample.tfm.secure_partition:
    tags: tfm
  sample.tfm.secure_partition.lib:
    tags: tfm
    extra_args: "CONFIG_TFM_LIBRARY=y"