aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorDimitris Papastamos <dimitris.papastamos@arm.com>2018-09-05 12:19:03 +0100
committerGitHub <noreply@github.com>2018-09-05 12:19:03 +0100
commit05ca725465276726cb45f8c97afef6f066238561 (patch)
treed80bbec677090060408e9cac006b8e63cd708954 /docs
parente8e0717297938c20a1d4961942996454e016e64d (diff)
parent2a579540a6fc2780035a8c759ca645564dfb2ddc (diff)
downloadplatform_external_arm-trusted-firmware-05ca725465276726cb45f8c97afef6f066238561.tar.gz
platform_external_arm-trusted-firmware-05ca725465276726cb45f8c97afef6f066238561.tar.bz2
platform_external_arm-trusted-firmware-05ca725465276726cb45f8c97afef6f066238561.zip
Merge pull request #1554 from jts-arm/mbed
Mbed TLS shared heap
Diffstat (limited to 'docs')
-rw-r--r--docs/porting-guide.rst27
1 files changed, 25 insertions, 2 deletions
diff --git a/docs/porting-guide.rst b/docs/porting-guide.rst
index de7b5dba3..84f4c9dfa 100644
--- a/docs/porting-guide.rst
+++ b/docs/porting-guide.rst
@@ -1055,7 +1055,7 @@ next image. This function is currently invoked in BL2 to flush this information
to the next BL image, when LOAD\_IMAGE\_V2 is enabled.
Function : plat\_log\_get\_prefix()
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
@@ -1066,9 +1066,32 @@ This function defines the prefix string corresponding to the `log_level` to be
prepended to all the log output from TF-A. The `log_level` (argument) will
correspond to one of the standard log levels defined in debug.h. The platform
can override the common implementation to define a different prefix string for
-the log output. The implementation should be robust to future changes that
+the log output. The implementation should be robust to future changes that
increase the number of log levels.
+Function : plat\_get\_mbedtls\_heap()
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+ Arguments : void **heap_addr, size_t *heap_size
+ 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.
+
+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
---------------------------------------------