1#------------------------------------------------------------------------------ 2# Copyright (c) 2020-2023, Arm Limited. All rights reserved. 3# 4# SPDX-License-Identifier: BSD-3-Clause 5# 6#------------------------------------------------------------------------------ 7 8############ Override defaults for PSA API tests ############################## 9if ("${TEST_PSA_API}" STREQUAL "IPC") 10 # PSA Arch test partitions only support IPC model so far 11 set(CONFIG_TFM_SPM_BACKEND "IPC" CACHE STRING "The SPM backend [IPC, SFN]") 12 set(TFM_PARTITION_FF_TEST ON) 13else() 14 set(TFM_PARTITION_FF_TEST OFF) 15endif() 16 17if ("${TEST_PSA_API}" STREQUAL "INITIAL_ATTESTATION") 18 set(TFM_PARTITION_INITIAL_ATTESTATION ON CACHE BOOL "Enable Initial Attestation partition") 19 set(TFM_PARTITION_CRYPTO ON CACHE BOOL "Enable Crypto partition") 20 set(TFM_PARTITION_INTERNAL_TRUSTED_STORAGE ON CACHE BOOL "Enable Internal Trusted Storage partition") 21 set(TFM_PARTITION_PLATFORM ON CACHE BOOL "Enable Platform partition") 22endif() 23 24if ("${TEST_PSA_API}" STREQUAL "CRYPTO") 25 set(TFM_PARTITION_CRYPTO ON CACHE BOOL "Enable Crypto partition") 26 set(TFM_PARTITION_INTERNAL_TRUSTED_STORAGE ON CACHE BOOL "Enable Internal Trusted Storage partition") 27 set(TFM_PARTITION_PLATFORM ON CACHE BOOL "Enable Platform partition") 28endif() 29 30if ("${TEST_PSA_API}" STREQUAL "STORAGE") 31 set(TFM_PARTITION_INTERNAL_TRUSTED_STORAGE ON CACHE BOOL "Enable Internal Trusted Storage partition") 32 set(TFM_PARTITION_PROTECTED_STORAGE ON CACHE BOOL "Enable Protected Storage partition") 33 set(TFM_PARTITION_CRYPTO ON CACHE BOOL "Enable Crypto partition") 34 set(TFM_PARTITION_PLATFORM ON CACHE BOOL "Enable Platform partition") 35endif() 36 37set(PROJECT_CONFIG_HEADER_FILE "${CMAKE_SOURCE_DIR}/config/tests/config_test_psa_api.h" CACHE FILEPATH "User defined header file for TF-M config") 38