diff options
author | Dimitris Papastamos <dimitris.papastamos@arm.com> | 2018-09-05 12:19:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-05 12:19:03 +0100 |
commit | 05ca725465276726cb45f8c97afef6f066238561 (patch) | |
tree | d80bbec677090060408e9cac006b8e63cd708954 /include/plat | |
parent | e8e0717297938c20a1d4961942996454e016e64d (diff) | |
parent | 2a579540a6fc2780035a8c759ca645564dfb2ddc (diff) | |
download | platform_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 'include/plat')
-rw-r--r-- | include/plat/arm/board/common/board_arm_def.h | 2 | ||||
-rw-r--r-- | include/plat/arm/common/arm_def.h | 11 | ||||
-rw-r--r-- | include/plat/arm/common/arm_dyn_cfg_helpers.h | 7 | ||||
-rw-r--r-- | include/plat/arm/common/plat_arm.h | 2 | ||||
-rw-r--r-- | include/plat/common/platform.h | 1 |
5 files changed, 21 insertions, 2 deletions
diff --git a/include/plat/arm/board/common/board_arm_def.h b/include/plat/arm/board/common/board_arm_def.h index a388ed9ac..86c85123e 100644 --- a/include/plat/arm/board/common/board_arm_def.h +++ b/include/plat/arm/board/common/board_arm_def.h @@ -102,7 +102,7 @@ * little space for growth. */ #if TRUSTED_BOARD_BOOT -# define PLAT_ARM_MAX_BL2_SIZE 0x1F000 +# define PLAT_ARM_MAX_BL2_SIZE 0x1C000 #else # define PLAT_ARM_MAX_BL2_SIZE 0x11000 #endif diff --git a/include/plat/arm/common/arm_def.h b/include/plat/arm/common/arm_def.h index ea9d811c2..c4994173a 100644 --- a/include/plat/arm/common/arm_def.h +++ b/include/plat/arm/common/arm_def.h @@ -242,6 +242,17 @@ MT_MEMORY | MT_RW | MT_SECURE) /* + * Mapping for the BL1 RW region. This mapping is needed by BL2 in order to + * share the Mbed TLS heap. Since the heap is allocated inside BL1, it resides + * in the BL1 RW region. Hence, BL2 needs access to the BL1 RW region in order + * to be able to access the heap. + */ +#define ARM_MAP_BL1_RW MAP_REGION_FLAT( \ + BL1_RW_BASE, \ + BL1_RW_LIMIT - BL1_RW_BASE, \ + MT_MEMORY | MT_RW | MT_SECURE) + +/* * If SEPARATE_CODE_AND_RODATA=1 we define a region for each section * otherwise one region is defined containing both. */ diff --git a/include/plat/arm/common/arm_dyn_cfg_helpers.h b/include/plat/arm/common/arm_dyn_cfg_helpers.h index 382ec6011..cb17c95f2 100644 --- a/include/plat/arm/common/arm_dyn_cfg_helpers.h +++ b/include/plat/arm/common/arm_dyn_cfg_helpers.h @@ -6,12 +6,17 @@ #ifndef __ARM_DYN_CFG_HELPERS_H__ #define __ARM_DYN_CFG_HELPERS_H__ +#include <stddef.h> #include <stdint.h> -/* Function declaration */ +/* Function declarations */ int arm_dyn_get_config_load_info(void *dtb, int node, unsigned int config_id, uint64_t *config_addr, uint32_t *config_size); int arm_dyn_tb_fw_cfg_init(void *dtb, int *node); int arm_dyn_get_disable_auth(void *dtb, int node, uint32_t *disable_auth); +int arm_get_dtb_mbedtls_heap_info(void *dtb, void **heap_addr, + size_t *heap_size); +int arm_set_dtb_mbedtls_heap_info(void *dtb, void *heap_addr, + size_t heap_size); #endif /* __ARM_DYN_CFG_HELPERS_H__ */ diff --git a/include/plat/arm/common/plat_arm.h b/include/plat/arm/common/plat_arm.h index 1af4dd1ac..0770c0ec5 100644 --- a/include/plat/arm/common/plat_arm.h +++ b/include/plat/arm/common/plat_arm.h @@ -223,6 +223,8 @@ int arm_io_is_toc_valid(void); void arm_load_tb_fw_config(void); void arm_bl2_set_tb_cfg_addr(void *dtb); void arm_bl2_dyn_cfg_init(void); +void arm_bl1_set_mbedtls_heap(void); +int arm_get_mbedtls_heap(void **heap_addr, size_t *heap_size); /* * Mandatory functions required in ARM standard platforms diff --git a/include/plat/common/platform.h b/include/plat/common/platform.h index dae958957..e0297ae2e 100644 --- a/include/plat/common/platform.h +++ b/include/plat/common/platform.h @@ -103,6 +103,7 @@ void plat_panic_handler(void) __dead2; const char *plat_log_get_prefix(unsigned int log_level); void bl2_plat_preload_setup(void); int plat_try_next_boot_source(void); +int plat_get_mbedtls_heap(void **heap_addr, size_t *heap_size); /******************************************************************************* * Mandatory BL1 functions |