[PATCH 2/3] efi_loader: binary_run: register an initrd

Ilias Apalodimas ilias.apalodimas at linaro.org
Wed Mar 19 10:31:33 CET 2025


Hi Adriano,

[...]

>   */
>  static efi_status_t efi_binary_run_dp(void *image, size_t size, void *fdt,
> +                                     void *initrd, size_t initd_sz,
>                                       struct efi_device_path *dp_dev,
>                                       struct efi_device_path *dp_img)
>  {
>         efi_status_t ret;
> +       struct efi_device_path *dp_initrd;
>
>         /* Initialize EFI drivers */
>         ret = efi_init_obj_list();
> @@ -230,6 +234,14 @@ static efi_status_t efi_binary_run_dp(void *image, size_t size, void *fdt,
>         if (ret != EFI_SUCCESS)
>                 return ret;
>
> +       dp_initrd = efi_dp_from_mem(EFI_RESERVED_MEMORY_TYPE, (uintptr_t)initrd, initd_sz);

Why do we need reserved memory? What the EFI stub does, is allocate a
new memory buffer which you later copy the initrd to.
I think Boot Services Data is enough.

[...]

Thanks
/Ilias


More information about the U-Boot mailing list