blob: 1e209c66a9d3bcbe7a5cfdc1268cce824064cc3f [file] [log] [blame]
Raef Coles9ec67e62020-07-10 09:40:35 +01001#-------------------------------------------------------------------------------
Raef Coles09dcd162024-12-09 15:40:53 +00002# SPDX-FileCopyrightText: Copyright The TrustedFirmware-M Contributors
Chris Brand934761b2024-07-19 12:03:44 -07003# Copyright (c) 2022-2024 Cypress Semiconductor Corporation (an Infineon company)
Chris Brandcae20262022-06-23 12:05:33 -07004# or an affiliate of Cypress Semiconductor Corporation. All rights reserved.
Raef Coles9ec67e62020-07-10 09:40:35 +01005#
6# SPDX-License-Identifier: BSD-3-Clause
7#
8#-------------------------------------------------------------------------------
9
Jianliang Shen212027d2023-02-21 10:56:50 +080010####################################################################################################
11# These configurations below are not included in Kconfig configuration system.
12
Raef Coles69817322020-10-19 14:14:14 +010013set(TFM_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/toolchain_GNUARM.cmake CACHE FILEPATH "Path to TFM compiler toolchain file")
Øyvind Rønningstada9d5eac2021-01-22 14:21:25 +010014set(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 Coles69817322020-10-19 14:14:14 +010015set(CROSS_COMPILE arm-none-eabi CACHE STRING "Cross-compilation triplet")
16
Anton Komlev3dd98632023-09-20 16:26:30 +010017set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/api_ns CACHE PATH "Install prefix")
18
19set(INTERFACE_INC_DIR ${CMAKE_SOURCE_DIR}/interface/include)
20set(INTERFACE_SRC_DIR ${CMAKE_SOURCE_DIR}/interface/src)
21
22set(INSTALL_INTERFACE_INC_DIR ${CMAKE_INSTALL_PREFIX}/interface/include)
23set(INSTALL_INTERFACE_SRC_DIR ${CMAKE_INSTALL_PREFIX}/interface/src)
24set(INSTALL_INTERFACE_LIB_DIR ${CMAKE_INSTALL_PREFIX}/interface/lib)
25set(INSTALL_IMAGE_SIGNING_DIR ${CMAKE_INSTALL_PREFIX}/image_signing)
26set(INSTALL_CMAKE_DIR ${CMAKE_INSTALL_PREFIX}/cmake)
Jianliang Shenbd624ed2023-10-24 15:42:59 +080027set(INSTALL_CONFIG_DIR ${CMAKE_INSTALL_PREFIX}/config)
Anton Komlev3dd98632023-09-20 16:26:30 +010028set(INSTALL_PLATFORM_NS_DIR ${CMAKE_INSTALL_PREFIX}/platform)
Jianliang Shen212027d2023-02-21 10:56:50 +080029
30set(TFM_DEBUG_SYMBOLS ON CACHE BOOL "Add debug symbols. Note that setting CMAKE_BUILD_TYPE to Debug or RelWithDebInfo will also add debug symbols.")
Jackson Cooper-Driverdf542cf2025-04-01 14:34:11 +010031set(TFM_DEBUG_OPTIMISATION OFF CACHE BOOL "Add basic -Og optimisation when CMAKE_BUILD_TYPE is Debug. Note that non Debug builds specify their own optimisation")
Jianliang Shen212027d2023-02-21 10:56:50 +080032set(TFM_CODE_COVERAGE OFF CACHE BOOL "Whether to build the binary for lcov tools")
33
Tomi Fontanilles17e9e9c2024-05-15 12:44:46 +030034set(TFM_TESTS_REVISION_CHECKS ON CACHE BOOL "Whether to perform checks on the tf-m-tests repository revision.")
35
Jianliang Shen212027d2023-02-21 10:56:50 +080036set(PROJECT_CONFIG_HEADER_FILE "" CACHE FILEPATH "User defined header file for TF-M config")
37
38# External libraries source and version
39set(MBEDCRYPTO_PATH "DOWNLOAD" CACHE PATH "Path to Mbed Crypto (or DOWNLOAD to fetch automatically")
40set(MBEDCRYPTO_FORCE_PATCH OFF CACHE BOOL "Always apply MBed Crypto patches")
David Vincze485c5ac2025-03-21 11:14:56 +000041set(MBEDCRYPTO_VERSION "mbedtls-3.6.3" CACHE STRING "The version of Mbed Crypto to use")
Jianliang Shen212027d2023-02-21 10:56:50 +080042set(MBEDCRYPTO_GIT_REMOTE "https://github.com/Mbed-TLS/mbedtls.git" CACHE STRING "The URL (or path) to retrieve MbedTLS from.")
43
44set(MCUBOOT_PATH "DOWNLOAD" CACHE PATH "Path to MCUboot (or DOWNLOAD to fetch automatically")
Maulik Patel7474c752025-05-14 13:40:10 +010045set(MCUBOOT_FORCE_PATCH OFF CACHE BOOL "Always apply MCUboot patches")
Antonio de Angelisef7e8f32025-06-11 09:39:26 +010046set(MCUBOOT_VERSION "v2.2.0" CACHE STRING "The version of MCUboot to use")
Jianliang Shen212027d2023-02-21 10:56:50 +080047
Jackson Cooper-Driver9a421d12025-03-28 09:03:51 +000048set(TFM_EXTRAS_REPO_PATH "DOWNLOAD" CACHE PATH "Path to tf-m-extras repo (or DOWNLOAD to fetch automatically")
Mudit Sharmaabfe6e82025-06-20 13:43:27 +010049set(TFM_EXTRAS_REPO_VERSION "363bf42" CACHE STRING "The version of tf-m-extras to use")
Jackson Cooper-Driver9a421d12025-03-28 09:03:51 +000050
Jianliang Shen212027d2023-02-21 10:56:50 +080051set(PLATFORM_PSA_ADAC_SECURE_DEBUG FALSE CACHE BOOL "Whether to use psa-adac secure debug.")
52set(PLATFORM_PSA_ADAC_SOURCE_PATH "DOWNLOAD" CACHE PATH "Path to source dir of psa-adac.")
Antonio de Angelis8bbd6152024-09-27 14:07:04 +010053set(PLATFORM_PSA_ADAC_VERSION "819a254" CACHE STRING "The version of psa-adac to use.")
Gabor Tothdeda2ed2024-09-17 17:23:24 +020054set(PLATFORM_RAM_FS OFF CACHE BOOL "Enables the use of RAM instead of the persistent storage device to store the FS in Secure Storage services")
Jianliang Shen212027d2023-02-21 10:56:50 +080055
56set(PLATFORM_IS_FVP FALSE CACHE BOOL "Whether to enable FVP or FPGA build of the platform.")
57
Raef Coles88ff7992024-01-11 10:27:05 +000058set(CODE_SHARING_OUTPUT_FILE_SUFFIX "_shared_symbols.axf" CACHE STRING "Suffix to use for code-sharing output files")
59set(CODE_SHARING_INPUT_FILE_SUFFIX "_shared_symbols.axf" CACHE STRING "Suffix to use for code-sharing input files")
60
Bohdan Hunkoc7d222b2024-11-05 16:37:21 +020061set(CONFIG_TFM_WARNINGS_ARE_ERRORS OFF CACHE BOOL "Whether to treat warnings as errors")
62
Jianliang Shen212027d2023-02-21 10:56:50 +080063####################################################################################################
64# These configurations below are also referred by Kconfig configuration system,
65# together with TF-M Header File Config System options.
66
Raef Coles15a37f82021-12-07 15:59:14 +000067set(BL1 OFF CACHE BOOL "Whether to build BL1")
Raef Colesf0ba05b2021-11-25 09:57:17 +000068set(BL2 ON CACHE BOOL "Whether to build BL2")
Jianliang Shen212027d2023-02-21 10:56:50 +080069set(NS_EVALUATION_APP_PATH "" CACHE PATH "Path to TFM NS Evaluation Application")
Raef Coles9ec67e62020-07-10 09:40:35 +010070
Raef Coles9ec67e62020-07-10 09:40:35 +010071set(TFM_ISOLATION_LEVEL 1 CACHE STRING "Isolation level")
Kevin Peng386374c2021-11-04 14:36:17 +080072set(PSA_FRAMEWORK_HAS_MM_IOVEC OFF CACHE BOOL "Enable MM-IOVEC")
Raef Coles9ec67e62020-07-10 09:40:35 +010073set(TFM_PROFILE "" CACHE STRING "Profile to use")
Tamas Banb881bea2020-11-04 16:18:36 +000074set(TFM_FIH_PROFILE OFF CACHE STRING "Fault injection hardening profile [OFF, LOW, MEDIUM, HIGH]")
Anton Komleva07180c2022-10-24 23:53:47 +010075set(CONFIG_TFM_SPM_BACKEND "SFN" CACHE STRING "The SPM backend [IPC, SFN]")
Raef Coles9ec67e62020-07-10 09:40:35 +010076
Sherry Zhnag482b88b2021-08-19 17:51:47 +080077# An NSPE client_id is provided by the NSPE OS via the SPM or directly by the SPM.
78# When `TFM_NS_MANAGE_NSID` is `ON`, TF-M supports NSPE OS providing NSPE client_id.
79set(TFM_NS_MANAGE_NSID OFF CACHE BOOL "Support NSPE OS providing NSPE client_id")
Raef Coles9ec67e62020-07-10 09:40:35 +010080
81set(TFM_EXTRA_CONFIG_PATH "" CACHE PATH "Path to extra cmake config file")
Kevin Peng38800662021-07-14 10:28:23 +080082
83set(TFM_MANIFEST_LIST ${CMAKE_SOURCE_DIR}/tools/tfm_manifest_list.yaml CACHE FILEPATH "TF-M native Secure Partition manifests list file")
Raef Coles9ec67e62020-07-10 09:40:35 +010084
Tamas Banf8b0b2d2020-10-26 13:03:13 +000085set(TFM_CODE_SHARING OFF CACHE PATH "Enable code sharing between MCUboot and secure firmware")
David Vinczea6f501e2021-06-14 10:42:30 +020086set(CONFIG_TFM_BOOT_STORE_MEASUREMENTS ON CACHE BOOL "Store measurement values from all the boot stages. Used for initial attestation token.")
David Vincze8c95d2a2022-01-19 10:11:58 +010087set(CONFIG_TFM_BOOT_STORE_ENCODED_MEASUREMENTS ON CACHE BOOL "Enable storing of encoded measurements in boot.")
Tamas Banf8b0b2d2020-10-26 13:03:13 +000088
Summer Qind8395932021-02-25 14:56:49 +080089set(TFM_PXN_ENABLE OFF CACHE BOOL "Use Privileged execute never (PXN)")
90
Øyvind Rønningstadf2c8dad2021-01-15 15:33:33 +010091set(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.")
Raef Coles78cba2a2024-03-04 10:09:20 +000092set(TFM_LOG_FATAL_ERRORS OFF CACHE BOOL "Log fatal errors when they occur to aid debugging")
93set(TFM_LOG_NONFATAL_ERRORS OFF CACHE BOOL "Log non-fatal errors when they occur to aid debugging")
94set(TFM_HALT_ON_FATAL_ERRORS OFF CACHE BOOL "On fatal errors in the secure firmware, halt immediately to allow debugging")
95set(TFM_LOG_ERR_FILE_AND_LINE OFF CACHE BOOL "Log file name and line numbers of fatal and non-fatal errors")
Øyvind Rønningstadf2c8dad2021-01-15 15:33:33 +010096
Sebastian Bøe055d83a2022-02-21 12:01:41 +010097set(CONFIG_TFM_HALT_ON_CORE_PANIC OFF CACHE BOOL "On fatal errors in the secure firmware, halt instead of rebooting.")
Jackson Cooper-Driverc0249482024-07-09 10:34:36 +010098set(CONFIG_TFM_BACKTRACE_ON_CORE_PANIC OFF CACHE BOOL "On fatal errors in secure firmware, log backtrace and then halt")
Sebastian Bøe055d83a2022-02-21 12:01:41 +010099
Chris Brand30106ba2022-01-13 13:48:50 -0800100set(CONFIG_TFM_STACK_WATERMARKS OFF CACHE BOOL "Whether to pre-fill partition stacks with a set value to help determine stack usage")
101
Nicola Mazzucatofc1bf772024-05-07 16:21:33 +0100102set(CONFIG_TFM_BRANCH_PROTECTION_FEAT BRANCH_PROTECTION_DISABLED CACHE STRING "Set default branch protection usage to disabled")
103
Raef Coles9ec67e62020-07-10 09:40:35 +0100104############################ Platform ##########################################
105
David Hu8b526d42020-11-27 20:59:52 +0800106set(NUM_MAILBOX_QUEUE_SLOT 1 CACHE BOOL "Number of mailbox queue slots")
Mark Horvathdadc1ea2021-03-12 15:39:25 +0100107set(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 Hu60863942020-10-14 14:49:19 +0800108
Raef Coles9ec67e62020-07-10 09:40:35 +0100109set(DEBUG_AUTHENTICATION CHIP_DEFAULT CACHE STRING "Debug authentication setting. [CHIP_DEFAULT, NONE, NS_ONLY, FULL")
110set(SECURE_UART1 OFF CACHE BOOL "Enable secure UART1")
111
112set(CRYPTO_HW_ACCELERATOR OFF CACHE BOOL "Whether to enable the crypto hardware accelerator on supported platforms")
Raef Coles9ec67e62020-07-10 09:40:35 +0100113
Raef Coles148b9472021-06-18 08:48:17 +0100114set(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 Coles249aba92022-06-16 10:20:29 +0100115set(TFM_NS_NV_COUNTER_AMOUNT 0 CACHE STRING "How many NS NV counters are enabled")
Raef Coles148b9472021-06-18 08:48:17 +0100116
Aziz IDOMAR83d3de52024-04-12 20:14:53 +0100117set(PLATFORM_ERROR_CODES OFF CACHE BOOL "Whether to use platform-specific error codes.")
Raef Coles15a37f82021-12-07 15:59:14 +0000118
Aziz IDOMAR83d3de52024-04-12 20:14:53 +0100119set(PLATFORM_DEFAULT_BL1 ON CACHE STRING "Whether to use default BL1 or platform-specific one")
Raef Coles33ff1532021-06-18 09:18:08 +0100120set(PLATFORM_DEFAULT_ATTEST_HAL ON CACHE BOOL "Use default attest hal implementation.")
Roman Mazurak1e5fbbd2024-05-20 21:17:26 +0300121set(PLATFORM_DEFAULT_ITS_HAL ON CACHE BOOL "Use default ITS HAL implementation.")
122set(PLATFORM_DEFAULT_PS_HAL ON CACHE BOOL "Use default Protected Storage HAL implementation.")
Raef Coles33ff1532021-06-18 09:18:08 +0100123set(PLATFORM_DEFAULT_NV_COUNTERS ON CACHE BOOL "Use default nv counter implementation.")
124set(PLATFORM_DEFAULT_CRYPTO_KEYS ON CACHE BOOL "Use default crypto keys implementation.")
125set(PLATFORM_DEFAULT_ROTPK ON CACHE BOOL "Use default root of trust public key.")
126set(PLATFORM_DEFAULT_IAK ON CACHE BOOL "Use default initial attestation_key.")
127set(PLATFORM_DEFAULT_UART_STDOUT ON CACHE BOOL "Use default uart stdout implementation.")
128set(PLATFORM_DEFAULT_NV_SEED ON CACHE BOOL "Use default NV seed implementation.")
Jackson Cooper-Driver94231462025-05-07 15:55:46 +0100129set(PLATFORM_DEFAULT_SHARED_MEASUREMENT_DATA ON CACHE BOOL "Use default shared measurement data location")
Raef Coles148b9472021-06-18 08:48:17 +0100130set(PLATFORM_DEFAULT_OTP ON CACHE BOOL "Use trusted on-chip flash to implement OTP memory")
Michel Jaouend0fd8d92021-10-14 09:22:41 +0200131set(PLATFORM_DEFAULT_OTP_WRITEABLE ON CACHE BOOL "Use OTP memory with write support")
Raef Colesaefbe082021-06-18 08:53:43 +0100132set(PLATFORM_DEFAULT_PROVISIONING ON CACHE BOOL "Use default provisioning implementation")
Raef Coles236c1882022-09-13 13:35:43 +0100133set(PLATFORM_DEFAULT_SYSTEM_RESET_HALT ON CACHE BOOL "Use default system reset/halt implementation")
Raef Colesb5be31b2022-11-01 11:42:42 +0000134set(PLATFORM_DEFAULT_IMAGE_SIGNING ON CACHE BOOL "Use default image signing implementation")
Gabor Toth06dc1d72024-08-28 14:54:16 +0200135set(PLATFORM_DEFAULT_PROV_LINKER_SCRIPT ON CACHE BOOL "Use default provisioning linker script")
Raef Colesaefbe082021-06-18 08:53:43 +0100136
137set(TFM_DUMMY_PROVISIONING ON CACHE BOOL "Provision with dummy values. NOT to be used in production")
Satish Kumare945bc22021-07-31 08:26:27 +0100138
Raef Colesf0ba05b2021-11-25 09:57:17 +0000139set(BL2_HEADER_SIZE 0x000 CACHE STRING "BL2 Header size")
140set(BL2_TRAILER_SIZE 0x000 CACHE STRING "BL2 Trailer size")
141
Raef Coles9ec67e62020-07-10 09:40:35 +0100142############################ Partitions ########################################
Xinyu Zhang77668dd2022-10-24 16:17:37 +0800143set(TFM_PARTITION_PROTECTED_STORAGE OFF CACHE BOOL "Enable Protected Storage partition")
Raef Coles9ec67e62020-07-10 09:40:35 +0100144set(PS_ENCRYPTION ON CACHE BOOL "Enable encryption for Protected Storage partition")
Antonio de Angelisd84808c2024-10-14 22:13:42 +0100145set(PS_ROLLBACK_PROTECTION ON CACHE BOOL "Enable rollback protection for Protected Storage partition")
Chris Brande8d48d72024-07-24 12:19:07 -0700146set(PS_SUPPORT_FORMAT_TRANSITION OFF CACHE BOOL "Enable reading the older format of Protected Storage data")
Jamie Fox865778b2020-10-23 19:52:51 +0100147set(PS_CRYPTO_AEAD_ALG PSA_ALG_GCM CACHE STRING "The AEAD algorithm to use for authenticated encryption in Protected Storage")
Chris Brand934761b2024-07-19 12:03:44 -0700148set(PS_AES_KEY_USAGE_LIMIT 0 CACHE STRING "Number of blocks to use a key for before changing it. 0 for no limit")
Raef Coles9ec67e62020-07-10 09:40:35 +0100149
Xinyu Zhang77668dd2022-10-24 16:17:37 +0800150set(TFM_PARTITION_INTERNAL_TRUSTED_STORAGE OFF CACHE BOOL "Enable Internal Trusted Storage partition")
Markus Swarowsky7de096f2023-03-16 10:32:02 +0100151set(ITS_ENCRYPTION OFF CACHE BOOL "Enable authenticated encryption of ITS files using platform specific APIs")
Raef Coles9ec67e62020-07-10 09:40:35 +0100152
Xinyu Zhang77668dd2022-10-24 16:17:37 +0800153set(TFM_PARTITION_CRYPTO OFF CACHE BOOL "Enable Crypto partition")
Raef Coles79809c72022-03-02 13:48:20 +0000154set(CRYPTO_TFM_BUILTIN_KEYS_DRIVER ON CACHE BOOL "Whether to allow crypto service to store builtin keys. Without this, ALL builtin keys must be stored in a platform-specific location")
Raef Coles9ec67e62020-07-10 09:40:35 +0100155
Xinyu Zhang77668dd2022-10-24 16:17:37 +0800156set(TFM_PARTITION_INITIAL_ATTESTATION OFF CACHE BOOL "Enable Initial Attestation partition")
Raef Coles9ec67e62020-07-10 09:40:35 +0100157set(SYMMETRIC_INITIAL_ATTESTATION OFF CACHE BOOL "Use symmetric crypto for inital attestation")
David Vincze75ee5162022-06-08 17:23:09 +0200158set(ATTEST_KEY_BITS 256 CACHE STRING "The size of the initial attestation key in bits")
David Hu9191b612023-06-08 12:02:39 +0800159set(PSA_INITIAL_ATTEST_MAX_TOKEN_SIZE 0x250 CACHE STRING "The maximum possible size of a token")
Raef Coles9ec67e62020-07-10 09:40:35 +0100160
Xinyu Zhang77668dd2022-10-24 16:17:37 +0800161set(TFM_PARTITION_PLATFORM OFF CACHE BOOL "Enable Platform partition")
Raef Coles9ec67e62020-07-10 09:40:35 +0100162
Jianliang Shen212027d2023-02-21 10:56:50 +0800163############################ Mbedcrypto configurations #########################
Raef Coles9ec67e62020-07-10 09:40:35 +0100164
Raef Coles9ec67e62020-07-10 09:40:35 +0100165set(MBEDCRYPTO_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "Build type of Mbed Crypto library")
Håkon Øye Amundsen8ab569b2021-11-04 13:59:04 +0000166set(TFM_MBEDCRYPTO_CONFIG_PATH
167 "${CMAKE_SOURCE_DIR}/lib/ext/mbedcrypto/mbedcrypto_config/tfm_mbedcrypto_config_default.h" CACHE PATH
168 "Config to use for Mbed Crypto. For increased flexibility when pointing to a file, set the type \
169of this setting to 'STRING' by passing the :<type> portion when specifying the setting value in \
170the command line. E.g. '-DTFM_MBEDCRYPTO_CONFIG_PATH:STRING=some_file_which_is_generated.h' \
171This can be useful if the config file is generated and placed inside a directory already added \
Antonio de Angelis701f7b32024-09-24 12:33:15 +0100172to the include path of Mbed TLS.")
173set(TFM_MBEDCRYPTO_CONFIG_CLIENT_PATH "${CMAKE_SOURCE_DIR}/lib/ext/mbedcrypto/mbedcrypto_config/tfm_mbedcrypto_config_client.h" CACHE PATH "Bare minimum config required on the client side.")
174set(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.")
Antonio de Angelisb6319512024-05-11 21:22:58 +0100175set(TFM_MBEDCRYPTO_PLATFORM_EXTRA_CONFIG_PATH "" CACHE PATH "Config to append to standard Mbed Crypto config, used by platforms to configure feature support")
Raef Coles9ec67e62020-07-10 09:40:35 +0100176
Jianliang Shendfe406b2023-11-07 14:29:50 +0800177########################## TF-M performance ####################################
178
179set(CONFIG_TFM_ENABLE_PROFILING OFF CACHE BOOL "Enable profiling for TF-M")
180
Anton Komlevaee4b612023-05-14 17:38:36 +0100181########################## MCUBoot signing #####################################
182
183if (CONFIG_TFM_BOOT_STORE_MEASUREMENTS AND CONFIG_TFM_BOOT_STORE_ENCODED_MEASUREMENTS)
184 set(MCUBOOT_MEASURED_BOOT ON)
185else()
186 set(MCUBOOT_MEASURED_BOOT OFF)
187endif()
188
Raef Coles1d91a7a2024-03-06 14:22:26 +0000189########################## TF-M Runtime Sanitization ###########################
190
191set(BL1_1_SANITIZE OFF CACHE STRING "Enable a runtime sanitizer for BL1_1")
192set(BL1_2_SANITIZE OFF CACHE STRING "Enable a runtime sanitizer for BL1_2")
193set(BL2_SANITIZE OFF CACHE STRING "Enable a runtime sanitizer for BL2")
194set(TFM_SANITIZE OFF CACHE STRING "Enable a runtime sanitizer for the TF-M runtime")
195
David Vincze0c515de2020-11-25 19:02:57 +0100196################################################################################
197
198# Specifying the accepted values for certain configuration options to facilitate
199# their later validation.
200
Tamas Banb881bea2020-11-04 16:18:36 +0000201########################## FIH #################################################
202
203set_property(CACHE TFM_FIH_PROFILE PROPERTY STRINGS "OFF;LOW;MEDIUM;HIGH")
Raef Coles1d91a7a2024-03-06 14:22:26 +0000204
205########################## TF-M Runtime Sanitization ###########################
206
207set(SANITIZE_OPTIONS "undefined;shift;shift-exponent;shift-base; integer-divide-by-zero;unreachable;vla-bound; null;return;signed-integer-overflow;bounds; bounds-strict;alignment;object-size; float-divide-by-zero;float-cast-overflow; nonnull-attribute;returns-nonnull-attribute; bool;enum;vptr;pointer-overflow;builtin")
208
209set_property(CACHE BL1_1_SANITIZE PROPERTY STRINGS ${SANITIZE_OPTIONS})
210set_property(CACHE BL1_2_SANITIZE PROPERTY STRINGS ${SANITIZE_OPTIONS})
211set_property(CACHE BL2_SANITIZE PROPERTY STRINGS ${SANITIZE_OPTIONS})
212set_property(CACHE TFM_SANITIZE PROPERTY STRINGS ${SANITIZE_OPTIONS})