blob: 0e8e00a99551135c9296dce3340eb47574f0ead5 [file] [log] [blame]
Xinyu Zhanga2fab0e2022-10-24 15:37:46 +08001/*
David Vincze37faec62025-01-20 18:07:12 +00002 * Copyright (c) 2022-2025, Arm Limited. All rights reserved.
Chris Brand72ee4c62024-01-08 16:56:55 -08003 * Copyright (c) 2023-2024 Cypress Semiconductor Corporation (an Infineon
Chris Brand80326b72023-03-15 13:07:49 -07004 * company) or an affiliate of Cypress Semiconductor Corporation. All rights
5 * reserved.
Xinyu Zhanga2fab0e2022-10-24 15:37:46 +08006 *
7 * SPDX-License-Identifier: BSD-3-Clause
8 *
9 */
10
11#ifndef __CONFIG_BASE_H__
12#define __CONFIG_BASE_H__
13
Xinyu Zhang77668dd2022-10-24 16:17:37 +080014/* Platform Partition Configs */
15
16/* Size of input buffer in platform service */
David Hu6d1a9b62023-02-22 16:54:04 +080017#ifndef PLATFORM_SERVICE_INPUT_BUFFER_SIZE
Xinyu Zhang77668dd2022-10-24 16:17:37 +080018#define PLATFORM_SERVICE_INPUT_BUFFER_SIZE 64
David Hu6d1a9b62023-02-22 16:54:04 +080019#endif
Xinyu Zhang77668dd2022-10-24 16:17:37 +080020
21/* Size of output buffer in platform service */
David Hu6d1a9b62023-02-22 16:54:04 +080022#ifndef PLATFORM_SERVICE_OUTPUT_BUFFER_SIZE
Xinyu Zhang77668dd2022-10-24 16:17:37 +080023#define PLATFORM_SERVICE_OUTPUT_BUFFER_SIZE 64
David Hu6d1a9b62023-02-22 16:54:04 +080024#endif
Xinyu Zhang77668dd2022-10-24 16:17:37 +080025
26/* The stack size of the Platform Secure Partition */
David Hu6d1a9b62023-02-22 16:54:04 +080027#ifndef PLATFORM_SP_STACK_SIZE
Xinyu Zhang77668dd2022-10-24 16:17:37 +080028#define PLATFORM_SP_STACK_SIZE 0x500
David Hu6d1a9b62023-02-22 16:54:04 +080029#endif
Xinyu Zhang77668dd2022-10-24 16:17:37 +080030
31/* Disable Non-volatile counter module */
David Hu6d1a9b62023-02-22 16:54:04 +080032#ifndef PLATFORM_NV_COUNTER_MODULE_DISABLED
Xinyu Zhang77668dd2022-10-24 16:17:37 +080033#define PLATFORM_NV_COUNTER_MODULE_DISABLED 0
David Hu6d1a9b62023-02-22 16:54:04 +080034#endif
Xinyu Zhang77668dd2022-10-24 16:17:37 +080035
Xinyu Zhangd755b822022-10-25 11:18:09 +080036/* Crypto Partition Configs */
37
38/*
Antonio de Angelisc271e4a2024-11-15 14:35:40 +000039 * Heap size for the crypto backend. This is statically allocated
40 * inside the Crypto service and used as heap through the default
41 * Mbed TLS allocator
Xinyu Zhangd755b822022-10-25 11:18:09 +080042 */
David Hu6d1a9b62023-02-22 16:54:04 +080043#ifndef CRYPTO_ENGINE_BUF_SIZE
Antonio de Angelisc271e4a2024-11-15 14:35:40 +000044#define CRYPTO_ENGINE_BUF_SIZE 0x3000
David Hu6d1a9b62023-02-22 16:54:04 +080045#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080046
47/* The max number of concurrent operations that can be active (allocated) at any time in Crypto */
David Hu6d1a9b62023-02-22 16:54:04 +080048#ifndef CRYPTO_CONC_OPER_NUM
Xinyu Zhangd755b822022-10-25 11:18:09 +080049#define CRYPTO_CONC_OPER_NUM 8
David Hu6d1a9b62023-02-22 16:54:04 +080050#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080051
Jianliang Shen78ca8d42022-11-16 17:33:18 +080052/* Enable PSA Crypto random number generator module */
David Hu6d1a9b62023-02-22 16:54:04 +080053#ifndef CRYPTO_RNG_MODULE_ENABLED
Jianliang Shen78ca8d42022-11-16 17:33:18 +080054#define CRYPTO_RNG_MODULE_ENABLED 1
David Hu6d1a9b62023-02-22 16:54:04 +080055#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080056
Jianliang Shen78ca8d42022-11-16 17:33:18 +080057/* Enable PSA Crypto Key module */
David Hu6d1a9b62023-02-22 16:54:04 +080058#ifndef CRYPTO_KEY_MODULE_ENABLED
Jianliang Shen78ca8d42022-11-16 17:33:18 +080059#define CRYPTO_KEY_MODULE_ENABLED 1
David Hu6d1a9b62023-02-22 16:54:04 +080060#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080061
Jianliang Shen78ca8d42022-11-16 17:33:18 +080062/* Enable PSA Crypto AEAD module */
David Hu6d1a9b62023-02-22 16:54:04 +080063#ifndef CRYPTO_AEAD_MODULE_ENABLED
Jianliang Shen78ca8d42022-11-16 17:33:18 +080064#define CRYPTO_AEAD_MODULE_ENABLED 1
David Hu6d1a9b62023-02-22 16:54:04 +080065#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080066
Jianliang Shen78ca8d42022-11-16 17:33:18 +080067/* Enable PSA Crypto MAC module */
David Hu6d1a9b62023-02-22 16:54:04 +080068#ifndef CRYPTO_MAC_MODULE_ENABLED
Jianliang Shen78ca8d42022-11-16 17:33:18 +080069#define CRYPTO_MAC_MODULE_ENABLED 1
David Hu6d1a9b62023-02-22 16:54:04 +080070#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080071
Jianliang Shen78ca8d42022-11-16 17:33:18 +080072/* Enable PSA Crypto Hash module */
David Hu6d1a9b62023-02-22 16:54:04 +080073#ifndef CRYPTO_HASH_MODULE_ENABLED
Jianliang Shen78ca8d42022-11-16 17:33:18 +080074#define CRYPTO_HASH_MODULE_ENABLED 1
David Hu6d1a9b62023-02-22 16:54:04 +080075#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080076
Jianliang Shen78ca8d42022-11-16 17:33:18 +080077/* Enable PSA Crypto Cipher module */
David Hu6d1a9b62023-02-22 16:54:04 +080078#ifndef CRYPTO_CIPHER_MODULE_ENABLED
Jianliang Shen78ca8d42022-11-16 17:33:18 +080079#define CRYPTO_CIPHER_MODULE_ENABLED 1
David Hu6d1a9b62023-02-22 16:54:04 +080080#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080081
Jianliang Shen78ca8d42022-11-16 17:33:18 +080082/* Enable PSA Crypto asymmetric key signature module */
David Hu6d1a9b62023-02-22 16:54:04 +080083#ifndef CRYPTO_ASYM_SIGN_MODULE_ENABLED
Jianliang Shen78ca8d42022-11-16 17:33:18 +080084#define CRYPTO_ASYM_SIGN_MODULE_ENABLED 1
David Hu6d1a9b62023-02-22 16:54:04 +080085#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080086
Jianliang Shen78ca8d42022-11-16 17:33:18 +080087/* Enable PSA Crypto asymmetric key encryption module */
David Hu6d1a9b62023-02-22 16:54:04 +080088#ifndef CRYPTO_ASYM_ENCRYPT_MODULE_ENABLED
Jianliang Shen78ca8d42022-11-16 17:33:18 +080089#define CRYPTO_ASYM_ENCRYPT_MODULE_ENABLED 1
David Hu6d1a9b62023-02-22 16:54:04 +080090#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080091
Jianliang Shen78ca8d42022-11-16 17:33:18 +080092/* Enable PSA Crypto key derivation module */
David Hu6d1a9b62023-02-22 16:54:04 +080093#ifndef CRYPTO_KEY_DERIVATION_MODULE_ENABLED
Jianliang Shen78ca8d42022-11-16 17:33:18 +080094#define CRYPTO_KEY_DERIVATION_MODULE_ENABLED 1
David Hu6d1a9b62023-02-22 16:54:04 +080095#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080096
97/* Default size of the internal scratch buffer used for PSA FF IOVec allocations */
David Hu6d1a9b62023-02-22 16:54:04 +080098#ifndef CRYPTO_IOVEC_BUFFER_SIZE
Xinyu Zhangd755b822022-10-25 11:18:09 +080099#define CRYPTO_IOVEC_BUFFER_SIZE 5120
David Hu6d1a9b62023-02-22 16:54:04 +0800100#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +0800101
102/* Use stored NV seed to provide entropy */
David Hu6d1a9b62023-02-22 16:54:04 +0800103#ifndef CRYPTO_NV_SEED
Xinyu Zhangd755b822022-10-25 11:18:09 +0800104#define CRYPTO_NV_SEED 1
David Hu6d1a9b62023-02-22 16:54:04 +0800105#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +0800106
107/*
108 * Only enable multi-part operations in Hash, MAC, AEAD and symmetric ciphers,
109 * to optimize memory footprint in resource-constrained devices.
110 */
David Hu6d1a9b62023-02-22 16:54:04 +0800111#ifndef CRYPTO_SINGLE_PART_FUNCS_DISABLED
Xinyu Zhangd755b822022-10-25 11:18:09 +0800112#define CRYPTO_SINGLE_PART_FUNCS_DISABLED 0
David Hu6d1a9b62023-02-22 16:54:04 +0800113#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +0800114
Antonio de Angelisbb6f7112024-10-16 19:15:25 +0100115/*
116 * The service assumes that the client interface and internal
117 * interface towards the library that provides the PSA Crypto
118 * core component maintain the same ABI. This is not the default
119 * when using the Mbed TLS reference implementation
120 */
121#ifndef CRYPTO_LIBRARY_ABI_COMPAT
122#define CRYPTO_LIBRARY_ABI_COMPAT (0)
123#endif
124
Xinyu Zhangd755b822022-10-25 11:18:09 +0800125/* The stack size of the Crypto Secure Partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800126#ifndef CRYPTO_STACK_SIZE
Antonio de Angelis9b822182024-11-16 22:19:30 +0000127#define CRYPTO_STACK_SIZE 0x1800
David Hu6d1a9b62023-02-22 16:54:04 +0800128#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +0800129
Xinyu Zhangff653722022-10-27 14:17:36 +0800130/* FWU Partition Configs */
131
132/* Size of the FWU internal data transfer buffer */
David Hu6d1a9b62023-02-22 16:54:04 +0800133#ifndef TFM_FWU_BUF_SIZE
Xinyu Zhangff653722022-10-27 14:17:36 +0800134#define TFM_FWU_BUF_SIZE PSA_FWU_MAX_WRITE_SIZE
David Hu6d1a9b62023-02-22 16:54:04 +0800135#endif
Xinyu Zhangff653722022-10-27 14:17:36 +0800136
137/* The stack size of the Firmware Update Secure Partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800138#ifndef FWU_STACK_SIZE
Xinyu Zhangff653722022-10-27 14:17:36 +0800139#define FWU_STACK_SIZE 0x600
David Hu6d1a9b62023-02-22 16:54:04 +0800140#endif
Xinyu Zhangff653722022-10-27 14:17:36 +0800141
Xinyu Zhangd15f99c2022-10-27 15:03:34 +0800142/* Attest Partition Configs */
143
144/* Include optional claims in initial attestation token */
David Hu6d1a9b62023-02-22 16:54:04 +0800145#ifndef ATTEST_INCLUDE_OPTIONAL_CLAIMS
Xinyu Zhangd15f99c2022-10-27 15:03:34 +0800146#define ATTEST_INCLUDE_OPTIONAL_CLAIMS 1
David Hu6d1a9b62023-02-22 16:54:04 +0800147#endif
Xinyu Zhangd15f99c2022-10-27 15:03:34 +0800148
149/* Include COSE key-id in initial attestation token */
David Hu6d1a9b62023-02-22 16:54:04 +0800150#ifndef ATTEST_INCLUDE_COSE_KEY_ID
Xinyu Zhangd15f99c2022-10-27 15:03:34 +0800151#define ATTEST_INCLUDE_COSE_KEY_ID 0
David Hu6d1a9b62023-02-22 16:54:04 +0800152#endif
Xinyu Zhangd15f99c2022-10-27 15:03:34 +0800153
154/* The stack size of the Initial Attestation Secure Partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800155#ifndef ATTEST_STACK_SIZE
Tamas Ban6bff4682024-09-25 15:15:26 +0200156#define ATTEST_STACK_SIZE 0x800
David Hu6d1a9b62023-02-22 16:54:04 +0800157#endif
Xinyu Zhangd15f99c2022-10-27 15:03:34 +0800158
159/* Set the initial attestation token profile */
David Hu6d1a9b62023-02-22 16:54:04 +0800160#if (!ATTEST_TOKEN_PROFILE_PSA_IOT_1) && \
161 (!ATTEST_TOKEN_PROFILE_PSA_2_0_0) && \
162 (!ATTEST_TOKEN_PROFILE_ARM_CCA)
Antonio de Angelis58fc26c2024-11-07 17:06:55 +0100163#define ATTEST_TOKEN_PROFILE_PSA_IOT_1 1
David Hu6d1a9b62023-02-22 16:54:04 +0800164#endif
Xinyu Zhangd15f99c2022-10-27 15:03:34 +0800165
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800166/* ITS Partition Configs */
167
168/* Create flash FS if it doesn't exist for Internal Trusted Storage partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800169#ifndef ITS_CREATE_FLASH_LAYOUT
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800170#define ITS_CREATE_FLASH_LAYOUT 1
David Hu6d1a9b62023-02-22 16:54:04 +0800171#endif
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800172
173/* Enable emulated RAM FS for platforms that don't have flash for Internal Trusted Storage partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800174#ifndef ITS_RAM_FS
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800175#define ITS_RAM_FS 0
David Hu6d1a9b62023-02-22 16:54:04 +0800176#endif
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800177
178/* Validate filesystem metadata every time it is read from flash */
David Hu6d1a9b62023-02-22 16:54:04 +0800179#ifndef ITS_VALIDATE_METADATA_FROM_FLASH
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800180#define ITS_VALIDATE_METADATA_FROM_FLASH 1
David Hu6d1a9b62023-02-22 16:54:04 +0800181#endif
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800182
183/* The maximum asset size to be stored in the Internal Trusted Storage */
David Hu6d1a9b62023-02-22 16:54:04 +0800184#ifndef ITS_MAX_ASSET_SIZE
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800185#define ITS_MAX_ASSET_SIZE 512
David Hu6d1a9b62023-02-22 16:54:04 +0800186#endif
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800187
188/*
189 * Size of the ITS internal data transfer buffer
190 * (Default to the max asset size so that all requests can be handled in one iteration.)
191 */
David Hu6d1a9b62023-02-22 16:54:04 +0800192#ifndef ITS_BUF_SIZE
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800193#define ITS_BUF_SIZE ITS_MAX_ASSET_SIZE
David Hu6d1a9b62023-02-22 16:54:04 +0800194#endif
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800195
196/* The maximum number of assets to be stored in the Internal Trusted Storage */
David Hu6d1a9b62023-02-22 16:54:04 +0800197#ifndef ITS_NUM_ASSETS
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800198#define ITS_NUM_ASSETS 10
David Hu6d1a9b62023-02-22 16:54:04 +0800199#endif
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800200
201/* The stack size of the Internal Trusted Storage Secure Partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800202#ifndef ITS_STACK_SIZE
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800203#define ITS_STACK_SIZE 0x720
David Hu6d1a9b62023-02-22 16:54:04 +0800204#endif
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800205
Markus Swarowsky7de096f2023-03-16 10:32:02 +0100206/* The size of the authentication tag used when authentication/encryption of ITS files is enabled */
207#ifndef TFM_ITS_AUTH_TAG_LENGTH
208#define TFM_ITS_AUTH_TAG_LENGTH 16
209#endif
210
Gabor Tothdd6c4052024-09-13 14:06:19 +0200211/* The size of the key used when authentication/encryption of ITS files is enabled */
212#ifndef TFM_ITS_KEY_LENGTH
213#define TFM_ITS_KEY_LENGTH 16
214#endif
215
Markus Swarowsky7de096f2023-03-16 10:32:02 +0100216/* The size of the nonce used when ITS file encryption is enabled */
217#ifndef TFM_ITS_ENC_NONCE_LENGTH
218#define TFM_ITS_ENC_NONCE_LENGTH 12
219#endif
220
Xinyu Zhang07152702022-10-31 12:35:49 +0800221/* PS Partition Configs */
222
223/* Create flash FS if it doesn't exist for Protected Storage partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800224#ifndef PS_CREATE_FLASH_LAYOUT
Xinyu Zhang07152702022-10-31 12:35:49 +0800225#define PS_CREATE_FLASH_LAYOUT 1
David Hu6d1a9b62023-02-22 16:54:04 +0800226#endif
Xinyu Zhang07152702022-10-31 12:35:49 +0800227
228/* Enable emulated RAM FS for platforms that don't have flash for Protected Storage partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800229#ifndef PS_RAM_FS
Xinyu Zhang07152702022-10-31 12:35:49 +0800230#define PS_RAM_FS 0
David Hu6d1a9b62023-02-22 16:54:04 +0800231#endif
Xinyu Zhang07152702022-10-31 12:35:49 +0800232
233/* Enable rollback protection for Protected Storage partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800234#ifndef PS_ROLLBACK_PROTECTION
Xinyu Zhang07152702022-10-31 12:35:49 +0800235#define PS_ROLLBACK_PROTECTION 1
David Hu6d1a9b62023-02-22 16:54:04 +0800236#endif
Xinyu Zhang07152702022-10-31 12:35:49 +0800237
238/* Validate filesystem metadata every time it is read from flash */
David Hu6d1a9b62023-02-22 16:54:04 +0800239#ifndef PS_VALIDATE_METADATA_FROM_FLASH
Xinyu Zhang07152702022-10-31 12:35:49 +0800240#define PS_VALIDATE_METADATA_FROM_FLASH 1
David Hu6d1a9b62023-02-22 16:54:04 +0800241#endif
Xinyu Zhang07152702022-10-31 12:35:49 +0800242
243/* The maximum asset size to be stored in the Protected Storage */
David Hu6d1a9b62023-02-22 16:54:04 +0800244#ifndef PS_MAX_ASSET_SIZE
Xinyu Zhang07152702022-10-31 12:35:49 +0800245#define PS_MAX_ASSET_SIZE 2048
David Hu6d1a9b62023-02-22 16:54:04 +0800246#endif
Xinyu Zhang07152702022-10-31 12:35:49 +0800247
248/* The maximum number of assets to be stored in the Protected Storage */
David Hu6d1a9b62023-02-22 16:54:04 +0800249#ifndef PS_NUM_ASSETS
Xinyu Zhang07152702022-10-31 12:35:49 +0800250#define PS_NUM_ASSETS 10
David Hu6d1a9b62023-02-22 16:54:04 +0800251#endif
Xinyu Zhang07152702022-10-31 12:35:49 +0800252
253/* The stack size of the Protected Storage Secure Partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800254#ifndef PS_STACK_SIZE
Xinyu Zhang07152702022-10-31 12:35:49 +0800255#define PS_STACK_SIZE 0x700
David Hu6d1a9b62023-02-22 16:54:04 +0800256#endif
Xinyu Zhang07152702022-10-31 12:35:49 +0800257
Chris Brand72ee4c62024-01-08 16:56:55 -0800258/* NS Agent Mailbox Partition Configs */
259
Sherry Zhang415d7132023-08-09 16:26:56 +0800260/* The stack size of the NS Agent Mailbox Secure Partition */
261#ifndef NS_AGENT_MAILBOX_STACK_SIZE
262#define NS_AGENT_MAILBOX_STACK_SIZE 0x800
263#endif
264
Chris Brandda938d82024-08-01 12:42:10 -0700265/* Whether the mailbox itself is in memory that is uncached in the SPE */
266#ifndef MAILBOX_IS_UNCACHED_S
267#define MAILBOX_IS_UNCACHED_S 1
268#endif
269
270/* Whether the mailbox itself is in memory that is uncached in the NSPE */
271#ifndef MAILBOX_IS_UNCACHED_NS
272#define MAILBOX_IS_UNCACHED_NS 1
273#endif
274
Jackson Cooper-Driver92f631c2024-10-08 13:46:42 +0000275/* Secure Test Partition Configs */
276#ifdef TFM_PARTITION_DPE
277/* DPE tests require larger test partition stack */
278#define SECURE_TEST_PARTITION_STACK_SIZE 0x3000
279#else
David Vincze37faec62025-01-20 18:07:12 +0000280#define SECURE_TEST_PARTITION_STACK_SIZE 0x0F00
Jackson Cooper-Driver92f631c2024-10-08 13:46:42 +0000281#endif
282
Chris Brand72ee4c62024-01-08 16:56:55 -0800283/* SPM Configs */
Xinyu Zhangcdbe3622022-10-31 14:34:25 +0800284
Xinyu Zhang9a6d90a2023-03-22 17:32:27 +0800285#ifdef CONFIG_TFM_CONNECTION_POOL_ENABLE
Xinyu Zhangcdbe3622022-10-31 14:34:25 +0800286/* The maximal number of secure services that are connected or requested at the same time */
David Hu6d1a9b62023-02-22 16:54:04 +0800287#ifndef CONFIG_TFM_CONN_HANDLE_MAX_NUM
Chris Brand80326b72023-03-15 13:07:49 -0700288#define CONFIG_TFM_CONN_HANDLE_MAX_NUM 8
David Hu6d1a9b62023-02-22 16:54:04 +0800289#endif
Xinyu Zhang9a6d90a2023-03-22 17:32:27 +0800290#endif
Xinyu Zhangcdbe3622022-10-31 14:34:25 +0800291
Xinyu Zhang44dbfa62022-11-23 14:22:32 +0800292/* Disable the doorbell APIs */
David Hu6d1a9b62023-02-22 16:54:04 +0800293#ifndef CONFIG_TFM_DOORBELL_API
Chris Brand80326b72023-03-15 13:07:49 -0700294#define CONFIG_TFM_DOORBELL_API 0
295#endif
296
297/* Do not run the scheduler after handling a secure interrupt if the NSPE was pre-empted */
298#ifndef CONFIG_TFM_SCHEDULE_WHEN_NS_INTERRUPTED
299#define CONFIG_TFM_SCHEDULE_WHEN_NS_INTERRUPTED 0
David Hu6d1a9b62023-02-22 16:54:04 +0800300#endif
Xinyu Zhangcdbe3622022-10-31 14:34:25 +0800301
Sherry Zhangf2a4f912023-09-12 15:38:12 +0800302/* Mask Non-Secure interrupts when executing in secure state. */
303#ifndef CONFIG_TFM_SECURE_THREAD_MASK_NS_INTERRUPT
304#define CONFIG_TFM_SECURE_THREAD_MASK_NS_INTERRUPT 0
305#endif
306
Roman Mazurak96585b82024-04-03 14:35:00 +0300307/*
308 * tfm_hal_post_partition_init_hook is called if this option is enabled.
309 * It's called by SPM right before starting scheduler.
310 */
311#ifndef CONFIG_TFM_POST_PARTITION_INIT_HOOK
312#define CONFIG_TFM_POST_PARTITION_INIT_HOOK 0
313#endif
314
Andrej Butok302da632023-07-14 12:57:08 +0200315/* Enable OTP/NV_COUNTERS emulation in RAM */
316#ifndef OTP_NV_COUNTERS_RAM_EMULATION
317#define OTP_NV_COUNTERS_RAM_EMULATION 0
318#endif
319
Aziz IDOMAR82772882024-04-09 14:19:52 +0100320/* Error Codes Configs */
321
322/* Enable unique error codes */
323#ifndef TFM_UNIQUE_ERROR_CODES
324#define TFM_UNIQUE_ERROR_CODES 0
325#endif
326
Xinyu Zhanga2fab0e2022-10-24 15:37:46 +0800327#endif /* __CONFIG_BASE_H__ */