On Thu, Sep 11, 2025 at 06:44:13PM +0530, Anshul Dalal wrote: > spl_image->arg is passed to the kernel as an argument in the x0 > register. However in cases when the kernel is loaded from a FIT > container along with a DT, the arg remains unset which leads to boot > failure. > > Therefore, this patch sets the arg to fdt address if it's null. > > Signed-off-by: Anshul Dalal <[email protected]> > --- > arch/arm/lib/spl.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c > index c43a63f1819..2e7613a6f2e 100644 > --- a/arch/arm/lib/spl.c > +++ b/arch/arm/lib/spl.c > @@ -53,6 +53,8 @@ void __weak board_init_f(ulong dummy) > #ifdef CONFIG_ARM64 > void __noreturn jump_to_image_linux(struct spl_image_info *spl_image) > { > + if (!spl_image->arg) > + spl_image->arg = spl_image_fdt_addr(spl_image); > debug("Entering kernel arg pointer: 0x%p\n", spl_image->arg); > cleanup_before_linux(); > armv8_switch_to_el2((u64)spl_image->arg, 0, 0, 0,
This sounds like a standalone bugfix, that also needs to be more fully explained to make sure we're consistent about what we're doing. It might also be the case (I'm not sure without digging more!) that the caller in this case is in the wrong for having not set spl_image->arg already. -- Tom
signature.asc
Description: PGP signature

