diff --git a/plat/arm/common/arm_bl31_setup.c b/plat/arm/common/arm_bl31_setup.c index d6997cdee0b220ffaef5270dad3ee34dcf89ee9f..4ed24772eac323ee7f016749c665b3c9ae0d28b4 100644 --- a/plat/arm/common/arm_bl31_setup.c +++ b/plat/arm/common/arm_bl31_setup.c @@ -130,11 +130,8 @@ void arm_bl31_early_platform_setup(bl31_params_t *from_bl2, * Tell BL31 where the non-trusted software image * is located and the entry state information */ -#ifdef PRELOADED_BL33_BASE - bl33_image_ep_info.pc = PRELOADED_BL33_BASE; -#else bl33_image_ep_info.pc = plat_get_ns_image_entrypoint(); -#endif /* PRELOADED_BL33_BASE */ + bl33_image_ep_info.spsr = arm_get_spsr_for_bl33_entry(); SET_SECURITY_STATE(bl33_image_ep_info.h.attr, NON_SECURE); diff --git a/plat/arm/common/arm_common.c b/plat/arm/common/arm_common.c index 33d2b06874028b56675aec2bcca9a78c0db01a71..03e44f421dd7ce332368396eb361c2a927913766 100644 --- a/plat/arm/common/arm_common.c +++ b/plat/arm/common/arm_common.c @@ -114,7 +114,11 @@ void arm_setup_page_tables(uintptr_t total_base, uintptr_t plat_get_ns_image_entrypoint(void) { +#ifdef PRELOADED_BL33_BASE + return PRELOADED_BL33_BASE; +#else return PLAT_ARM_NS_IMAGE_OFFSET; +#endif } /*******************************************************************************