[PATCH v2 6/9] qemu-arm: Get bloblist from boot arguments
Raymond Mao
raymond.mao at linaro.org
Fri Dec 22 16:33:33 CET 2023
On Fri, 22 Dec 2023 at 06:19, Ilias Apalodimas <ilias.apalodimas at linaro.org>
wrote:
> > #endif
> >
> > +/* Boot parameters saved from start.S */
> > +extern unsigned long saved_args[];
> > +
> > int board_init(void)
> > {
> > return 0;
> > @@ -144,6 +148,35 @@ void *board_fdt_blob_setup(int *err)
> > return (void *)CFG_SYS_SDRAM_BASE;
> > }
> >
> > +int board_bloblist_from_boot_arg(unsigned long addr, unsigned long size)
> > +{
> > + int ret = -ENOENT;
> > + unsigned long reg_fdt;
> > + unsigned long reg_zero;
> > +
> > + if (!IS_ENABLED(CONFIG_OF_BOARD) || !IS_ENABLED(CONFIG_BLOBLIST))
> > + return -ENOENT;
> > +
> > + ret = bloblist_check(saved_args[3], size);
> > + if (ret)
> > + return ret;
> > +
> > + if (IS_ENABLED(CONFIG_ARM64)) {
> > + reg_fdt = saved_args[0];
> > + reg_zero = saved_args[2];
> > + } else {
> > + reg_fdt = saved_args[2];
> > + reg_zero = saved_args[0];
>
> I think it's better if we fix up the order in the low-level asm code.
> Store the variables in the 'correct' order there and get rid of this
> if
>
Yes I agree. I can swap the order for aarch32.
Thanks and regards,
Raymond
More information about the U-Boot
mailing list