diff options
author | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2019-12-19 15:22:37 +0000 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2019-12-19 15:22:37 +0000 |
commit | 4d9a375807194744e7c682ce52fcc42ffb5e9529 (patch) | |
tree | 42594ceea5f5ac42bcd6e95781ce0ab22c65a63f | |
parent | f63e9f4c1166fe9c3b14fa4ac4f20d15cfa5dc66 (diff) | |
parent | 5ddcbdd8158d30ce2fc8b7f4084bc1df455eac44 (diff) | |
download | trusted-firmware-a-4d9a375807194744e7c682ce52fcc42ffb5e9529.tar.gz |
Merge "TF-A: Fix BL2 bug in dynamic configuration initialisation" into integration
-rw-r--r-- | plat/arm/common/arm_dyn_cfg.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/plat/arm/common/arm_dyn_cfg.c b/plat/arm/common/arm_dyn_cfg.c index aafb190d58..e6c5a73615 100644 --- a/plat/arm/common/arm_dyn_cfg.c +++ b/plat/arm/common/arm_dyn_cfg.c @@ -243,7 +243,8 @@ void arm_bl2_dyn_cfg_init(void) #ifdef BL31_BASE /* Ensure the configs don't overlap with BL31 */ - if ((image_base > BL31_BASE) || ((image_base + image_size) > BL31_BASE)) + if ((image_base >= BL31_BASE) && + (image_base <= BL31_LIMIT)) continue; #endif /* Ensure the configs are loaded in a valid address */ @@ -254,7 +255,8 @@ void arm_bl2_dyn_cfg_init(void) * If BL32 is present, ensure that the configs don't * overlap with it. */ - if (image_base >= BL32_BASE && image_base <= BL32_LIMIT) + if ((image_base >= BL32_BASE) && + (image_base <= BL32_LIMIT)) continue; #endif } @@ -263,7 +265,10 @@ void arm_bl2_dyn_cfg_init(void) cfg_mem_params->image_info.image_base = (uintptr_t)image_base; cfg_mem_params->image_info.image_max_size = image_size; - /* Remove the IMAGE_ATTRIB_SKIP_LOADING attribute from HW_CONFIG node */ + /* + * Remove the IMAGE_ATTRIB_SKIP_LOADING attribute from + * HW_CONFIG or FW_CONFIG nodes + */ cfg_mem_params->image_info.h.attr &= ~IMAGE_ATTRIB_SKIP_LOADING; } |