diff options
author | John Tsichritzis <john.tsichritzis@arm.com> | 2018-07-30 13:41:52 +0100 |
---|---|---|
committer | John Tsichritzis <john.tsichritzis@arm.com> | 2018-09-04 10:32:22 +0100 |
commit | ba597da7fd23d34e8867342f1dfee7925991300c (patch) | |
tree | 4c77f781eadf9d68aa91ba8c7442e3fef1e1c917 /docs | |
parent | 6d01a463348b04af2afa3c00579ebc6ecd12eaf1 (diff) | |
download | platform_external_arm-trusted-firmware-ba597da7fd23d34e8867342f1dfee7925991300c.tar.gz platform_external_arm-trusted-firmware-ba597da7fd23d34e8867342f1dfee7925991300c.tar.bz2 platform_external_arm-trusted-firmware-ba597da7fd23d34e8867342f1dfee7925991300c.zip |
Support shared Mbed TLS heap for FVP
This patch introduces the shared Mbed TLS heap optimisation for Arm
platforms. The objective is the Mbed TLS heap to be shared between BL1
and BL2 so as to not allocate the heap memory twice. To achieve that,
the patch introduces all the necessary helpers for implementing this
optimisation. It also applies it for FVP.
Change-Id: I6d85eaa1361517b7490956b2ac50f5fa0d0bb008
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/porting-guide.rst | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/docs/porting-guide.rst b/docs/porting-guide.rst index 83fac2860..84f4c9dfa 100644 --- a/docs/porting-guide.rst +++ b/docs/porting-guide.rst @@ -1075,21 +1075,22 @@ Function : plat\_get\_mbedtls\_heap() :: Arguments : void **heap_addr, size_t *heap_size - Return : int + Return : int This function is invoked during Mbed TLS library initialisation to get a heap, by means of a starting address and a size. This heap will then be used -internally by the Mbed TLS library. The heap is requested from the current -BL stage, i.e. the current BL image inside which Mbed TLS is used. - -The default implementation allocates a new heap every time Mbed TLS gets -initialised. This means that a new heap is statically allocated inside -every image (i.e. every BL stage) that utilises Mbed TLS. In the default -implementation, this function returns the address and size of this default -heap. However, by overriding the default implementation, platforms have the ability -to optimise memory usage. - -On success it returns 0 and a negative error code otherwise. +internally by the Mbed TLS library. The heap is requested from the current BL +stage, i.e. the current BL image inside which Mbed TLS is used. + +In the default implementation a heap is statically allocated inside every image +(i.e. every BL stage) that utilises Mbed TLS. So, in this case, the function +simply returns the address and size of this "pre-allocated" heap. However, by +overriding the default implementation, platforms have the potential to optimise +memory usage. For example, on some Arm platforms, the Mbed TLS heap is shared +between BL1 and BL2 stages and, thus, the necessary space is not reserved +twice. + +On success the function should return 0 and a negative error code otherwise. Modifications specific to a Boot Loader stage --------------------------------------------- |