Miklos Balint | bf25a40 | 2018-06-14 17:43:54 +0200 | [diff] [blame] | 1 | /* |
Mate Toth-Pal | 2a6f8c2 | 2018-12-13 16:37:17 +0100 | [diff] [blame] | 2 | * Copyright (c) 2018-2019, Arm Limited. All rights reserved. |
Miklos Balint | bf25a40 | 2018-06-14 17:43:54 +0200 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | @!GENERATOR_DONOTEDIT_WARNING!@ |
| 9 | |
| 10 | #include "tfm_secure_api.h" |
| 11 | #include "tfm_api.h" |
| 12 | #include "secure_fw/spm/spm_partition_defs.h" |
| 13 | |
| 14 | @!GENERATOR_BLOCK_START!@ |
| 15 | @!GENERATOR_CONDITIONAL_START!@ @@attr.conditional@@ |
| 16 | #ifdef @@attr.conditional@@ |
| 17 | @!GENERATOR_CONDITIONAL_END!@ |
Edison Ai | 807fedb | 2019-03-07 11:22:03 +0800 | [diff] [blame^] | 18 | /******** @@manifest.name@@ ********/ |
Mate Toth-Pal | 2a6f8c2 | 2018-12-13 16:37:17 +0100 | [diff] [blame] | 19 | psa_status_t @@manifest.secure_functions.tfm_symbol@@(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
Miklos Balint | bf25a40 | 2018-06-14 17:43:54 +0200 | [diff] [blame] | 20 | @!GENERATOR_CONDITIONAL_START!@ @@attr.conditional@@ |
| 21 | #endif /* @@attr.conditional@@ */ |
| 22 | @!GENERATOR_CONDITIONAL_END!@ |
| 23 | |
| 24 | @!GENERATOR_BLOCK_END!@ |
| 25 | |
| 26 | #define TFM_VENEER_FUNCTION(partition_name, sfn_name) \ |
| 27 | __tfm_secure_gateway_attributes__ \ |
Mate Toth-Pal | 2a6f8c2 | 2018-12-13 16:37:17 +0100 | [diff] [blame] | 28 | psa_status_t tfm_##sfn_name##_veneer(struct psa_invec *in_vec, \ |
| 29 | size_t in_len, \ |
| 30 | struct psa_outvec *out_vec, \ |
| 31 | size_t out_len) \ |
Miklos Balint | bf25a40 | 2018-06-14 17:43:54 +0200 | [diff] [blame] | 32 | { \ |
Mate Toth-Pal | b8ce0dd | 2018-07-25 10:18:34 +0200 | [diff] [blame] | 33 | TFM_CORE_IOVEC_SFN_REQUEST(partition_name##_ID, \ |
| 34 | sfn_name, \ |
| 35 | in_vec, in_len, out_vec, out_len); \ |
Miklos Balint | bf25a40 | 2018-06-14 17:43:54 +0200 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | @!GENERATOR_BLOCK_START!@ |
| 39 | @!GENERATOR_CONDITIONAL_START!@ @@attr.conditional@@ |
| 40 | #ifdef @@attr.conditional@@ |
| 41 | @!GENERATOR_CONDITIONAL_END!@ |
Edison Ai | 807fedb | 2019-03-07 11:22:03 +0800 | [diff] [blame^] | 42 | /******** @@manifest.name@@ ********/ |
| 43 | TFM_VENEER_FUNCTION(@@manifest.name@@, @@manifest.secure_functions.tfm_symbol@@) |
Miklos Balint | bf25a40 | 2018-06-14 17:43:54 +0200 | [diff] [blame] | 44 | @!GENERATOR_CONDITIONAL_START!@ @@attr.conditional@@ |
| 45 | #endif /* @@attr.conditional@@ */ |
| 46 | @!GENERATOR_CONDITIONAL_END!@ |
| 47 | |
| 48 | @!GENERATOR_BLOCK_END!@ |