Miklos Balint | bf25a40 | 2018-06-14 17:43:54 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | /*********** WARNING: This is an auto-generated file. Do not edit! ***********/ |
| 9 | |
| 10 | #include "tfm_secure_api.h" |
| 11 | #include "tfm_api.h" |
| 12 | #include "secure_fw/spm/spm_partition_defs.h" |
| 13 | |
| 14 | /******** TFM_SP_STORAGE ********/ |
| 15 | int32_t sst_am_create(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 16 | int32_t sst_am_get_info(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 17 | int32_t sst_am_get_attributes(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 18 | int32_t sst_am_set_attributes(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 19 | int32_t sst_am_read(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 20 | int32_t sst_am_write(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 21 | int32_t sst_am_delete(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 22 | |
| 23 | /******** TFM_SP_AUDIT_LOG ********/ |
| 24 | int32_t audit_core_retrieve_record(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 25 | int32_t audit_core_add_record(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 26 | int32_t audit_core_get_info(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 27 | int32_t audit_core_get_record_info(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 28 | int32_t audit_core_delete_record(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 29 | |
| 30 | /******** TFM_SP_CRYPTO ********/ |
| 31 | int32_t tfm_crypto_import_key(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 32 | int32_t tfm_crypto_destroy_key(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 33 | int32_t tfm_crypto_get_key_information(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 34 | int32_t tfm_crypto_export_key(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 35 | int32_t tfm_crypto_encrypt_set_iv(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 36 | int32_t tfm_crypto_encrypt_setup(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 37 | int32_t tfm_crypto_decrypt_setup(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 38 | int32_t tfm_crypto_cipher_update_wrapper(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 39 | int32_t tfm_crypto_cipher_abort(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 40 | int32_t tfm_crypto_cipher_finish(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 41 | int32_t tfm_crypto_hash_start(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 42 | int32_t tfm_crypto_hash_update(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 43 | int32_t tfm_crypto_hash_finish(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 44 | int32_t tfm_crypto_hash_verify(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 45 | int32_t tfm_crypto_hash_abort(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 46 | |
| 47 | /******** TFM_SP_PLATFORM ********/ |
| 48 | int32_t platform_sp_system_reset(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 49 | |
| 50 | /******** TFM_SP_INITIAL_ATTESTATION ********/ |
| 51 | int32_t initial_attest_get_token(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 52 | |
| 53 | #ifdef TFM_PARTITION_TEST_CORE |
| 54 | /******** TFM_SP_CORE_TEST ********/ |
| 55 | int32_t spm_core_test_sfn(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 56 | int32_t spm_core_test_sfn_init_success(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 57 | int32_t spm_core_test_sfn_direct_recursion(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 58 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 59 | |
| 60 | #ifdef TFM_PARTITION_TEST_CORE |
| 61 | /******** TFM_SP_CORE_TEST_2 ********/ |
| 62 | int32_t spm_core_test_2_slave_service(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 63 | int32_t spm_core_test_2_sfn_invert(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 64 | int32_t spm_core_test_2_check_caller_client_id(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 65 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 66 | |
| 67 | #ifdef TFM_PARTITION_TEST_SST |
| 68 | /******** TFM_SP_SST_TEST_PARTITION ********/ |
| 69 | int32_t sst_test_service_sfn_setup(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 70 | int32_t sst_test_service_sfn_dummy_encrypt(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 71 | int32_t sst_test_service_sfn_dummy_decrypt(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 72 | int32_t sst_test_service_sfn_clean(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 73 | #endif /* TFM_PARTITION_TEST_SST */ |
| 74 | |
| 75 | #ifdef TFM_PARTITION_TEST_SECURE_SERVICES |
| 76 | /******** TFM_SP_SECURE_TEST_PARTITION ********/ |
| 77 | int32_t tfm_secure_client_service_sfn_run_tests(struct psa_invec *, size_t, struct psa_outvec *, size_t); |
| 78 | #endif /* TFM_PARTITION_TEST_SECURE_SERVICES */ |
| 79 | |
| 80 | |
| 81 | #define TFM_VENEER_FUNCTION(partition_name, sfn_name) \ |
| 82 | __tfm_secure_gateway_attributes__ \ |
| 83 | int32_t tfm_##sfn_name##_veneer(struct psa_invec *in_vec, \ |
| 84 | size_t in_len, \ |
| 85 | struct psa_outvec *out_vec, \ |
| 86 | size_t out_len) \ |
| 87 | { \ |
| 88 | TFM_CORE_SFN_REQUEST(partition_name##_ID, \ |
| 89 | sfn_name, \ |
| 90 | in_vec, in_len, out_vec, out_len); \ |
| 91 | } |
| 92 | |
| 93 | /******** TFM_SP_STORAGE ********/ |
| 94 | TFM_VENEER_FUNCTION(TFM_SP_STORAGE, sst_am_create) |
| 95 | TFM_VENEER_FUNCTION(TFM_SP_STORAGE, sst_am_get_info) |
| 96 | TFM_VENEER_FUNCTION(TFM_SP_STORAGE, sst_am_get_attributes) |
| 97 | TFM_VENEER_FUNCTION(TFM_SP_STORAGE, sst_am_set_attributes) |
| 98 | TFM_VENEER_FUNCTION(TFM_SP_STORAGE, sst_am_read) |
| 99 | TFM_VENEER_FUNCTION(TFM_SP_STORAGE, sst_am_write) |
| 100 | TFM_VENEER_FUNCTION(TFM_SP_STORAGE, sst_am_delete) |
| 101 | |
| 102 | /******** TFM_SP_AUDIT_LOG ********/ |
| 103 | TFM_VENEER_FUNCTION(TFM_SP_AUDIT_LOG, audit_core_retrieve_record) |
| 104 | TFM_VENEER_FUNCTION(TFM_SP_AUDIT_LOG, audit_core_add_record) |
| 105 | TFM_VENEER_FUNCTION(TFM_SP_AUDIT_LOG, audit_core_get_info) |
| 106 | TFM_VENEER_FUNCTION(TFM_SP_AUDIT_LOG, audit_core_get_record_info) |
| 107 | TFM_VENEER_FUNCTION(TFM_SP_AUDIT_LOG, audit_core_delete_record) |
| 108 | |
| 109 | /******** TFM_SP_CRYPTO ********/ |
| 110 | TFM_VENEER_FUNCTION(TFM_SP_CRYPTO, tfm_crypto_import_key) |
| 111 | TFM_VENEER_FUNCTION(TFM_SP_CRYPTO, tfm_crypto_destroy_key) |
| 112 | TFM_VENEER_FUNCTION(TFM_SP_CRYPTO, tfm_crypto_get_key_information) |
| 113 | TFM_VENEER_FUNCTION(TFM_SP_CRYPTO, tfm_crypto_export_key) |
| 114 | TFM_VENEER_FUNCTION(TFM_SP_CRYPTO, tfm_crypto_encrypt_set_iv) |
| 115 | TFM_VENEER_FUNCTION(TFM_SP_CRYPTO, tfm_crypto_encrypt_setup) |
| 116 | TFM_VENEER_FUNCTION(TFM_SP_CRYPTO, tfm_crypto_decrypt_setup) |
| 117 | TFM_VENEER_FUNCTION(TFM_SP_CRYPTO, tfm_crypto_cipher_update_wrapper) |
| 118 | TFM_VENEER_FUNCTION(TFM_SP_CRYPTO, tfm_crypto_cipher_abort) |
| 119 | TFM_VENEER_FUNCTION(TFM_SP_CRYPTO, tfm_crypto_cipher_finish) |
| 120 | TFM_VENEER_FUNCTION(TFM_SP_CRYPTO, tfm_crypto_hash_start) |
| 121 | TFM_VENEER_FUNCTION(TFM_SP_CRYPTO, tfm_crypto_hash_update) |
| 122 | TFM_VENEER_FUNCTION(TFM_SP_CRYPTO, tfm_crypto_hash_finish) |
| 123 | TFM_VENEER_FUNCTION(TFM_SP_CRYPTO, tfm_crypto_hash_verify) |
| 124 | TFM_VENEER_FUNCTION(TFM_SP_CRYPTO, tfm_crypto_hash_abort) |
| 125 | |
| 126 | /******** TFM_SP_PLATFORM ********/ |
| 127 | TFM_VENEER_FUNCTION(TFM_SP_PLATFORM, platform_sp_system_reset) |
| 128 | |
| 129 | /******** TFM_SP_INITIAL_ATTESTATION ********/ |
| 130 | TFM_VENEER_FUNCTION(TFM_SP_INITIAL_ATTESTATION, initial_attest_get_token) |
| 131 | |
| 132 | #ifdef TFM_PARTITION_TEST_CORE |
| 133 | /******** TFM_SP_CORE_TEST ********/ |
| 134 | TFM_VENEER_FUNCTION(TFM_SP_CORE_TEST, spm_core_test_sfn) |
| 135 | TFM_VENEER_FUNCTION(TFM_SP_CORE_TEST, spm_core_test_sfn_init_success) |
| 136 | TFM_VENEER_FUNCTION(TFM_SP_CORE_TEST, spm_core_test_sfn_direct_recursion) |
| 137 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 138 | |
| 139 | #ifdef TFM_PARTITION_TEST_CORE |
| 140 | /******** TFM_SP_CORE_TEST_2 ********/ |
| 141 | TFM_VENEER_FUNCTION(TFM_SP_CORE_TEST_2, spm_core_test_2_slave_service) |
| 142 | TFM_VENEER_FUNCTION(TFM_SP_CORE_TEST_2, spm_core_test_2_sfn_invert) |
| 143 | TFM_VENEER_FUNCTION(TFM_SP_CORE_TEST_2, spm_core_test_2_check_caller_client_id) |
| 144 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 145 | |
| 146 | #ifdef TFM_PARTITION_TEST_SST |
| 147 | /******** TFM_SP_SST_TEST_PARTITION ********/ |
| 148 | TFM_VENEER_FUNCTION(TFM_SP_SST_TEST_PARTITION, sst_test_service_sfn_setup) |
| 149 | TFM_VENEER_FUNCTION(TFM_SP_SST_TEST_PARTITION, sst_test_service_sfn_dummy_encrypt) |
| 150 | TFM_VENEER_FUNCTION(TFM_SP_SST_TEST_PARTITION, sst_test_service_sfn_dummy_decrypt) |
| 151 | TFM_VENEER_FUNCTION(TFM_SP_SST_TEST_PARTITION, sst_test_service_sfn_clean) |
| 152 | #endif /* TFM_PARTITION_TEST_SST */ |
| 153 | |
| 154 | #ifdef TFM_PARTITION_TEST_SECURE_SERVICES |
| 155 | /******** TFM_SP_SECURE_TEST_PARTITION ********/ |
| 156 | TFM_VENEER_FUNCTION(TFM_SP_SECURE_TEST_PARTITION, tfm_secure_client_service_sfn_run_tests) |
| 157 | #endif /* TFM_PARTITION_TEST_SECURE_SERVICES */ |
| 158 | |