blob: dbc1fa5d80b423d5c71534f4029b52b6fd3f2d0e [file] [log] [blame]
Xinyu Zhanga2fab0e2022-10-24 15:37:46 +08001/*
Sherry Zhangf2a4f912023-09-12 15:38:12 +08002 * Copyright (c) 2022-2024, 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/*
39 * Heap size for the crypto backend
40 * CRYPTO_ENGINE_BUF_SIZE needs to be >8KB for EC signing by attest module.
41 */
David Hu6d1a9b62023-02-22 16:54:04 +080042#ifndef CRYPTO_ENGINE_BUF_SIZE
Xinyu Zhangd755b822022-10-25 11:18:09 +080043#define CRYPTO_ENGINE_BUF_SIZE 0x2080
David Hu6d1a9b62023-02-22 16:54:04 +080044#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080045
46/* The max number of concurrent operations that can be active (allocated) at any time in Crypto */
David Hu6d1a9b62023-02-22 16:54:04 +080047#ifndef CRYPTO_CONC_OPER_NUM
Xinyu Zhangd755b822022-10-25 11:18:09 +080048#define CRYPTO_CONC_OPER_NUM 8
David Hu6d1a9b62023-02-22 16:54:04 +080049#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080050
Jianliang Shen78ca8d42022-11-16 17:33:18 +080051/* Enable PSA Crypto random number generator module */
David Hu6d1a9b62023-02-22 16:54:04 +080052#ifndef CRYPTO_RNG_MODULE_ENABLED
Jianliang Shen78ca8d42022-11-16 17:33:18 +080053#define CRYPTO_RNG_MODULE_ENABLED 1
David Hu6d1a9b62023-02-22 16:54:04 +080054#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080055
Jianliang Shen78ca8d42022-11-16 17:33:18 +080056/* Enable PSA Crypto Key module */
David Hu6d1a9b62023-02-22 16:54:04 +080057#ifndef CRYPTO_KEY_MODULE_ENABLED
Jianliang Shen78ca8d42022-11-16 17:33:18 +080058#define CRYPTO_KEY_MODULE_ENABLED 1
David Hu6d1a9b62023-02-22 16:54:04 +080059#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080060
Jianliang Shen78ca8d42022-11-16 17:33:18 +080061/* Enable PSA Crypto AEAD module */
David Hu6d1a9b62023-02-22 16:54:04 +080062#ifndef CRYPTO_AEAD_MODULE_ENABLED
Jianliang Shen78ca8d42022-11-16 17:33:18 +080063#define CRYPTO_AEAD_MODULE_ENABLED 1
David Hu6d1a9b62023-02-22 16:54:04 +080064#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080065
Jianliang Shen78ca8d42022-11-16 17:33:18 +080066/* Enable PSA Crypto MAC module */
David Hu6d1a9b62023-02-22 16:54:04 +080067#ifndef CRYPTO_MAC_MODULE_ENABLED
Jianliang Shen78ca8d42022-11-16 17:33:18 +080068#define CRYPTO_MAC_MODULE_ENABLED 1
David Hu6d1a9b62023-02-22 16:54:04 +080069#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080070
Jianliang Shen78ca8d42022-11-16 17:33:18 +080071/* Enable PSA Crypto Hash module */
David Hu6d1a9b62023-02-22 16:54:04 +080072#ifndef CRYPTO_HASH_MODULE_ENABLED
Jianliang Shen78ca8d42022-11-16 17:33:18 +080073#define CRYPTO_HASH_MODULE_ENABLED 1
David Hu6d1a9b62023-02-22 16:54:04 +080074#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080075
Jianliang Shen78ca8d42022-11-16 17:33:18 +080076/* Enable PSA Crypto Cipher module */
David Hu6d1a9b62023-02-22 16:54:04 +080077#ifndef CRYPTO_CIPHER_MODULE_ENABLED
Jianliang Shen78ca8d42022-11-16 17:33:18 +080078#define CRYPTO_CIPHER_MODULE_ENABLED 1
David Hu6d1a9b62023-02-22 16:54:04 +080079#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080080
Jianliang Shen78ca8d42022-11-16 17:33:18 +080081/* Enable PSA Crypto asymmetric key signature module */
David Hu6d1a9b62023-02-22 16:54:04 +080082#ifndef CRYPTO_ASYM_SIGN_MODULE_ENABLED
Jianliang Shen78ca8d42022-11-16 17:33:18 +080083#define CRYPTO_ASYM_SIGN_MODULE_ENABLED 1
David Hu6d1a9b62023-02-22 16:54:04 +080084#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080085
Jianliang Shen78ca8d42022-11-16 17:33:18 +080086/* Enable PSA Crypto asymmetric key encryption module */
David Hu6d1a9b62023-02-22 16:54:04 +080087#ifndef CRYPTO_ASYM_ENCRYPT_MODULE_ENABLED
Jianliang Shen78ca8d42022-11-16 17:33:18 +080088#define CRYPTO_ASYM_ENCRYPT_MODULE_ENABLED 1
David Hu6d1a9b62023-02-22 16:54:04 +080089#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080090
Jianliang Shen78ca8d42022-11-16 17:33:18 +080091/* Enable PSA Crypto key derivation module */
David Hu6d1a9b62023-02-22 16:54:04 +080092#ifndef CRYPTO_KEY_DERIVATION_MODULE_ENABLED
Jianliang Shen78ca8d42022-11-16 17:33:18 +080093#define CRYPTO_KEY_DERIVATION_MODULE_ENABLED 1
David Hu6d1a9b62023-02-22 16:54:04 +080094#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +080095
96/* Default size of the internal scratch buffer used for PSA FF IOVec allocations */
David Hu6d1a9b62023-02-22 16:54:04 +080097#ifndef CRYPTO_IOVEC_BUFFER_SIZE
Xinyu Zhangd755b822022-10-25 11:18:09 +080098#define CRYPTO_IOVEC_BUFFER_SIZE 5120
David Hu6d1a9b62023-02-22 16:54:04 +080099#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +0800100
101/* Use stored NV seed to provide entropy */
David Hu6d1a9b62023-02-22 16:54:04 +0800102#ifndef CRYPTO_NV_SEED
Xinyu Zhangd755b822022-10-25 11:18:09 +0800103#define CRYPTO_NV_SEED 1
David Hu6d1a9b62023-02-22 16:54:04 +0800104#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +0800105
106/*
107 * Only enable multi-part operations in Hash, MAC, AEAD and symmetric ciphers,
108 * to optimize memory footprint in resource-constrained devices.
109 */
David Hu6d1a9b62023-02-22 16:54:04 +0800110#ifndef CRYPTO_SINGLE_PART_FUNCS_DISABLED
Xinyu Zhangd755b822022-10-25 11:18:09 +0800111#define CRYPTO_SINGLE_PART_FUNCS_DISABLED 0
David Hu6d1a9b62023-02-22 16:54:04 +0800112#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +0800113
Antonio de Angelisbb6f7112024-10-16 19:15:25 +0100114/*
115 * The service assumes that the client interface and internal
116 * interface towards the library that provides the PSA Crypto
117 * core component maintain the same ABI. This is not the default
118 * when using the Mbed TLS reference implementation
119 */
120#ifndef CRYPTO_LIBRARY_ABI_COMPAT
121#define CRYPTO_LIBRARY_ABI_COMPAT (0)
122#endif
123
Xinyu Zhangd755b822022-10-25 11:18:09 +0800124/* The stack size of the Crypto Secure Partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800125#ifndef CRYPTO_STACK_SIZE
Xinyu Zhangd755b822022-10-25 11:18:09 +0800126#define CRYPTO_STACK_SIZE 0x1B00
David Hu6d1a9b62023-02-22 16:54:04 +0800127#endif
Xinyu Zhangd755b822022-10-25 11:18:09 +0800128
Xinyu Zhangff653722022-10-27 14:17:36 +0800129/* FWU Partition Configs */
130
131/* Size of the FWU internal data transfer buffer */
David Hu6d1a9b62023-02-22 16:54:04 +0800132#ifndef TFM_FWU_BUF_SIZE
Xinyu Zhangff653722022-10-27 14:17:36 +0800133#define TFM_FWU_BUF_SIZE PSA_FWU_MAX_WRITE_SIZE
David Hu6d1a9b62023-02-22 16:54:04 +0800134#endif
Xinyu Zhangff653722022-10-27 14:17:36 +0800135
136/* The stack size of the Firmware Update Secure Partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800137#ifndef FWU_STACK_SIZE
Xinyu Zhangff653722022-10-27 14:17:36 +0800138#define FWU_STACK_SIZE 0x600
David Hu6d1a9b62023-02-22 16:54:04 +0800139#endif
Xinyu Zhangff653722022-10-27 14:17:36 +0800140
Xinyu Zhangd15f99c2022-10-27 15:03:34 +0800141/* Attest Partition Configs */
142
143/* Include optional claims in initial attestation token */
David Hu6d1a9b62023-02-22 16:54:04 +0800144#ifndef ATTEST_INCLUDE_OPTIONAL_CLAIMS
Xinyu Zhangd15f99c2022-10-27 15:03:34 +0800145#define ATTEST_INCLUDE_OPTIONAL_CLAIMS 1
David Hu6d1a9b62023-02-22 16:54:04 +0800146#endif
Xinyu Zhangd15f99c2022-10-27 15:03:34 +0800147
148/* Include COSE key-id in initial attestation token */
David Hu6d1a9b62023-02-22 16:54:04 +0800149#ifndef ATTEST_INCLUDE_COSE_KEY_ID
Xinyu Zhangd15f99c2022-10-27 15:03:34 +0800150#define ATTEST_INCLUDE_COSE_KEY_ID 0
David Hu6d1a9b62023-02-22 16:54:04 +0800151#endif
Xinyu Zhangd15f99c2022-10-27 15:03:34 +0800152
153/* The stack size of the Initial Attestation Secure Partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800154#ifndef ATTEST_STACK_SIZE
Tamas Ban6bff4682024-09-25 15:15:26 +0200155#define ATTEST_STACK_SIZE 0x800
David Hu6d1a9b62023-02-22 16:54:04 +0800156#endif
Xinyu Zhangd15f99c2022-10-27 15:03:34 +0800157
158/* Set the initial attestation token profile */
David Hu6d1a9b62023-02-22 16:54:04 +0800159#if (!ATTEST_TOKEN_PROFILE_PSA_IOT_1) && \
160 (!ATTEST_TOKEN_PROFILE_PSA_2_0_0) && \
161 (!ATTEST_TOKEN_PROFILE_ARM_CCA)
Antonio de Angelis58fc26c2024-11-07 17:06:55 +0100162#define ATTEST_TOKEN_PROFILE_PSA_IOT_1 1
David Hu6d1a9b62023-02-22 16:54:04 +0800163#endif
Xinyu Zhangd15f99c2022-10-27 15:03:34 +0800164
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800165/* ITS Partition Configs */
166
167/* Create flash FS if it doesn't exist for Internal Trusted Storage partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800168#ifndef ITS_CREATE_FLASH_LAYOUT
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800169#define ITS_CREATE_FLASH_LAYOUT 1
David Hu6d1a9b62023-02-22 16:54:04 +0800170#endif
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800171
172/* Enable emulated RAM FS for platforms that don't have flash for Internal Trusted Storage partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800173#ifndef ITS_RAM_FS
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800174#define ITS_RAM_FS 0
David Hu6d1a9b62023-02-22 16:54:04 +0800175#endif
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800176
177/* Validate filesystem metadata every time it is read from flash */
David Hu6d1a9b62023-02-22 16:54:04 +0800178#ifndef ITS_VALIDATE_METADATA_FROM_FLASH
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800179#define ITS_VALIDATE_METADATA_FROM_FLASH 1
David Hu6d1a9b62023-02-22 16:54:04 +0800180#endif
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800181
182/* The maximum asset size to be stored in the Internal Trusted Storage */
David Hu6d1a9b62023-02-22 16:54:04 +0800183#ifndef ITS_MAX_ASSET_SIZE
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800184#define ITS_MAX_ASSET_SIZE 512
David Hu6d1a9b62023-02-22 16:54:04 +0800185#endif
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800186
187/*
188 * Size of the ITS internal data transfer buffer
189 * (Default to the max asset size so that all requests can be handled in one iteration.)
190 */
David Hu6d1a9b62023-02-22 16:54:04 +0800191#ifndef ITS_BUF_SIZE
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800192#define ITS_BUF_SIZE ITS_MAX_ASSET_SIZE
David Hu6d1a9b62023-02-22 16:54:04 +0800193#endif
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800194
195/* The maximum number of assets to be stored in the Internal Trusted Storage */
David Hu6d1a9b62023-02-22 16:54:04 +0800196#ifndef ITS_NUM_ASSETS
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800197#define ITS_NUM_ASSETS 10
David Hu6d1a9b62023-02-22 16:54:04 +0800198#endif
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800199
200/* The stack size of the Internal Trusted Storage Secure Partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800201#ifndef ITS_STACK_SIZE
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800202#define ITS_STACK_SIZE 0x720
David Hu6d1a9b62023-02-22 16:54:04 +0800203#endif
Xinyu Zhangc8fc2c02022-10-31 12:13:45 +0800204
Markus Swarowsky7de096f2023-03-16 10:32:02 +0100205/* The size of the authentication tag used when authentication/encryption of ITS files is enabled */
206#ifndef TFM_ITS_AUTH_TAG_LENGTH
207#define TFM_ITS_AUTH_TAG_LENGTH 16
208#endif
209
Gabor Tothdd6c4052024-09-13 14:06:19 +0200210/* The size of the key used when authentication/encryption of ITS files is enabled */
211#ifndef TFM_ITS_KEY_LENGTH
212#define TFM_ITS_KEY_LENGTH 16
213#endif
214
Markus Swarowsky7de096f2023-03-16 10:32:02 +0100215/* The size of the nonce used when ITS file encryption is enabled */
216#ifndef TFM_ITS_ENC_NONCE_LENGTH
217#define TFM_ITS_ENC_NONCE_LENGTH 12
218#endif
219
Xinyu Zhang07152702022-10-31 12:35:49 +0800220/* PS Partition Configs */
221
222/* Create flash FS if it doesn't exist for Protected Storage partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800223#ifndef PS_CREATE_FLASH_LAYOUT
Xinyu Zhang07152702022-10-31 12:35:49 +0800224#define PS_CREATE_FLASH_LAYOUT 1
David Hu6d1a9b62023-02-22 16:54:04 +0800225#endif
Xinyu Zhang07152702022-10-31 12:35:49 +0800226
227/* Enable emulated RAM FS for platforms that don't have flash for Protected Storage partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800228#ifndef PS_RAM_FS
Xinyu Zhang07152702022-10-31 12:35:49 +0800229#define PS_RAM_FS 0
David Hu6d1a9b62023-02-22 16:54:04 +0800230#endif
Xinyu Zhang07152702022-10-31 12:35:49 +0800231
232/* Enable rollback protection for Protected Storage partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800233#ifndef PS_ROLLBACK_PROTECTION
Xinyu Zhang07152702022-10-31 12:35:49 +0800234#define PS_ROLLBACK_PROTECTION 1
David Hu6d1a9b62023-02-22 16:54:04 +0800235#endif
Xinyu Zhang07152702022-10-31 12:35:49 +0800236
237/* Validate filesystem metadata every time it is read from flash */
David Hu6d1a9b62023-02-22 16:54:04 +0800238#ifndef PS_VALIDATE_METADATA_FROM_FLASH
Xinyu Zhang07152702022-10-31 12:35:49 +0800239#define PS_VALIDATE_METADATA_FROM_FLASH 1
David Hu6d1a9b62023-02-22 16:54:04 +0800240#endif
Xinyu Zhang07152702022-10-31 12:35:49 +0800241
242/* The maximum asset size to be stored in the Protected Storage */
David Hu6d1a9b62023-02-22 16:54:04 +0800243#ifndef PS_MAX_ASSET_SIZE
Xinyu Zhang07152702022-10-31 12:35:49 +0800244#define PS_MAX_ASSET_SIZE 2048
David Hu6d1a9b62023-02-22 16:54:04 +0800245#endif
Xinyu Zhang07152702022-10-31 12:35:49 +0800246
247/* The maximum number of assets to be stored in the Protected Storage */
David Hu6d1a9b62023-02-22 16:54:04 +0800248#ifndef PS_NUM_ASSETS
Xinyu Zhang07152702022-10-31 12:35:49 +0800249#define PS_NUM_ASSETS 10
David Hu6d1a9b62023-02-22 16:54:04 +0800250#endif
Xinyu Zhang07152702022-10-31 12:35:49 +0800251
252/* The stack size of the Protected Storage Secure Partition */
David Hu6d1a9b62023-02-22 16:54:04 +0800253#ifndef PS_STACK_SIZE
Xinyu Zhang07152702022-10-31 12:35:49 +0800254#define PS_STACK_SIZE 0x700
David Hu6d1a9b62023-02-22 16:54:04 +0800255#endif
Xinyu Zhang07152702022-10-31 12:35:49 +0800256
Chris Brand72ee4c62024-01-08 16:56:55 -0800257/* NS Agent Mailbox Partition Configs */
258
Sherry Zhang415d7132023-08-09 16:26:56 +0800259/* The stack size of the NS Agent Mailbox Secure Partition */
260#ifndef NS_AGENT_MAILBOX_STACK_SIZE
261#define NS_AGENT_MAILBOX_STACK_SIZE 0x800
262#endif
263
Chris Brandda938d82024-08-01 12:42:10 -0700264/* Whether the mailbox itself is in memory that is uncached in the SPE */
265#ifndef MAILBOX_IS_UNCACHED_S
266#define MAILBOX_IS_UNCACHED_S 1
267#endif
268
269/* Whether the mailbox itself is in memory that is uncached in the NSPE */
270#ifndef MAILBOX_IS_UNCACHED_NS
271#define MAILBOX_IS_UNCACHED_NS 1
272#endif
273
Jackson Cooper-Driver92f631c2024-10-08 13:46:42 +0000274/* Secure Test Partition Configs */
275#ifdef TFM_PARTITION_DPE
276/* DPE tests require larger test partition stack */
277#define SECURE_TEST_PARTITION_STACK_SIZE 0x3000
278#else
279#define SECURE_TEST_PARTITION_STACK_SIZE 0x0D00
280#endif
281
Chris Brand72ee4c62024-01-08 16:56:55 -0800282/* SPM Configs */
Xinyu Zhangcdbe3622022-10-31 14:34:25 +0800283
Xinyu Zhang9a6d90a2023-03-22 17:32:27 +0800284#ifdef CONFIG_TFM_CONNECTION_POOL_ENABLE
Xinyu Zhangcdbe3622022-10-31 14:34:25 +0800285/* The maximal number of secure services that are connected or requested at the same time */
David Hu6d1a9b62023-02-22 16:54:04 +0800286#ifndef CONFIG_TFM_CONN_HANDLE_MAX_NUM
Chris Brand80326b72023-03-15 13:07:49 -0700287#define CONFIG_TFM_CONN_HANDLE_MAX_NUM 8
David Hu6d1a9b62023-02-22 16:54:04 +0800288#endif
Xinyu Zhang9a6d90a2023-03-22 17:32:27 +0800289#endif
Xinyu Zhangcdbe3622022-10-31 14:34:25 +0800290
Xinyu Zhang44dbfa62022-11-23 14:22:32 +0800291/* Disable the doorbell APIs */
David Hu6d1a9b62023-02-22 16:54:04 +0800292#ifndef CONFIG_TFM_DOORBELL_API
Chris Brand80326b72023-03-15 13:07:49 -0700293#define CONFIG_TFM_DOORBELL_API 0
294#endif
295
296/* Do not run the scheduler after handling a secure interrupt if the NSPE was pre-empted */
297#ifndef CONFIG_TFM_SCHEDULE_WHEN_NS_INTERRUPTED
298#define CONFIG_TFM_SCHEDULE_WHEN_NS_INTERRUPTED 0
David Hu6d1a9b62023-02-22 16:54:04 +0800299#endif
Xinyu Zhangcdbe3622022-10-31 14:34:25 +0800300
Sherry Zhangf2a4f912023-09-12 15:38:12 +0800301/* Mask Non-Secure interrupts when executing in secure state. */
302#ifndef CONFIG_TFM_SECURE_THREAD_MASK_NS_INTERRUPT
303#define CONFIG_TFM_SECURE_THREAD_MASK_NS_INTERRUPT 0
304#endif
305
Roman Mazurak96585b82024-04-03 14:35:00 +0300306/*
307 * tfm_hal_post_partition_init_hook is called if this option is enabled.
308 * It's called by SPM right before starting scheduler.
309 */
310#ifndef CONFIG_TFM_POST_PARTITION_INIT_HOOK
311#define CONFIG_TFM_POST_PARTITION_INIT_HOOK 0
312#endif
313
Andrej Butok302da632023-07-14 12:57:08 +0200314/* Enable OTP/NV_COUNTERS emulation in RAM */
315#ifndef OTP_NV_COUNTERS_RAM_EMULATION
316#define OTP_NV_COUNTERS_RAM_EMULATION 0
317#endif
318
Aziz IDOMAR82772882024-04-09 14:19:52 +0100319/* Error Codes Configs */
320
321/* Enable unique error codes */
322#ifndef TFM_UNIQUE_ERROR_CODES
323#define TFM_UNIQUE_ERROR_CODES 0
324#endif
325
Xinyu Zhanga2fab0e2022-10-24 15:37:46 +0800326#endif /* __CONFIG_BASE_H__ */