From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dr. Philipp Tomsich Date: Fri, 15 Dec 2017 10:07:45 +0100 Subject: [U-Boot] [PATCH] spl: atf: fix the plat_params In-Reply-To: <1513308437-32162-1-git-send-email-kever.yang@rock-chips.com> References: <1513308437-32162-1-git-send-email-kever.yang@rock-chips.com> Message-ID: <43FAC397-0BE4-4C67-8DD2-B3EAD31F1DF7@theobroma-systems.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de Kever, If you need/want to disable this, could you make this conditional on a new Kconfig option? That way we can disable it for those boards that still ship with an old ATF (note that passing NULL also broke the upstream ATF for quite a number of versions…). Alternatively, you could add a board-specific wrapper function that allows modifying the parameters (as they are plat_params, anyway), e.g.: atf_entry((void *)bl31_params, board_atf_plat_params(fdt_addr)) This would allow you to suppress this for boards that are known to ship with a ATF that does not yet support this. Note that the ATF shipped by us has already been updated, so we can’t just remove this as it will break functionality for people in the field... Thanks, Philipp. > On 15 Dec 2017, at 04:27, Kever Yang wrote: > > The latest upstream ATF still not support using a fdt base as plat_params, > I get error like this: > "ERROR: not expected type found 6410029648624618960" > > The reason is the ATF source code parse the plat_param, and can not > decode the type in: > /* common header for all plat parameter type */ > struct bl31_plat_param { > uint64_t type; > void *next; > }; > void params_early_setup(void *plat_param_from_bl2) > plat/rockchip/common/params_setup.c > > We can only use the fdt_addr as plat_params after upstream ATF able to > parse it. > > BUGFIX to: > 1d37909 spl: atf: introduce spl_invoke_atf and make bl31_entry private > > Signed-off-by: Kever Yang > --- > > common/spl/spl_atf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c > index 63557c0..a65d603 100644 > --- a/common/spl/spl_atf.c > +++ b/common/spl/spl_atf.c > @@ -96,7 +96,7 @@ static void bl31_entry(uintptr_t bl31_entry, uintptr_t bl33_entry, > raw_write_daif(SPSR_EXCEPTION_MASK); > dcache_disable(); > > - atf_entry((void *)bl31_params, (void *)fdt_addr); > + atf_entry((void *)bl31_params, NULL); > } > > static int spl_fit_images_find_uboot(void *blob) > -- > 1.9.1 >