aboutsummaryrefslogtreecommitdiffstats
path: root/plat
diff options
context:
space:
mode:
authorAlexei Fedorov <Alexei.Fedorov@arm.com>2019-12-10 12:07:27 +0000
committerTrustedFirmware Code Review <review@review.trustedfirmware.org>2019-12-10 12:07:27 +0000
commit953dc5410b8e577f88967fc344c50bf6f4814be6 (patch)
tree2e1c7000d15ff4b30a595de3d478e0c81db256e8 /plat
parent9be5ca7aa6d384596d7fda01b4319ee82a6748de (diff)
parent6c77dfc5e6a306033cba9793fe6280511e512bad (diff)
downloadplatform_external_arm-trusted-firmware-953dc5410b8e577f88967fc344c50bf6f4814be6.tar.gz
platform_external_arm-trusted-firmware-953dc5410b8e577f88967fc344c50bf6f4814be6.tar.bz2
platform_external_arm-trusted-firmware-953dc5410b8e577f88967fc344c50bf6f4814be6.zip
Merge "Use the proper size for tb_fw_cfg_dtb" into integration
Diffstat (limited to 'plat')
-rw-r--r--plat/arm/common/arm_dyn_cfg.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/plat/arm/common/arm_dyn_cfg.c b/plat/arm/common/arm_dyn_cfg.c
index 9a5364952..aafb190d5 100644
--- a/plat/arm/common/arm_dyn_cfg.c
+++ b/plat/arm/common/arm_dyn_cfg.c
@@ -1,11 +1,12 @@
/*
- * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
#include <string.h>
+#include <libfdt.h>
#include <platform_def.h>
@@ -21,8 +22,6 @@
/* Variable to store the address to TB_FW_CONFIG passed from BL1 */
static void *tb_fw_cfg_dtb;
-static size_t tb_fw_cfg_dtb_size;
-
#if TRUSTED_BOARD_BOOT
@@ -110,7 +109,7 @@ void arm_bl1_set_mbedtls_heap(void)
* without the heap info.
*/
flush_dcache_range((uintptr_t)tb_fw_cfg_dtb,
- tb_fw_cfg_dtb_size);
+ fdt_totalsize(tb_fw_cfg_dtb));
}
}
@@ -146,7 +145,6 @@ void arm_load_tb_fw_config(void)
/* At this point we know that a DTB is indeed available */
config_base = arm_tb_fw_info.image_info.image_base;
tb_fw_cfg_dtb = (void *)config_base;
- tb_fw_cfg_dtb_size = (size_t)arm_tb_fw_info.image_info.image_max_size;
/* The BL2 ep_info arg0 is modified to point to TB_FW_CONFIG */
desc = bl1_plat_get_image_desc(BL2_IMAGE_ID);