Skip to content

Commit b50f919

Browse files
adeaarmvaleriosetti
authored andcommitted
[zep noup] Hardcode CC3XX entry points
Manually hardcode PSA driver entry points for the CC3XX driver into psa crypto driver wrappers file (and provide missing entry point definitions if any). This is a temporary solution until the codegen framework is available for automatic integration. Signed-off-by: Antonio de Angelis <[email protected]> applied using: git am modules/tee/tf-m/trusted-firmware-m/lib/ext/mbedcrypto/\ 0005-Hardcode-CC3XX-entry-points.patch Signed-off-by: Tomi Fontanilles <[email protected]>
1 parent 5c6c718 commit b50f919

File tree

4 files changed

+436
-29
lines changed

4 files changed

+436
-29
lines changed

include/psa/crypto_driver_contexts_composites.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
/* Include the context structure definitions for those drivers that were
3131
* declared during the autogeneration process. */
3232

33+
#if defined(PSA_CRYPTO_DRIVER_CC3XX)
34+
#include "cc3xx_crypto_primitives_private.h"
35+
#endif
36+
3337
#if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
3438
#include <libtestdriver1/include/psa/crypto.h>
3539
#endif
@@ -118,6 +122,9 @@ typedef union {
118122
mbedtls_transparent_test_driver_mac_operation_t transparent_test_driver_ctx;
119123
mbedtls_opaque_test_driver_mac_operation_t opaque_test_driver_ctx;
120124
#endif
125+
#if defined(PSA_CRYPTO_DRIVER_CC3XX)
126+
cc3xx_mac_operation_t cc3xx_driver_ctx;
127+
#endif
121128
} psa_driver_mac_context_t;
122129

123130
typedef union {
@@ -126,6 +133,9 @@ typedef union {
126133
#if defined(PSA_CRYPTO_DRIVER_TEST)
127134
mbedtls_transparent_test_driver_aead_operation_t transparent_test_driver_ctx;
128135
#endif
136+
#if defined(PSA_CRYPTO_DRIVER_CC3XX)
137+
cc3xx_aead_operation_t cc3xx_driver_ctx;
138+
#endif /* PSA_CRYPTO_DRIVER_CC3XX */
129139
} psa_driver_aead_context_t;
130140

131141
typedef union {

include/psa/crypto_driver_contexts_primitives.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
/* Include the context structure definitions for those drivers that were
3030
* declared during the autogeneration process. */
3131

32+
#if defined(PSA_CRYPTO_DRIVER_CC3XX)
33+
#include "cc3xx_crypto_primitives_private.h"
34+
#endif /* PSA_CRYPTO_DRIVER_CC3XX */
35+
3236
#if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
3337
#include <libtestdriver1/include/psa/crypto.h>
3438
#endif
@@ -90,6 +94,9 @@ typedef union {
9094
#if defined(PSA_CRYPTO_DRIVER_TEST)
9195
mbedtls_transparent_test_driver_hash_operation_t test_driver_ctx;
9296
#endif
97+
#if defined(PSA_CRYPTO_DRIVER_CC3XX)
98+
cc3xx_hash_operation_t cc3xx_driver_ctx;
99+
#endif
93100
} psa_driver_hash_context_t;
94101

95102
typedef union {
@@ -99,6 +106,9 @@ typedef union {
99106
mbedtls_transparent_test_driver_cipher_operation_t transparent_test_driver_ctx;
100107
mbedtls_opaque_test_driver_cipher_operation_t opaque_test_driver_ctx;
101108
#endif
109+
#if defined(PSA_CRYPTO_DRIVER_CC3XX)
110+
cc3xx_cipher_operation_t cc3xx_driver_ctx;
111+
#endif
102112
} psa_driver_cipher_context_t;
103113

104114
#endif /* PSA_CRYPTO_DRIVER_CONTEXTS_PRIMITIVES_H */

0 commit comments

Comments
 (0)