From b934354998766c3c0b300355e399a63f39fe3dfd Mon Sep 17 00:00:00 2001 From: Volodymyr Babchuk Date: Thu, 11 Nov 2021 23:20:50 +0200 Subject: [PATCH 1/3] [HACK] s4: boot U-Boot in EL2 mode Xen requires EL2 mode, so we need to start U-Boot in this mode. Signed-off-by: Volodymyr Babchuk --- plat/renesas/rcar_gen4/bl31_plat_setup.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plat/renesas/rcar_gen4/bl31_plat_setup.c b/plat/renesas/rcar_gen4/bl31_plat_setup.c index 5aa478ee2..ecabcd20c 100644 --- a/plat/renesas/rcar_gen4/bl31_plat_setup.c +++ b/plat/renesas/rcar_gen4/bl31_plat_setup.c @@ -62,6 +62,11 @@ struct entry_point_info *bl31_plat_get_next_image_ep_info(uint32_t type) next_image_info = (type == NON_SECURE) ? &from_bl2->bl33_ep_info : &from_bl2->bl32_ep_info; + /* HACK: Boot U-Boot in EL2. This should be configured from IPL side */ + if (type == NON_SECURE) + next_image_info->spsr = SPSR_64(MODE_EL2, MODE_SP_ELX, + DISABLE_ALL_EXCEPTIONS); + return (next_image_info->pc != 0U) ? next_image_info : NULL; } -- 2.38.1