Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Summer Qin | f07cc31 | 2022-01-05 16:52:54 +0800 | [diff] [blame] | 2 | # Copyright (c) 2020-2022, Arm Limited. All rights reserved. |
Chris Brand | cae2026 | 2022-06-23 12:05:33 -0700 | [diff] [blame] | 3 | # Copyright (c) 2022 Cypress Semiconductor Corporation (an Infineon company) |
| 4 | # or an affiliate of Cypress Semiconductor Corporation. All rights reserved. |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 5 | # |
| 6 | # SPDX-License-Identifier: BSD-3-Clause |
| 7 | # |
| 8 | #------------------------------------------------------------------------------- |
| 9 | |
Raef Coles | 6981732 | 2020-10-19 14:14:14 +0100 | [diff] [blame] | 10 | set(TFM_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/toolchain_GNUARM.cmake CACHE FILEPATH "Path to TFM compiler toolchain file") |
Øyvind Rønningstad | a9d5eac | 2021-01-22 14:21:25 +0100 | [diff] [blame] | 11 | set(TFM_PLATFORM "" CACHE STRING "Platform to build TF-M for. Must be either a relative path from [TF-M]/platform/ext/target, or an absolute path.") |
Raef Coles | 6981732 | 2020-10-19 14:14:14 +0100 | [diff] [blame] | 12 | set(CROSS_COMPILE arm-none-eabi CACHE STRING "Cross-compilation triplet") |
| 13 | |
Raef Coles | 15a37f8 | 2021-12-07 15:59:14 +0000 | [diff] [blame] | 14 | set(BL1 OFF CACHE BOOL "Whether to build BL1") |
Raef Coles | f0ba05b | 2021-11-25 09:57:17 +0000 | [diff] [blame] | 15 | set(BL2 ON CACHE BOOL "Whether to build BL2") |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 16 | set(NS ON CACHE BOOL "Whether to build NS app") |
| 17 | |
| 18 | set(TEST_S OFF CACHE BOOL "Whether to build S regression tests") |
| 19 | set(TEST_NS OFF CACHE BOOL "Whether to build NS regression tests") |
| 20 | set(TEST_PSA_API "" CACHE STRING "Which (if any) of the PSA API tests should be compiled") |
Raef Coles | 15a37f8 | 2021-12-07 15:59:14 +0000 | [diff] [blame] | 21 | set(TEST_BL1_1 OFF CACHE BOOL "Whether to build BL1_1 tests") |
| 22 | set(TEST_BL1_2 OFF CACHE BOOL "Whether to build BL1_2 tests") |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 23 | |
Kevin Peng | 23a583c | 2021-09-08 22:33:33 +0800 | [diff] [blame] | 24 | # TFM_LIB_MODEL is the only user configuration for Library Model selection. |
| 25 | # TFM_PSA_API becomes an internal variable. Please do NOT use it in build command line. |
| 26 | set(TFM_LIB_MODEL OFF CACHE BOOL "Use secure library model instead of PSA API (IPC model)") |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 27 | set(TFM_ISOLATION_LEVEL 1 CACHE STRING "Isolation level") |
Kevin Peng | 386374c | 2021-11-04 14:36:17 +0800 | [diff] [blame] | 28 | set(PSA_FRAMEWORK_HAS_MM_IOVEC OFF CACHE BOOL "Enable MM-IOVEC") |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 29 | set(TFM_PROFILE "" CACHE STRING "Profile to use") |
Tamas Ban | b881bea | 2020-11-04 16:18:36 +0000 | [diff] [blame] | 30 | set(TFM_FIH_PROFILE OFF CACHE STRING "Fault injection hardening profile [OFF, LOW, MEDIUM, HIGH]") |
Sherry Zhang | 86a71c6 | 2022-01-12 18:19:02 +0800 | [diff] [blame] | 31 | set(CONFIG_TFM_CONN_HANDLE_MAX_NUM 8 CACHE STRING "The maximal number of secure services that are connected or requested at the same time") |
Kevin Peng | 76c0c16 | 2022-02-09 22:49:06 +0800 | [diff] [blame] | 32 | set(CONFIG_TFM_SPM_BACKEND "IPC" CACHE STRING "The SPM backend [IPC, SFN]") |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 33 | |
Sherry Zhnag | 482b88b | 2021-08-19 17:51:47 +0800 | [diff] [blame] | 34 | # An NSPE client_id is provided by the NSPE OS via the SPM or directly by the SPM. |
| 35 | # When `TFM_NS_MANAGE_NSID` is `ON`, TF-M supports NSPE OS providing NSPE client_id. |
| 36 | set(TFM_NS_MANAGE_NSID OFF CACHE BOOL "Support NSPE OS providing NSPE client_id") |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 37 | |
| 38 | set(TFM_EXTRA_CONFIG_PATH "" CACHE PATH "Path to extra cmake config file") |
Kevin Peng | 3880066 | 2021-07-14 10:28:23 +0800 | [diff] [blame] | 39 | |
| 40 | set(TFM_MANIFEST_LIST ${CMAKE_SOURCE_DIR}/tools/tfm_manifest_list.yaml CACHE FILEPATH "TF-M native Secure Partition manifests list file") |
David Hu | b269420 | 2021-07-15 14:58:39 +0800 | [diff] [blame] | 41 | set(TFM_EXTRA_MANIFEST_LIST_FILES "" CACHE FILEPATH "Extra manifest list file(s), used to list extra Secure Partition manifests.") |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 42 | set(TFM_EXTRA_GENERATED_FILE_LIST_PATH "" CACHE PATH "Path to extra generated file list. Appended to stardard TFM generated file list.") |
David Hu | b269420 | 2021-07-15 14:58:39 +0800 | [diff] [blame] | 43 | set(TFM_EXTRA_PARTITION_PATHS "" CACHE PATH "List of extra Secure Partitions directories. An extra Secure Parition folder contains source code, CMakeLists.txt and manifest files") |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 44 | |
Shawn Shan | fffd7ee | 2020-11-23 18:07:54 +0800 | [diff] [blame] | 45 | set(TFM_SPM_LOG_LEVEL TFM_SPM_LOG_LEVEL_INFO CACHE STRING "Set default SPM log level as INFO level") |
Shawn Shan | 9ea2f80 | 2020-11-19 11:04:39 +0800 | [diff] [blame] | 46 | set(TFM_PARTITION_LOG_LEVEL TFM_PARTITION_LOG_LEVEL_INFO CACHE STRING "Set default Secure Partition log level as INFO level") |
Shawn Shan | 6f33aad | 2020-10-16 15:30:17 +0800 | [diff] [blame] | 47 | |
Tamas Ban | f8b0b2d | 2020-10-26 13:03:13 +0000 | [diff] [blame] | 48 | set(TFM_CODE_SHARING OFF CACHE PATH "Enable code sharing between MCUboot and secure firmware") |
David Vincze | a6f501e | 2021-06-14 10:42:30 +0200 | [diff] [blame^] | 49 | set(CONFIG_TFM_BOOT_STORE_MEASUREMENTS ON CACHE BOOL "Store measurement values from all the boot stages. Used for initial attestation token.") |
Tamas Ban | f8b0b2d | 2020-10-26 13:03:13 +0000 | [diff] [blame] | 50 | |
Raef Coles | a198a44 | 2020-11-24 11:42:53 +0000 | [diff] [blame] | 51 | set(TFM_INSTALL_PATH ${CMAKE_BINARY_DIR}/install CACHE PATH "Path to which to install TF-M files") |
| 52 | |
Sebastian Bøe | b73f176 | 2021-10-28 14:23:13 +0200 | [diff] [blame] | 53 | set(TFM_DEBUG_SYMBOLS ON CACHE BOOL "Add debug symbols. Note that setting CMAKE_BUILD_TYPE to Debug or RelWithDebInfo will also add debug symbols.") |
| 54 | set(TFM_CODE_COVERAGE OFF CACHE BOOL "Whether to build the binary for lcov tools") |
Karl Zhang | f897e9e | 2021-01-08 17:52:53 +0800 | [diff] [blame] | 55 | |
Summer Qin | d839593 | 2021-02-25 14:56:49 +0800 | [diff] [blame] | 56 | set(TFM_PXN_ENABLE OFF CACHE BOOL "Use Privileged execute never (PXN)") |
| 57 | |
Øyvind Rønningstad | f2c8dad | 2021-01-15 15:33:33 +0100 | [diff] [blame] | 58 | set(TFM_EXCEPTION_INFO_DUMP OFF CACHE BOOL "On fatal errors in the secure firmware, capture info about the exception. Print the info if the SPM log level is sufficient.") |
| 59 | |
Sebastian Bøe | 055d83a | 2022-02-21 12:01:41 +0100 | [diff] [blame] | 60 | set(CONFIG_TFM_HALT_ON_CORE_PANIC OFF CACHE BOOL "On fatal errors in the secure firmware, halt instead of rebooting.") |
| 61 | |
Lingkai Dong | 181c00c | 2022-04-25 11:36:34 +0100 | [diff] [blame] | 62 | set(CONFIG_TFM_FP "soft" CACHE STRING "FP ABI type in SPE and NSPE: soft-Software ABI, hard-Hardware ABI. This configuration applies to both SPE and TF-M tests NSPE, and needs to be hard when enabling TF-M S/NS FPU tests.") |
Feder Liang | 5519438 | 2021-11-22 16:45:33 +0800 | [diff] [blame] | 63 | set(CONFIG_TFM_LAZY_STACKING OFF CACHE BOOL "Enable/disable lazy stacking") |
Feder Liang | d4dbaa9 | 2021-09-07 15:34:46 +0800 | [diff] [blame] | 64 | |
Lingkai Dong | 181c00c | 2022-04-25 11:36:34 +0100 | [diff] [blame] | 65 | set(CONFIG_TFM_ENABLE_FPU OFF CACHE BOOL "Make FPU operational when SPE and/or NSPE require FPU usage. This alone only enables the FPU coprocessors, whereas CONFIG_TFM_FP=hard compiles the code with hardware FP instructions and ABI.") |
| 66 | |
Kevin Peng | 613b417 | 2022-02-15 14:41:44 +0800 | [diff] [blame] | 67 | set(CONFIG_TFM_DOORBELL_API ON CACHE BOOL "Enable the doorbell APIs") |
| 68 | |
Chris Brand | 30106ba | 2022-01-13 13:48:50 -0800 | [diff] [blame] | 69 | set(CONFIG_TFM_STACK_WATERMARKS OFF CACHE BOOL "Whether to pre-fill partition stacks with a set value to help determine stack usage") |
| 70 | |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 71 | ############################ Platform ########################################## |
| 72 | |
David Hu | 8b526d4 | 2020-11-27 20:59:52 +0800 | [diff] [blame] | 73 | set(NUM_MAILBOX_QUEUE_SLOT 1 CACHE BOOL "Number of mailbox queue slots") |
Mark Horvath | dadc1ea | 2021-03-12 15:39:25 +0100 | [diff] [blame] | 74 | set(TFM_PLAT_SPECIFIC_MULTI_CORE_COMM OFF CACHE BOOL "Whether to use a platform specific inter-core communication instead of mailbox in dual-cpu topology") |
David Hu | 6086394 | 2020-10-14 14:49:19 +0800 | [diff] [blame] | 75 | |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 76 | set(DEBUG_AUTHENTICATION CHIP_DEFAULT CACHE STRING "Debug authentication setting. [CHIP_DEFAULT, NONE, NS_ONLY, FULL") |
| 77 | set(SECURE_UART1 OFF CACHE BOOL "Enable secure UART1") |
| 78 | |
| 79 | set(CRYPTO_HW_ACCELERATOR OFF CACHE BOOL "Whether to enable the crypto hardware accelerator on supported platforms") |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 80 | |
Raef Coles | 148b947 | 2021-06-18 08:48:17 +0100 | [diff] [blame] | 81 | set(OTP_NV_COUNTERS_RAM_EMULATION OFF CACHE BOOL "Enable OTP/NV_COUNTERS emulation in RAM. Has no effect on non-default implementations of the OTP and NV_COUNTERS") |
Raef Coles | 249aba9 | 2022-06-16 10:20:29 +0100 | [diff] [blame] | 82 | set(TFM_NS_NV_COUNTER_AMOUNT 0 CACHE STRING "How many NS NV counters are enabled") |
Raef Coles | 148b947 | 2021-06-18 08:48:17 +0100 | [diff] [blame] | 83 | |
Raef Coles | 15a37f8 | 2021-12-07 15:59:14 +0000 | [diff] [blame] | 84 | set(PLATFORM_DEFAULT_BL1 ON CACHE STRING "Whether to use default BL1 or platform-specific one") |
| 85 | |
Raef Coles | 33ff153 | 2021-06-18 09:18:08 +0100 | [diff] [blame] | 86 | set(PLATFORM_DEFAULT_ATTEST_HAL ON CACHE BOOL "Use default attest hal implementation.") |
| 87 | set(PLATFORM_DEFAULT_NV_COUNTERS ON CACHE BOOL "Use default nv counter implementation.") |
| 88 | set(PLATFORM_DEFAULT_CRYPTO_KEYS ON CACHE BOOL "Use default crypto keys implementation.") |
| 89 | set(PLATFORM_DEFAULT_ROTPK ON CACHE BOOL "Use default root of trust public key.") |
| 90 | set(PLATFORM_DEFAULT_IAK ON CACHE BOOL "Use default initial attestation_key.") |
| 91 | set(PLATFORM_DEFAULT_UART_STDOUT ON CACHE BOOL "Use default uart stdout implementation.") |
| 92 | set(PLATFORM_DEFAULT_NV_SEED ON CACHE BOOL "Use default NV seed implementation.") |
Raef Coles | 148b947 | 2021-06-18 08:48:17 +0100 | [diff] [blame] | 93 | set(PLATFORM_DEFAULT_OTP ON CACHE BOOL "Use trusted on-chip flash to implement OTP memory") |
Michel Jaouen | d0fd8d9 | 2021-10-14 09:22:41 +0200 | [diff] [blame] | 94 | set(PLATFORM_DEFAULT_OTP_WRITEABLE ON CACHE BOOL "Use OTP memory with write support") |
Raef Coles | aefbe08 | 2021-06-18 08:53:43 +0100 | [diff] [blame] | 95 | set(PLATFORM_DEFAULT_PROVISIONING ON CACHE BOOL "Use default provisioning implementation") |
| 96 | |
| 97 | set(TFM_DUMMY_PROVISIONING ON CACHE BOOL "Provision with dummy values. NOT to be used in production") |
Satish Kumar | fab9922 | 2021-07-22 16:32:15 +0100 | [diff] [blame] | 98 | set(PLATFORM_IS_FVP FALSE CACHE BOOL "Whether to enable FVP or FPGA build of the platform.") |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 99 | |
Satish Kumar | e945bc2 | 2021-07-31 08:26:27 +0100 | [diff] [blame] | 100 | set(PLATFORM_PSA_ADAC_SECURE_DEBUG FALSE CACHE BOOL "Whether to use psa-adac secure debug.") |
| 101 | set(PLATFORM_PSA_ADAC_SOURCE_PATH "DOWNLOAD" CACHE PATH "Path to source dir of psa-adac.") |
| 102 | set(PLATFORM_PSA_ADAC_VERSION "427923cc0152578d536fb2065154d5d0dd874910" CACHE STRING "The version of psa-adac to use.") |
| 103 | |
Raef Coles | 15a37f8 | 2021-12-07 15:59:14 +0000 | [diff] [blame] | 104 | set(BL1_HEADER_SIZE 0x000 CACHE STRING "BL1 Header size") |
| 105 | set(BL1_TRAILER_SIZE 0x000 CACHE STRING "BL1 Trailer size") |
| 106 | |
Raef Coles | f0ba05b | 2021-11-25 09:57:17 +0000 | [diff] [blame] | 107 | set(BL2_HEADER_SIZE 0x000 CACHE STRING "BL2 Header size") |
| 108 | set(BL2_TRAILER_SIZE 0x000 CACHE STRING "BL2 Trailer size") |
| 109 | |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 110 | ############################ Partitions ######################################## |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 111 | set(TFM_PARTITION_PROTECTED_STORAGE ON CACHE BOOL "Enable Protected Storage partition") |
Jamie Fox | 865778b | 2020-10-23 19:52:51 +0100 | [diff] [blame] | 112 | set(PS_CREATE_FLASH_LAYOUT ON CACHE BOOL "Create flash FS if it doesn't exist for Protected Storage partition") |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 113 | set(PS_ENCRYPTION ON CACHE BOOL "Enable encryption for Protected Storage partition") |
| 114 | set(PS_RAM_FS OFF CACHE BOOL "Enable emulated RAM FS for platforms that don't have flash for Protected Storage partition") |
| 115 | set(PS_ROLLBACK_PROTECTION ON CACHE BOOL "Enable rollback protection for Protected Storage partition") |
Jamie Fox | 34a7a23 | 2020-10-20 16:19:09 +0100 | [diff] [blame] | 116 | set(PS_VALIDATE_METADATA_FROM_FLASH ON CACHE BOOL "Validate filesystem metadata every time it is read from flash") |
Jamie Fox | 865778b | 2020-10-23 19:52:51 +0100 | [diff] [blame] | 117 | set(PS_MAX_ASSET_SIZE "2048" CACHE STRING "The maximum asset size to be stored in the Protected Storage area") |
| 118 | set(PS_NUM_ASSETS "10" CACHE STRING "The maximum number of assets to be stored in the Protected Storage area") |
| 119 | set(PS_CRYPTO_AEAD_ALG PSA_ALG_GCM CACHE STRING "The AEAD algorithm to use for authenticated encryption in Protected Storage") |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 120 | |
| 121 | set(TFM_PARTITION_INTERNAL_TRUSTED_STORAGE ON CACHE BOOL "Enable Internal Trusted Storage partition") |
Jamie Fox | 865778b | 2020-10-23 19:52:51 +0100 | [diff] [blame] | 122 | set(ITS_CREATE_FLASH_LAYOUT ON CACHE BOOL "Create flash FS if it doesn't exist for Internal Trusted Storage partition") |
| 123 | set(ITS_RAM_FS OFF CACHE BOOL "Enable emulated RAM FS for platforms that don't have flash for Internal Trusted Storage partition") |
Jamie Fox | 34a7a23 | 2020-10-20 16:19:09 +0100 | [diff] [blame] | 124 | set(ITS_VALIDATE_METADATA_FROM_FLASH ON CACHE BOOL "Validate filesystem metadata every time it is read from flash") |
Jamie Fox | 865778b | 2020-10-23 19:52:51 +0100 | [diff] [blame] | 125 | set(ITS_MAX_ASSET_SIZE "512" CACHE STRING "The maximum asset size to be stored in the Internal Trusted Storage area") |
| 126 | set(ITS_NUM_ASSETS "10" CACHE STRING "The maximum number of assets to be stored in the Internal Trusted Storage area") |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 127 | set(ITS_BUF_SIZE "" CACHE STRING "Size of the ITS internal data transfer buffer (defaults to ITS_MAX_ASSET_SIZE if not set)") |
| 128 | |
| 129 | set(TFM_PARTITION_CRYPTO ON CACHE BOOL "Enable Crypto partition") |
Soby Mathew | 4739c73 | 2020-10-07 12:11:05 +0100 | [diff] [blame] | 130 | # CRYPTO_ENGINE_BUF_SIZE needs to be >8KB for EC signing by attest module. |
Summer Qin | e8412b4 | 2020-10-15 14:20:21 +0800 | [diff] [blame] | 131 | set(CRYPTO_ENGINE_BUF_SIZE 0x2080 CACHE STRING "Heap size for the crypto backend") |
Soby Mathew | 4739c73 | 2020-10-07 12:11:05 +0100 | [diff] [blame] | 132 | set(CRYPTO_CONC_OPER_NUM 8 CACHE STRING "The max number of concurrent operations that can be active (allocated) at any time in Crypto") |
Ioannis Glaropoulos | 829aa75 | 2021-06-15 12:37:02 +0200 | [diff] [blame] | 133 | set(CRYPTO_RNG_MODULE_DISABLED FALSE CACHE BOOL "Disable PSA Crypto random number generator module") |
Soby Mathew | 4739c73 | 2020-10-07 12:11:05 +0100 | [diff] [blame] | 134 | set(CRYPTO_KEY_MODULE_DISABLED FALSE CACHE BOOL "Disable PSA Crypto Key module") |
| 135 | set(CRYPTO_AEAD_MODULE_DISABLED FALSE CACHE BOOL "Disable PSA Crypto AEAD module") |
| 136 | set(CRYPTO_MAC_MODULE_DISABLED FALSE CACHE BOOL "Disable PSA Crypto MAC module") |
| 137 | set(CRYPTO_HASH_MODULE_DISABLED FALSE CACHE BOOL "Disable PSA Crypto Hash module") |
| 138 | set(CRYPTO_CIPHER_MODULE_DISABLED FALSE CACHE BOOL "Disable PSA Crypto Cipher module") |
David Hu | 0c250bc | 2021-05-12 10:55:53 +0800 | [diff] [blame] | 139 | set(CRYPTO_ASYM_SIGN_MODULE_DISABLED FALSE CACHE BOOL "Disable PSA Crypto asymmetric key signature module") |
| 140 | set(CRYPTO_ASYM_ENCRYPT_MODULE_DISABLED FALSE CACHE BOOL "Disable PSA Crypto asymmetric key encryption module") |
Håkon Øye Amundsen | 112e48d | 2021-01-19 15:41:10 +0100 | [diff] [blame] | 141 | set(CRYPTO_KEY_DERIVATION_MODULE_DISABLED FALSE CACHE BOOL "Disable PSA Crypto key derivation module") |
Soby Mathew | 4739c73 | 2020-10-07 12:11:05 +0100 | [diff] [blame] | 142 | set(CRYPTO_IOVEC_BUFFER_SIZE 5120 CACHE STRING "Default size of the internal scratch buffer used for PSA FF IOVec allocations") |
Raef Coles | 618fc15 | 2021-06-18 09:26:46 +0100 | [diff] [blame] | 143 | set(CRYPTO_NV_SEED ON CACHE BOOL "Use stored NV seed to provide entropy") |
David Hu | e69294d | 2022-06-21 22:21:37 +0800 | [diff] [blame] | 144 | set(CRYPTO_SINGLE_PART_FUNCS_DISABLED OFF CACHE BOOL "Only enable multi-part operations in Hash, MAC, AEAD and symmetric ciphers, to optimize memory footprint in resource-constrained devices") |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 145 | |
| 146 | set(TFM_PARTITION_INITIAL_ATTESTATION ON CACHE BOOL "Enable Initial Attestation partition") |
| 147 | set(SYMMETRIC_INITIAL_ATTESTATION OFF CACHE BOOL "Use symmetric crypto for inital attestation") |
| 148 | set(ATTEST_INCLUDE_OPTIONAL_CLAIMS ON CACHE BOOL "Include optional claims in initial attestation token") |
| 149 | set(ATTEST_INCLUDE_COSE_KEY_ID OFF CACHE BOOL "Include COSE key-id in initial attestation token") |
| 150 | |
| 151 | set(TFM_PARTITION_PLATFORM ON CACHE BOOL "Enable Platform partition") |
| 152 | |
Kevin Peng | 23a583c | 2021-09-08 22:33:33 +0800 | [diff] [blame] | 153 | set(TFM_PARTITION_AUDIT_LOG OFF CACHE BOOL "Enable Audit Log partition") |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 154 | |
Kevin Peng | 9144943 | 2021-10-18 15:08:05 +0800 | [diff] [blame] | 155 | set(TFM_PARTITION_PSA_PROXY OFF CACHE BOOL "Enable PSA Proxy partition") |
| 156 | |
Mark Horvath | b9ac0d5 | 2020-09-09 10:48:22 +0200 | [diff] [blame] | 157 | set(FORWARD_PROT_MSG OFF CACHE BOOL "Whether to forward all PSA RoT messages to a Secure Enclave") |
Sherry Zhang | 07b4241 | 2021-01-07 14:19:41 +0800 | [diff] [blame] | 158 | set(TFM_PARTITION_FIRMWARE_UPDATE OFF CACHE BOOL "Enable firmware update partition") |
Sherry Zhang | 539ade4 | 2021-05-19 15:14:27 +0800 | [diff] [blame] | 159 | set(TFM_FWU_BOOTLOADER_LIB "mcuboot" CACHE STRING "Bootloader configure file for Firmware Update partition") |
Sherry Zhang | 73126e5 | 2022-02-15 14:27:49 +0800 | [diff] [blame] | 160 | set(PSA_FWU_MAX_BLOCK_SIZE 1024 CACHE STRING "The maximum permitted size for block in psa_fwu_write, in bytes.") |
| 161 | set(TFM_FWU_BUF_SIZE "" CACHE STRING "Size of the FWU internal data transfer buffer (defaults to PSA_FWU_MAX_BLOCK_SIZE if not set)") |
Mark Horvath | b9ac0d5 | 2020-09-09 10:48:22 +0200 | [diff] [blame] | 162 | |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 163 | ################################## Dependencies ################################ |
| 164 | |
| 165 | set(MBEDCRYPTO_PATH "DOWNLOAD" CACHE PATH "Path to Mbed Crypto (or DOWNLOAD to fetch automatically") |
Antonio de Angelis | 90bee0f | 2022-07-13 11:22:41 +0100 | [diff] [blame] | 166 | set(MBEDCRYPTO_VERSION "mbedtls-3.2.1" CACHE STRING "The version of Mbed Crypto to use") |
Summer Qin | 853a547 | 2022-04-01 16:53:45 +0800 | [diff] [blame] | 167 | set(MBEDCRYPTO_GIT_REMOTE "https://github.com/Mbed-TLS/mbedtls.git" CACHE STRING "The URL (or path) to retrieve MbedTLS from.") |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 168 | set(MBEDCRYPTO_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "Build type of Mbed Crypto library") |
Håkon Øye Amundsen | 8ab569b | 2021-11-04 13:59:04 +0000 | [diff] [blame] | 169 | set(TFM_MBEDCRYPTO_CONFIG_PATH |
| 170 | "${CMAKE_SOURCE_DIR}/lib/ext/mbedcrypto/mbedcrypto_config/tfm_mbedcrypto_config_default.h" CACHE PATH |
| 171 | "Config to use for Mbed Crypto. For increased flexibility when pointing to a file, set the type \ |
| 172 | of this setting to 'STRING' by passing the :<type> portion when specifying the setting value in \ |
| 173 | the command line. E.g. '-DTFM_MBEDCRYPTO_CONFIG_PATH:STRING=some_file_which_is_generated.h' \ |
| 174 | This can be useful if the config file is generated and placed inside a directory already added \ |
| 175 | to the include path of mbedtls.") |
Summer Qin | 7c0d8d3 | 2021-12-17 15:43:08 +0800 | [diff] [blame] | 176 | set(TFM_MBEDCRYPTO_PSA_CRYPTO_CONFIG_PATH "${CMAKE_SOURCE_DIR}/lib/ext/mbedcrypto/mbedcrypto_config/crypto_config_default.h" CACHE PATH "Config to use psa crypto setting for Mbed Crypto.") |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 177 | set(TFM_MBEDCRYPTO_PLATFORM_EXTRA_CONFIG_PATH "" CACHE PATH "Config to append to standard Mbed Crypto config, used by platforms to cnfigure feature support") |
| 178 | |
David Vincze | 7e1c5a4 | 2021-07-28 23:41:35 +0200 | [diff] [blame] | 179 | set(MCUBOOT_PATH "DOWNLOAD" CACHE PATH "Path to MCUboot (or DOWNLOAD to fetch automatically") |
Michel Jaouen | 24c3dd0 | 2021-08-12 15:32:13 +0200 | [diff] [blame] | 180 | set(MCUBOOT_VERSION "v1.9.0" CACHE STRING "The version of MCUboot to use") |
Raef Coles | 9ec67e6 | 2020-07-10 09:40:35 +0100 | [diff] [blame] | 181 | |
| 182 | set(PSA_ARCH_TESTS_PATH "DOWNLOAD" CACHE PATH "Path to PSA arch tests (or DOWNLOAD to fetch automatically") |
Summer Qin | 4435f25 | 2022-04-06 10:33:12 +0800 | [diff] [blame] | 183 | set(PSA_ARCH_TESTS_VERSION "f7e8495" CACHE STRING "The version of PSA arch tests to use") |
David Vincze | 0c515de | 2020-11-25 19:02:57 +0100 | [diff] [blame] | 184 | |
Gabor Abonyi | e3222f9 | 2022-04-07 13:53:03 +0200 | [diff] [blame] | 185 | set(NS_EVALUATION_APP_PATH "" CACHE PATH "Path to TFM NS Evaluation Application") |
| 186 | |
David Vincze | 0c515de | 2020-11-25 19:02:57 +0100 | [diff] [blame] | 187 | ################################################################################ |
| 188 | ################################################################################ |
| 189 | |
| 190 | # Specifying the accepted values for certain configuration options to facilitate |
| 191 | # their later validation. |
| 192 | |
Tamas Ban | b881bea | 2020-11-04 16:18:36 +0000 | [diff] [blame] | 193 | ########################## FIH ################################################# |
| 194 | |
| 195 | set_property(CACHE TFM_FIH_PROFILE PROPERTY STRINGS "OFF;LOW;MEDIUM;HIGH") |
Feder Liang | d4dbaa9 | 2021-09-07 15:34:46 +0800 | [diff] [blame] | 196 | |
| 197 | ########################## FP ################################################# |
| 198 | |
Feder Liang | 5519438 | 2021-11-22 16:45:33 +0800 | [diff] [blame] | 199 | set_property(CACHE CONFIG_TFM_FP PROPERTY STRINGS "soft;hard") |