summaryrefslogtreecommitdiff
path: root/common/bl_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/bl_common.c')
-rw-r--r--common/bl_common.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/common/bl_common.c b/common/bl_common.c
index 60f8b2f7..8c241ec4 100644
--- a/common/bl_common.c
+++ b/common/bl_common.c
@@ -275,9 +275,16 @@ int load_image(meminfo_t *mem_layout,
* Update the memory usage info.
* This is done after the actual loading so that it is not updated when
* the load is unsuccessful.
+ * If the caller does not provide an entry point, bypass the memory
+ * reservation.
*/
- reserve_mem(&mem_layout->free_base, &mem_layout->free_size,
- image_base, image_size);
+ if (entry_point_info != NULL) {
+ reserve_mem(&mem_layout->free_base, &mem_layout->free_size,
+ image_base, image_size);
+ } else {
+ INFO("Skip reserving memory: 0x%lx - 0x%lx\n",
+ image_base, image_base + image_size);
+ }
image_data->image_base = image_base;
image_data->image_size = image_size;