From 935568eecc4b3e9a493b6ba1517c1e066af63aef Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 19 Dec 2019 15:42:13 +0100 Subject: spl: atf: Add missing ndepth initialization ndepth needs to be initialized before it is used in fdt_next_node(). Uninitialized value is causing that node is found and depth increase but won't pass condition below because initial state wasn't setup. Signed-off-by: Michal Simek --- common/spl/spl_atf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c index df29274..24fd35e 100644 --- a/common/spl/spl_atf.c +++ b/common/spl/spl_atf.c @@ -112,7 +112,7 @@ static void bl31_entry(uintptr_t bl31_entry, uintptr_t bl32_entry, static int spl_fit_images_find(void *blob, int os) { - int parent, node, ndepth; + int parent, node, ndepth = 0; const void *data; if (!blob) -- cgit v1.1 From 5c03c990d1fb928048bf76f2fc03ee70276d4c4a Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 19 Dec 2019 18:13:31 +0100 Subject: spl: atf: Enable option to rewrite bl2_plat_get_bl31_params() Xilinx ZynqMP platform is passing information to ATF in private format and ATF bl31 parameters are not used. That's why enable option to rewrite this function by platform specific implementation. The patch also move and update kernel-doc format with missing parameters. Signed-off-by: Michal Simek --- common/spl/spl_atf.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'common') diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c index 24fd35e..702367b 100644 --- a/common/spl/spl_atf.c +++ b/common/spl/spl_atf.c @@ -18,20 +18,7 @@ static struct bl2_to_bl31_params_mem bl31_params_mem; static struct bl31_params *bl2_to_bl31_params; -/** - * bl2_plat_get_bl31_params() - prepare params for bl31. - * - * This function assigns a pointer to the memory that the platform has kept - * aside to pass platform specific and trusted firmware related information - * to BL31. This memory is allocated by allocating memory to - * bl2_to_bl31_params_mem structure which is a superset of all the - * structure whose information is passed to BL31 - * NOTE: This function should be called only once and should be done - * before generating params to BL31 - * - * @return bl31 params structure pointer - */ -static struct bl31_params *bl2_plat_get_bl31_params(uintptr_t bl32_entry, +__weak struct bl31_params *bl2_plat_get_bl31_params(uintptr_t bl32_entry, uintptr_t bl33_entry, uintptr_t fdt_addr) { -- cgit v1.1