M467: Make mbedtls H/W port removable

Some M460 chips don't support AES/SHA/ECC/RSA H/W.
Make them removable from mbedtls H/W port through '"target.macros_remove": ["MBEDTLS_CONFIG_HW_SUPPORT"]'.
pull/15337/head
Chun-Chieh Li 2022-08-08 13:08:22 +08:00
parent 1dd95465f6
commit e8dd9f43fa
2 changed files with 8 additions and 0 deletions

View File

@ -30,6 +30,8 @@
#include "platform/PlatformMutex.h"
#include "hal/trng_api.h"
#if defined(MBEDTLS_CONFIG_HW_SUPPORT)
/* Consideration for choosing proper synchronization mechanism
*
* We choose mutex to synchronize access to crypto ACC. We can guarantee:
@ -461,3 +463,5 @@ extern "C" void CRPT_IRQHandler()
RSA_CLR_INT_FLAG(CRPT);
}
}
#endif /* #if defined(MBEDTLS_CONFIG_HW_SUPPORT) */

View File

@ -21,6 +21,8 @@
#include <stdbool.h>
#if defined(MBEDTLS_CONFIG_HW_SUPPORT)
#ifdef __cplusplus
extern "C" {
#endif
@ -100,4 +102,6 @@ bool crypto_dma_buffs_overlap(const void *in_buff, size_t in_buff_size, const vo
}
#endif
#endif /* #if defined(MBEDTLS_CONFIG_HW_SUPPORT) */
#endif