diff options
author | Dan Handley <dan.handley@arm.com> | 2017-04-18 14:46:23 +0100 |
---|---|---|
committer | Dan Handley <dan.handley@arm.com> | 2017-04-19 18:05:41 +0100 |
commit | c2a9ee6383b71af2d0dae7b0c578e987bcf35695 (patch) | |
tree | 77d93282183b14f4bf9ed0989a08a22a5394c2be /bl2 | |
parent | 3d21c9452d4d5e17f545848bc4641274cdd6aa26 (diff) | |
download | trusted-firmware-a-c2a9ee6383b71af2d0dae7b0c578e987bcf35695.tar.gz |
Minor refactor of BL2 image load v2
Previously, get_next_bl_params_from_mem_params_desc() populated arg0
in the EL3 runtime entrypoint with a bl_params_t pointer. This is the
responsibility of the generic LOAD_IMAGE_V2 framework instead of the
descriptor-based image loading utility functions. Therefore this patch
moves that code to bl2_load_images().
Also, this patch moves the code that flushes the bl_params structure to
flush_bl_params_desc(), together with the other descriptor-based image
loading flushing code.
Change-Id: I4541e3f50e3878dde7cf89e9e8f31fe0b173fb9d
Signed-off-by: Dan Handley <dan.handley@arm.com>
Diffstat (limited to 'bl2')
-rw-r--r-- | bl2/bl2_image_load_v2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bl2/bl2_image_load_v2.c b/bl2/bl2_image_load_v2.c index 4fab655630..05c0fcd27a 100644 --- a/bl2/bl2_image_load_v2.c +++ b/bl2/bl2_image_load_v2.c @@ -109,6 +109,10 @@ entry_point_info_t *bl2_load_images(void) assert(bl2_to_next_bl_params->head); assert(bl2_to_next_bl_params->h.type == PARAM_BL_PARAMS); assert(bl2_to_next_bl_params->h.version >= VERSION_2); + assert(bl2_to_next_bl_params->head->ep_info); + + /* Populate arg0 for the next BL image */ + bl2_to_next_bl_params->head->ep_info->args.arg0 = (u_register_t)bl2_to_next_bl_params; /* Flush the parameters to be passed to next image */ plat_flush_next_bl_params(); |