diff options
author | Antonio Niño Díaz <antonio.ninodiaz@arm.com> | 2019-03-05 10:39:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-05 10:39:14 +0000 |
commit | f009c5f312476cdfc0704a3c8a9c66b7fe5b6586 (patch) | |
tree | 9a53cf327145c3ebe688cfcf87284c075b3c4027 /drivers | |
parent | bf9e90c916b7220dfc0df18b26cd1be3b5b4ad5e (diff) | |
parent | 17e1335c893bce16883c8e76b251e1013c6ec001 (diff) | |
download | platform_external_arm-trusted-firmware-f009c5f312476cdfc0704a3c8a9c66b7fe5b6586.tar.gz platform_external_arm-trusted-firmware-f009c5f312476cdfc0704a3c8a9c66b7fe5b6586.tar.bz2 platform_external_arm-trusted-firmware-f009c5f312476cdfc0704a3c8a9c66b7fe5b6586.zip |
Merge pull request #1847 from jts-arm/mbedtls
Remove Mbed TLS dependency from plat_bl_common.c
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/auth/mbedtls/mbedtls_common.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/auth/mbedtls/mbedtls_common.c b/drivers/auth/mbedtls/mbedtls_common.c index b6d02fd10..cdb504295 100644 --- a/drivers/auth/mbedtls/mbedtls_common.c +++ b/drivers/auth/mbedtls/mbedtls_common.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -16,6 +16,8 @@ #include <drivers/auth/mbedtls/mbedtls_config.h> #include <plat/common/platform.h> +#pragma weak plat_get_mbedtls_heap + static void cleanup(void) { ERROR("EXIT from BL2\n"); @@ -54,3 +56,19 @@ void mbedtls_init(void) ready = 1; } } + +/* + * The following default implementation of the function simply returns the + * by default allocated heap. + */ +int plat_get_mbedtls_heap(void **heap_addr, size_t *heap_size) +{ + static unsigned char heap[TF_MBEDTLS_HEAP_SIZE]; + + assert(heap_addr != NULL); + assert(heap_size != NULL); + + *heap_addr = heap; + *heap_size = sizeof(heap); + return 0; +} |