diff --git a/bl31/bl31_main.c b/bl31/bl31_main.c index f79a122..19eccd5 100644 --- a/bl31/bl31_main.c +++ b/bl31/bl31_main.c @@ -183,6 +183,14 @@ scr |= SCR_RW_BIT; /* + * Setup general purpose registers context for next image. + */ + cpu_context *context = cm_get_context(read_mpidr(), + next_image_info->security_state); + memcpy(&context->gpregs_ctx, &next_image_info->args, + sizeof(next_image_info->args)); + + /* * Tell the context mgmt. library to ensure that SP_EL3 points to * the right context to exit from EL3 correctly. */ diff --git a/plat/juno/bl31_plat_setup.c b/plat/juno/bl31_plat_setup.c index 19f2085..620c013 100644 --- a/plat/juno/bl31_plat_setup.c +++ b/plat/juno/bl31_plat_setup.c @@ -108,6 +108,9 @@ void *data) { bl2_to_bl31_args = *from_bl2; + + /* UEFI expects x0 to be primary CPU MPID */ + bl2_to_bl31_args.bl33_image_info.args.arg0 = PRIMARY_CPU; } /******************************************************************************* diff --git a/plat/juno/platform.h b/plat/juno/platform.h index c85b270..e6f8a41 100644 --- a/plat/juno/platform.h +++ b/plat/juno/platform.h @@ -62,7 +62,7 @@ /* Non-Trusted Firmware BL3-3 and its load address */ #define BL33_IMAGE_NAME "bl33.bin" /* e.g. UEFI */ -#define NS_IMAGE_OFFSET (DRAM_BASE + 0x8000000) /* DRAM + 128MB */ +#define NS_IMAGE_OFFSET 0xE0000000 /* Firmware Image Package */ #define FIP_IMAGE_NAME "fip.bin"