mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00
Merge "fix(psa): increase psa-mbedtls heap size for rsa" into integration
This commit is contained in:
commit
0863511b68
3 changed files with 20 additions and 7 deletions
|
@ -132,18 +132,15 @@
|
|||
#endif
|
||||
|
||||
/*
|
||||
* Determine Mbed TLS heap size
|
||||
* 13312 = 13*1024
|
||||
* 11264 = 11*1024
|
||||
* 7168 = 7*1024
|
||||
* Determine Mbed TLS heap size.
|
||||
*/
|
||||
#if TF_MBEDTLS_USE_ECDSA
|
||||
#define TF_MBEDTLS_HEAP_SIZE U(13312)
|
||||
#define TF_MBEDTLS_HEAP_SIZE U(13 * 1024)
|
||||
#elif TF_MBEDTLS_USE_RSA
|
||||
#if TF_MBEDTLS_KEY_SIZE <= 2048
|
||||
#define TF_MBEDTLS_HEAP_SIZE U(7168)
|
||||
#define TF_MBEDTLS_HEAP_SIZE U(7 * 1024)
|
||||
#else
|
||||
#define TF_MBEDTLS_HEAP_SIZE U(11264)
|
||||
#define TF_MBEDTLS_HEAP_SIZE U(11 * 1024)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -26,4 +26,12 @@
|
|||
*/
|
||||
#define MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
|
||||
|
||||
/*
|
||||
* Override heap size for PSA Crypto when RSA key size > 2048.
|
||||
*/
|
||||
#if TF_MBEDTLS_USE_RSA && TF_MBEDTLS_KEY_SIZE > 2048
|
||||
#undef TF_MBEDTLS_HEAP_SIZE
|
||||
#define TF_MBEDTLS_HEAP_SIZE U(12 * 1024)
|
||||
#endif
|
||||
|
||||
#endif /* PSA_MBEDTLS_CONFIG_H */
|
||||
|
|
|
@ -26,4 +26,12 @@
|
|||
*/
|
||||
#define MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
|
||||
|
||||
/*
|
||||
* Override heap size for PSA Crypto when RSA key size > 2048.
|
||||
*/
|
||||
#if TF_MBEDTLS_USE_RSA && TF_MBEDTLS_KEY_SIZE > 2048
|
||||
#undef TF_MBEDTLS_HEAP_SIZE
|
||||
#define TF_MBEDTLS_HEAP_SIZE U(12 * 1024)
|
||||
#endif
|
||||
|
||||
#endif /* PLAT_ARM_PSA_MBEDTLS_CONFIG_H */
|
||||
|
|
Loading…
Add table
Reference in a new issue