summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2017-05-19 16:57:54 +0100
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2017-05-31 15:02:32 +0100
commit05fd893ea40718a0f0f81246425dfcb4b711642c (patch)
tree03985248bca3d2b59f02e556e6abcee51aead709 /drivers
parent572e14132706377530ea9f9ba4cd1fcb4b2b9479 (diff)
mbedtls: Define optimized mbed TLS heap size
mbed TLS provides the debug API `mbedtls_memory_buffer_alloc_status()` to analyse the RAM usage of the library. When RSA is selected as algorithm, the maximum heap usage in FVP and Juno has been determined empirically to be approximately 5.5 KiB. However, The default heap size used when RSA is selected is 8 KiB. This patch reduces the buffer from 8 KiB to 6 KiB so that the BSS sections of both BL1 and BL2 are 2 KiB smaller when the firmware is compiled with TBB support. Change-Id: I43878a4e7af50c97be9c8d027c728c8483f24fbf Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/auth/mbedtls/mbedtls_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/auth/mbedtls/mbedtls_common.c b/drivers/auth/mbedtls/mbedtls_common.c
index 871831e2..336e44be 100644
--- a/drivers/auth/mbedtls/mbedtls_common.c
+++ b/drivers/auth/mbedtls/mbedtls_common.c
@@ -16,7 +16,7 @@
#if (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_ECDSA)
#define MBEDTLS_HEAP_SIZE (14*1024)
#elif (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_RSA)
-#define MBEDTLS_HEAP_SIZE (8*1024)
+#define MBEDTLS_HEAP_SIZE (6*1024)
#endif
static unsigned char heap[MBEDTLS_HEAP_SIZE];