blob: b58b2f33635dbceeb47b097bd366a5102f453100 [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"
Miklos Balintbf25a402018-06-14 17:43:54 +020011#include "secure_fw/spm/spm_partition_defs.h"
12
Mate Toth-Pal36f21842018-11-08 16:12:51 +010013{% for manifest in manifests %}
14 {% if manifest.attr.conditional %}
15#ifdef {{manifest.attr.conditional}}
16 {% endif %}
17/******** {{manifest.manifest.name}} ********/
18 {% for sec_func in manifest.manifest.secure_functions %}
Antonio de Angelis09586c52019-03-27 16:35:31 +000019psa_status_t {{sec_func.tfm_symbol}}(psa_invec *, size_t, psa_outvec *, size_t);
Mate Toth-Pal36f21842018-11-08 16:12:51 +010020 {% endfor %}
21 {% if manifest.attr.conditional %}
22#endif /* {{manifest.attr.conditional}} */
23 {% endif %}
Miklos Balintbf25a402018-06-14 17:43:54 +020024
Mate Toth-Pal36f21842018-11-08 16:12:51 +010025{% endfor %}
Miklos Balintbf25a402018-06-14 17:43:54 +020026
27#define TFM_VENEER_FUNCTION(partition_name, sfn_name) \
28 __tfm_secure_gateway_attributes__ \
Antonio de Angelis09586c52019-03-27 16:35:31 +000029 psa_status_t tfm_##sfn_name##_veneer(psa_invec *in_vec, \
Mate Toth-Pal2a6f8c22018-12-13 16:37:17 +010030 size_t in_len, \
Antonio de Angelis09586c52019-03-27 16:35:31 +000031 psa_outvec *out_vec, \
Mate Toth-Pal2a6f8c22018-12-13 16:37:17 +010032 size_t out_len) \
Miklos Balintbf25a402018-06-14 17:43:54 +020033 { \
Mate Toth-Palb8ce0dd2018-07-25 10:18:34 +020034 TFM_CORE_IOVEC_SFN_REQUEST(partition_name##_ID, \
TTornblomc640e072019-06-14 14:33:51 +020035 (void *) sfn_name, \
Mate Toth-Palb8ce0dd2018-07-25 10:18:34 +020036 in_vec, in_len, out_vec, out_len); \
Miklos Balintbf25a402018-06-14 17:43:54 +020037 }
38
Mate Toth-Pal36f21842018-11-08 16:12:51 +010039{% for manifest in manifests %}
40 {% if manifest.attr.conditional %}
41#ifdef {{manifest.attr.conditional}}
42 {% endif %}
43/******** {{manifest.manifest.name}} ********/
44 {% for sec_func in manifest.manifest.secure_functions %}
45TFM_VENEER_FUNCTION({{manifest.manifest.name}}, {{sec_func.tfm_symbol}})
46 {% endfor %}
47 {% if manifest.attr.conditional %}
48#endif /* {{manifest.attr.conditional}} */
49 {% endif %}
Miklos Balintbf25a402018-06-14 17:43:54 +020050
Mate Toth-Pal36f21842018-11-08 16:12:51 +010051{% endfor %}