diff options
Diffstat (limited to 'plat/hisilicon/poplar/bl31_plat_setup.c')
-rw-r--r-- | plat/hisilicon/poplar/bl31_plat_setup.c | 71 |
1 files changed, 25 insertions, 46 deletions
diff --git a/plat/hisilicon/poplar/bl31_plat_setup.c b/plat/hisilicon/poplar/bl31_plat_setup.c index ec72acdb..b45693f5 100644 --- a/plat/hisilicon/poplar/bl31_plat_setup.c +++ b/plat/hisilicon/poplar/bl31_plat_setup.c @@ -6,7 +6,6 @@ #include <arch.h> #include <arch_helpers.h> -#include <arm_gic.h> #include <assert.h> #include <bl31.h> #include <bl_common.h> @@ -67,65 +66,45 @@ entry_point_info_t *bl31_plat_get_next_image_ep_info(uint32_t type) * while creating page tables. BL2 has flushed this information to memory, so * we are guaranteed to pick up good data. ******************************************************************************/ -#if LOAD_IMAGE_V2 -void bl31_early_platform_setup(void *from_bl2, - void *plat_params_from_bl2) -#else -void bl31_early_platform_setup(bl31_params_t *from_bl2, - void *plat_params_from_bl2) -#endif +void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, + u_register_t arg2, u_register_t arg3) { + void *from_bl2; + + from_bl2 = (void *) arg0; + console_init(PL011_UART0_BASE, PL011_UART0_CLK_IN_HZ, PL011_BAUDRATE); /* Init console for crash report */ plat_crash_console_init(); -#if LOAD_IMAGE_V2 - /* - * Check params passed from BL2 should not be NULL, - */ - bl_params_t *params_from_bl2 = (bl_params_t *)from_bl2; - - assert(params_from_bl2 != NULL); - assert(params_from_bl2->h.type == PARAM_BL_PARAMS); - assert(params_from_bl2->h.version >= VERSION_2); - - bl_params_node_t *bl_params = params_from_bl2->head; - - /* - * Copy BL33 and BL32 (if present), entry point information. - * They are stored in Secure RAM, in BL2's address space. - */ - while (bl_params) { - if (bl_params->image_id == BL32_IMAGE_ID) - bl32_image_ep_info = *bl_params->ep_info; - - if (bl_params->image_id == BL33_IMAGE_ID) - bl33_image_ep_info = *bl_params->ep_info; - - bl_params = bl_params->next_params_info; - } - - if (bl33_image_ep_info.pc == 0) - panic(); - -#else /* LOAD_IMAGE_V2 */ - /* * Check params passed from BL2 should not be NULL, */ + bl_params_t *params_from_bl2 = (bl_params_t *)from_bl2; + assert(params_from_bl2 != NULL); - assert(params_from_bl2->h.type == PARAM_BL31); - assert(params_from_bl2->h.version >= VERSION_1); + assert(params_from_bl2->h.type == PARAM_BL_PARAMS); + assert(params_from_bl2->h.version >= VERSION_2); + + bl_params_node_t *bl_params = params_from_bl2->head; /* - * Copy BL32 (if populated by BL2) and BL33 entry point information. + * Copy BL33 and BL32 (if present), entry point information. * They are stored in Secure RAM, in BL2's address space. */ - if (from_bl2->bl32_ep_info) - bl32_image_ep_info = *from_bl2->bl32_ep_info; - bl33_image_ep_info = *from_bl2->bl33_ep_info; -#endif /* LOAD_IMAGE_V2 */ + while (bl_params) { + if (bl_params->image_id == BL32_IMAGE_ID) + bl32_image_ep_info = *bl_params->ep_info; + + if (bl_params->image_id == BL33_IMAGE_ID) + bl33_image_ep_info = *bl_params->ep_info; + + bl_params = bl_params->next_params_info; + } + + if (bl33_image_ep_info.pc == 0) + panic(); } void bl31_platform_setup(void) |