diff --git a/plat/juno/bl2_plat_setup.c b/plat/juno/bl2_plat_setup.c index 563f05b372387b70646ad1d54ddc144afa1434d4..5be725ade8b3e4f41452202f6cbb35e3d7306301 100644 --- a/plat/juno/bl2_plat_setup.c +++ b/plat/juno/bl2_plat_setup.c @@ -142,6 +142,10 @@ bl31_params_t *bl2_plat_get_bl31_params(void) ******************************************************************************/ struct entry_point_info *bl2_plat_get_bl31_ep_info(void) { +#if DEBUG + bl31_params_mem.bl31_ep_info.args.arg1 = JUNO_BL31_PLAT_PARAM_VAL; +#endif + return &bl31_params_mem.bl31_ep_info; } diff --git a/plat/juno/bl31_plat_setup.c b/plat/juno/bl31_plat_setup.c index cb5fd1e227132f2e79de23e0c0f6fcbd3810f14a..2eac0fb54d13d37e9e012465dc773451057aa535 100644 --- a/plat/juno/bl31_plat_setup.c +++ b/plat/juno/bl31_plat_setup.c @@ -111,12 +111,17 @@ void bl31_early_platform_setup(bl31_params_t *from_bl2, /* * Check params passed from BL2 should not be NULL, - * We are not checking plat_params_from_bl2 as NULL as we are not - * using it on Juno */ assert(from_bl2 != NULL); assert(from_bl2->h.type == PARAM_BL31); assert(from_bl2->h.version >= VERSION_1); + /* + * In debug builds, we pass a special value in 'plat_params_from_bl2' + * to verify platform parameters from BL2 to BL3-1. + * In release builds, it's not used. + */ + assert(((unsigned long long)plat_params_from_bl2) == + JUNO_BL31_PLAT_PARAM_VAL); /* * Copy BL3-2 and BL3-3 entry point information. diff --git a/plat/juno/juno_def.h b/plat/juno/juno_def.h index da852c5b99d42badcad3fd6da5376cf0b870839c..6b3ba577b469cddb25d5ed30a0a9248a60b50542 100644 --- a/plat/juno/juno_def.h +++ b/plat/juno/juno_def.h @@ -31,6 +31,9 @@ #ifndef __JUNO_DEF_H__ #define __JUNO_DEF_H__ +/* Special value used to verify platform parameters from BL2 to BL3-1 */ +#define JUNO_BL31_PLAT_PARAM_VAL 0x0f1e2d3c4b5a6978ULL + /******************************************************************************* * Juno memory map related constants ******************************************************************************/