Prepare Mbed TLS drivers for shared heap
authorJohn Tsichritzis <john.tsichritzis@arm.com>
Thu, 7 Jun 2018 15:31:34 +0000 (16:31 +0100)
committerJohn Tsichritzis <john.tsichritzis@arm.com>
Tue, 4 Sep 2018 09:32:06 +0000 (10:32 +0100)
commit6d01a463348b04af2afa3c00579ebc6ecd12eaf1
tree01f023aa03e4631d8ad6a30beaea6757e8c64bb6
parent708531cf0541295f50d81b0bfa3441e757a00348
Prepare Mbed TLS drivers for shared heap

The Mbed TLS drivers, in order to work, need a heap for internal usage.
This heap, instead of being directly referenced by the drivers, now it
is being accessed indirectly through a pointer. Also, the heap, instead
of being part of the drivers, now it is being received through the
plat_get_mbedtls_heap() function. This function requests a heap from the
current BL image which utilises the Mbed TLS drivers.

Those changes create the opportunity for the Mbed TLS heap to be shared
among different images, thus saving memory. A default heap
implementation is provided but it can be overridden by a platform
specific, optimised implemenetation.

Change-Id: I286a1f10097a9cdcbcd312201eea576c18d157fa
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
docs/porting-guide.rst
drivers/auth/mbedtls/mbedtls_common.c
include/drivers/auth/mbedtls/mbedtls_config.h
include/plat/common/platform.h
plat/common/plat_bl_common.c