[PATCH v2 6/9] qemu-arm: Get bloblist from boot arguments
Ilias Apalodimas
ilias.apalodimas at linaro.org
Fri Dec 22 12:18:24 CET 2023
> #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
[...]
/Ilias
More information about the U-Boot
mailing list