summaryrefslogtreecommitdiff
path: root/lib/fconf
diff options
context:
space:
mode:
authorLouis Mayencourt <louis.mayencourt@arm.com>2019-10-01 10:45:14 +0100
committerLouis Mayencourt <louis.mayencourt@arm.com>2020-02-07 13:51:32 +0000
commit6c9723176019cb5327d5be0e952583809b714f5f (patch)
tree33c0efea4dfb855e56b9aff9a999682ecf5b02a3 /lib/fconf
parentce8528411a95d4e988844d5d16b5af2828f9f407 (diff)
downloadarm-trusted-firmware-6c9723176019cb5327d5be0e952583809b714f5f.tar.gz
fconf: Add mbedtls shared heap as property
Use the firmware configuration framework in arm dynamic configuration to retrieve mbedtls heap information between bl1 and bl2. For this, a new fconf getter is added to expose the device tree base address and size. Change-Id: Ifa5ac9366ae100e2cdd1f4c8e85fc591b170f4b6 Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
Diffstat (limited to 'lib/fconf')
-rw-r--r--lib/fconf/fconf_tbbr_getter.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/fconf/fconf_tbbr_getter.c b/lib/fconf/fconf_tbbr_getter.c
index 29f67caec..c6df9c876 100644
--- a/lib/fconf/fconf_tbbr_getter.c
+++ b/lib/fconf/fconf_tbbr_getter.c
@@ -47,8 +47,27 @@ int fconf_populate_tbbr_dyn_config(uintptr_t config)
dyn_disable_auth();
#endif
+ /* Retrieve the Mbed TLS heap details from the DTB */
+ err = fdtw_read_cells(dtb, node,
+ "mbedtls_heap_addr", 2, &tbbr_dyn_config.mbedtls_heap_addr);
+ if (err < 0) {
+ ERROR("FCONF: Read cell failed for mbedtls_heap\n");
+ return err;
+ }
+
+ err = fdtw_read_cells(dtb, node,
+ "mbedtls_heap_size", 1, &tbbr_dyn_config.mbedtls_heap_size);
+ if (err < 0) {
+ ERROR("FCONF: Read cell failed for mbedtls_heap\n");
+ return err;
+ }
+
VERBOSE("FCONF:tbbr.disable_auth cell found with value = %d\n",
tbbr_dyn_config.disable_auth);
+ VERBOSE("FCONF:tbbr.mbedtls_heap_addr cell found with value = %p\n",
+ tbbr_dyn_config.mbedtls_heap_addr);
+ VERBOSE("FCONF:tbbr.mbedtls_heap_size cell found with value = %zu\n",
+ tbbr_dyn_config.mbedtls_heap_size);
return 0;
}