blob: ea00c1cf1005ebf1e698947139f95d4114dd7645 [file] [log] [blame]
Miklos Balintbf25a402018-06-14 17:43:54 +02001/*
Mate Toth-Pal2a6f8c22018-12-13 16:37:17 +01002 * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
Miklos Balintbf25a402018-06-14 17:43:54 +02003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
Mate Toth-Pal36f21842018-11-08 16:12:51 +01008{{utilities.donotedit_warning}}
Miklos Balintbf25a402018-06-14 17:43:54 +02009
10#include "tfm_secure_api.h"
11#include "tfm_api.h"
12#include "secure_fw/spm/spm_partition_defs.h"
13
Mate Toth-Pal36f21842018-11-08 16:12:51 +010014{% for manifest in manifests %}
15 {% if manifest.attr.conditional %}
16#ifdef {{manifest.attr.conditional}}
17 {% endif %}
18/******** {{manifest.manifest.name}} ********/
19 {% for sec_func in manifest.manifest.secure_functions %}
20psa_status_t {{sec_func.tfm_symbol}}(struct psa_invec *, size_t, struct psa_outvec *, size_t);
21 {% endfor %}
22 {% if manifest.attr.conditional %}
23#endif /* {{manifest.attr.conditional}} */
24 {% endif %}
Miklos Balintbf25a402018-06-14 17:43:54 +020025
Mate Toth-Pal36f21842018-11-08 16:12:51 +010026{% endfor %}
Miklos Balintbf25a402018-06-14 17:43:54 +020027
28#define TFM_VENEER_FUNCTION(partition_name, sfn_name) \
29 __tfm_secure_gateway_attributes__ \
Mate Toth-Pal2a6f8c22018-12-13 16:37:17 +010030 psa_status_t tfm_##sfn_name##_veneer(struct psa_invec *in_vec, \
31 size_t in_len, \
32 struct psa_outvec *out_vec, \
33 size_t out_len) \
Miklos Balintbf25a402018-06-14 17:43:54 +020034 { \
Mate Toth-Palb8ce0dd2018-07-25 10:18:34 +020035 TFM_CORE_IOVEC_SFN_REQUEST(partition_name##_ID, \
36 sfn_name, \
37 in_vec, in_len, out_vec, out_len); \
Miklos Balintbf25a402018-06-14 17:43:54 +020038 }
39
Mate Toth-Pal36f21842018-11-08 16:12:51 +010040{% for manifest in manifests %}
41 {% if manifest.attr.conditional %}
42#ifdef {{manifest.attr.conditional}}
43 {% endif %}
44/******** {{manifest.manifest.name}} ********/
45 {% for sec_func in manifest.manifest.secure_functions %}
46TFM_VENEER_FUNCTION({{manifest.manifest.name}}, {{sec_func.tfm_symbol}})
47 {% endfor %}
48 {% if manifest.attr.conditional %}
49#endif /* {{manifest.attr.conditional}} */
50 {% endif %}
Miklos Balintbf25a402018-06-14 17:43:54 +020051
Mate Toth-Pal36f21842018-11-08 16:12:51 +010052{% endfor %}