Sherry Zhang | f58f2bd | 2022-01-10 17:21:11 +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 | |
| 9 | ########{{utilities.donotedit_warning}}######## |
| 10 | |
| 11 | if(TFM_PSA_API) |
| 12 | {% if partition_statistics['ipc_partition_num'] > 0 |
| 13 | and partition_statistics['sfn_partition_num'] == 0 %} |
| 14 | set(CONFIG_TFM_SPM_BACKEND_IPC ON PARENT_SCOPE) |
| 15 | |
| 16 | if(TFM_ISOLATION_LEVEL GREATER 1) |
| 17 | set(CONFIG_TFM_PSA_API_SUPERVISOR_CALL ON PARENT_SCOPE) |
| 18 | else() |
| 19 | set(CONFIG_TFM_PSA_API_CROSS_CALL ON PARENT_SCOPE) |
| 20 | endif() |
| 21 | {% elif partition_statistics['sfn_partition_num'] > 0 |
| 22 | and partition_statistics['ipc_partition_num'] == 0 %} |
| 23 | set(CONFIG_TFM_SPM_BACKEND_SFN ON PARENT_SCOPE) |
| 24 | set(CONFIG_TFM_PSA_API_SFN_CALL ON PARENT_SCOPE) |
| 25 | |
| 26 | if(TFM_ISOLATION_LEVEL GREATER 1) |
| 27 | message(FATAL_ERROR "High isolation level SFN model is not supported.") |
| 28 | endif() |
| 29 | {% elif partition_statistics['sfn_partition_num'] > 0 |
| 30 | and partition_statistics['ipc_partition_num'] > 0 %} |
| 31 | message(FATAL_ERROR "IPC and SFN co-work not supported yet.") |
| 32 | {% else %} |
| 33 | message(FATAL_ERROR "Invalid partition number input, check configurations.") |
| 34 | {% endif %} |
| 35 | |
| 36 | if((CONFIG_TFM_SPE_FP GREATER 0) AND CONFIG_TFM_SPM_BACKEND_SFN) |
| 37 | message(FATAL_ERROR "FP is not supported for SFN model.") |
| 38 | endif() |
| 39 | endif() |