blob: 6d7172d35e63cbd1852a72fb61ad77b68e484da6 [file] [log] [blame]
Xinyu Zhangcdbe3622022-10-31 14:34:25 +08001/*
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 Shen1c3ede02022-11-22 12:39:58 +080016#pragma message("CONFIG_TFM_CONN_HANDLE_MAX_NUM is defaulted to 8. Please check and set it explicitly.")
Xinyu Zhangcdbe3622022-10-31 14:34:25 +080017#define CONFIG_TFM_CONN_HANDLE_MAX_NUM 8
18#endif
19
Xinyu Zhang44dbfa62022-11-23 14:22:32 +080020/* Set the doorbell APIs */
Xinyu Zhangcdbe3622022-10-31 14:34:25 +080021#ifndef CONFIG_TFM_DOORBELL_API
Xinyu Zhangcdbe3622022-10-31 14:34:25 +080022#if CONFIG_TFM_SPM_BACKEND_SFN == 1
Xinyu Zhang44dbfa62022-11-23 14:22:32 +080023#pragma message("CONFIG_TFM_DOORBELL_API is defaulted to 0 for SFN backend. Please check and set it explicitly.")
Xinyu Zhangcdbe3622022-10-31 14:34:25 +080024#define CONFIG_TFM_DOORBELL_API 0
Xinyu Zhang44dbfa62022-11-23 14:22:32 +080025#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 Zhangcdbe3622022-10-31 14:34:25 +080034#endif
35
36#endif /* __CONFIG_PARTITION_SPM_H__ */