Xinyu Zhang | cdbe362 | 2022-10-31 14:34:25 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2022, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #ifndef __CONFIG_PARTITION_SPM_H__ |
| 9 | #define __CONFIG_PARTITION_SPM_H__ |
| 10 | |
| 11 | #include "config_impl.h" |
| 12 | #include "config_tfm.h" |
| 13 | |
| 14 | /* The maximal number of secure services that are connected or requested at the same time */ |
| 15 | #ifndef CONFIG_TFM_CONN_HANDLE_MAX_NUM |
Jianliang Shen | 1c3ede0 | 2022-11-22 12:39:58 +0800 | [diff] [blame] | 16 | #pragma message("CONFIG_TFM_CONN_HANDLE_MAX_NUM is defaulted to 8. Please check and set it explicitly.") |
Xinyu Zhang | cdbe362 | 2022-10-31 14:34:25 +0800 | [diff] [blame] | 17 | #define CONFIG_TFM_CONN_HANDLE_MAX_NUM 8 |
| 18 | #endif |
| 19 | |
Xinyu Zhang | 44dbfa6 | 2022-11-23 14:22:32 +0800 | [diff] [blame^] | 20 | /* Set the doorbell APIs */ |
Xinyu Zhang | cdbe362 | 2022-10-31 14:34:25 +0800 | [diff] [blame] | 21 | #ifndef CONFIG_TFM_DOORBELL_API |
Xinyu Zhang | cdbe362 | 2022-10-31 14:34:25 +0800 | [diff] [blame] | 22 | #if CONFIG_TFM_SPM_BACKEND_SFN == 1 |
Xinyu Zhang | 44dbfa6 | 2022-11-23 14:22:32 +0800 | [diff] [blame^] | 23 | #pragma message("CONFIG_TFM_DOORBELL_API is defaulted to 0 for SFN backend. Please check and set it explicitly.") |
Xinyu Zhang | cdbe362 | 2022-10-31 14:34:25 +0800 | [diff] [blame] | 24 | #define CONFIG_TFM_DOORBELL_API 0 |
Xinyu Zhang | 44dbfa6 | 2022-11-23 14:22:32 +0800 | [diff] [blame^] | 25 | #else /* CONFIG_TFM_SPM_BACKEND_SFN == 1 */ |
| 26 | #pragma message("CONFIG_TFM_DOORBELL_API is defaulted to 1 for IPC backend. Please check and set it explicitly.") |
| 27 | #define CONFIG_TFM_DOORBELL_API 1 |
| 28 | #endif /* CONFIG_TFM_SPM_BACKEND_SFN == 1 */ |
| 29 | #endif /* !CONFIG_TFM_DOORBELL_API */ |
| 30 | |
| 31 | /* Check invalid configs */ |
| 32 | #if (CONFIG_TFM_SPM_BACKEND_SFN == 1) && CONFIG_TFM_DOORBELL_API |
| 33 | #error "Invalid config: CONFIG_TFM_SPM_BACKEND_SFN AND CONFIG_TFM_DOORBELL_API!" |
Xinyu Zhang | cdbe362 | 2022-10-31 14:34:25 +0800 | [diff] [blame] | 34 | #endif |
| 35 | |
| 36 | #endif /* __CONFIG_PARTITION_SPM_H__ */ |