Browse Source

fix(stm32mp1): skip OP-TEE header check if image base is NULL

In bl2_plat_handle_post_image_load(), if the image_base of OP-TEE
header image is 0, do not call optee_header_is_valid(). This can be
the case when OP-TEE is not present in the FIP.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Ic2d014e59665c9efa33bbce1bf2eb3b66cd6fb26
pull/1996/merge
Yann Gautier 4 months ago
parent
commit
b452e7a824
  1. 3
      plat/st/stm32mp1/bl2_plat_setup.c

3
plat/st/stm32mp1/bl2_plat_setup.c

@ -461,7 +461,8 @@ int bl2_plat_handle_post_image_load(unsigned int image_id)
break;
case BL32_IMAGE_ID:
if (optee_header_is_valid(bl_mem_params->image_info.image_base)) {
if ((bl_mem_params->image_info.image_base != 0UL) &&
(optee_header_is_valid(bl_mem_params->image_info.image_base))) {
image_info_t *paged_image_info = NULL;
/* BL32 is OP-TEE header */

Loading…
Cancel
Save