Soby Mathew | 3b9e184 | 2020-10-07 12:04:56 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------ |
| 2 | # Copyright (c) 2020, Arm Limited. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------ |
| 7 | |
| 8 | ############ Override defaults for PSA API tests ############################## |
| 9 | |
| 10 | # CRYPTO_ENGINE_BUF_SIZE needs to be much larger for PSA API tests. |
Tamas Ban | 6921920 | 2020-10-27 08:13:18 +0000 | [diff] [blame] | 11 | if(NOT (CRYPTO_ENGINE_BUF_SIZE GREATER 0x5000)) |
| 12 | set(CRYPTO_ENGINE_BUF_SIZE 0x5000 CACHE STRING "Heap size for the crypto backend") |
Soby Mathew | 3b9e184 | 2020-10-07 12:04:56 +0100 | [diff] [blame] | 13 | endif() |
Jamie Fox | 865778b | 2020-10-23 19:52:51 +0100 | [diff] [blame] | 14 | |
| 15 | # When building for the PSA Crypto API tests, ensure the ITS max asset size is |
| 16 | # set to at least the size of the largest asset created by the tests |
Tamas Ban | 6921920 | 2020-10-27 08:13:18 +0000 | [diff] [blame] | 17 | if (("${TEST_PSA_API}" STREQUAL "CRYPTO") AND NOT (ITS_MAX_ASSET_SIZE GREATER 1229)) |
| 18 | set(ITS_MAX_ASSET_SIZE "1229" CACHE STRING "The maximum asset size to be stored in the Internal Trusted Storage area") |
Jamie Fox | 865778b | 2020-10-23 19:52:51 +0100 | [diff] [blame] | 19 | endif() |
Kevin Peng | 80f5f43 | 2021-11-03 15:45:13 +0800 | [diff] [blame] | 20 | |
| 21 | if ("${TEST_PSA_API}" STREQUAL "IPC") |
David Hu | 020f1f3 | 2022-11-16 15:02:23 +0800 | [diff] [blame] | 22 | # PSA Arch test partitions only support IPC model so far |
| 23 | set(CONFIG_TFM_SPM_BACKEND "IPC" CACHE STRING "The SPM backend [IPC, SFN]") |
Kevin Peng | 80f5f43 | 2021-11-03 15:45:13 +0800 | [diff] [blame] | 24 | set(TFM_PARTITION_FF_TEST ON) |
| 25 | else() |
| 26 | set(TFM_PARTITION_FF_TEST OFF) |
| 27 | endif() |
David Hu | 020f1f3 | 2022-11-16 15:02:23 +0800 | [diff] [blame] | 28 | |
| 29 | if ("${TEST_PSA_API}" STREQUAL "INITIAL_ATTESTATION") |
| 30 | set(TFM_PARTITION_INITIAL_ATTESTATION ON CACHE BOOL "Enable Initial Attestation partition") |
| 31 | set(TFM_PARTITION_CRYPTO ON CACHE BOOL "Enable Crypto partition") |
| 32 | set(TFM_PARTITION_INTERNAL_TRUSTED_STORAGE ON CACHE BOOL "Enable Internal Trusted Storage partition") |
| 33 | set(TFM_PARTITION_PLATFORM ON CACHE BOOL "Enable Platform partition") |
| 34 | endif() |
| 35 | |
| 36 | if ("${TEST_PSA_API}" STREQUAL "CRYPTO") |
| 37 | set(TFM_PARTITION_CRYPTO ON CACHE BOOL "Enable Crypto partition") |
| 38 | set(TFM_PARTITION_INTERNAL_TRUSTED_STORAGE ON CACHE BOOL "Enable Internal Trusted Storage partition") |
| 39 | set(TFM_PARTITION_PLATFORM ON CACHE BOOL "Enable Platform partition") |
| 40 | endif() |
| 41 | |
| 42 | if ("${TEST_PSA_API}" STREQUAL "STORAGE") |
| 43 | set(TFM_PARTITION_INTERNAL_TRUSTED_STORAGE ON CACHE BOOL "Enable Internal Trusted Storage partition") |
| 44 | set(TFM_PARTITION_PROTECTED_STORAGE ON CACHE BOOL "Enable Protected Storage partition") |
| 45 | set(TFM_PARTITION_CRYPTO ON CACHE BOOL "Enable Crypto partition") |
| 46 | set(TFM_PARTITION_PLATFORM ON CACHE BOOL "Enable Platform partition") |
| 47 | endif() |