[PATCH v4 5/8] efi_loader: set EFI HTTP Boot download buffer as reserved

Masahisa Kojima masahisa.kojima at linaro.org
Tue Sep 26 05:11:12 CEST 2023


Hi Ilias,

On Mon, 25 Sept 2023 at 21:46, Ilias Apalodimas
<ilias.apalodimas at linaro.org> wrote:
>
> Kojima-san,
>
> [...]
> >  /* Carve out DT reserved memory ranges */
> >  void efi_carve_out_dt_rsv(void *fdt);
> >  /* Purge unused kaslr-seed */
> > diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c
> > index 605be5041e..4991056946 100644
> > --- a/lib/efi_loader/efi_bootmgr.c
> > +++ b/lib/efi_loader/efi_bootmgr.c
> > @@ -326,6 +326,11 @@ static efi_status_t try_load_from_uri_path(struct efi_device_path_uri *uridp,
> >                       return EFI_INVALID_PARAMETER;
> >
> >               ret = load_default_file_from_blk_dev(blk, handle);
> > +             if (ret != EFI_SUCCESS)
> > +                     return ret;
> > +
> > +             /* whole ramdisk must be reserved */
> > +             efi_reserve_memory(image_addr, image_size, true);
>
> Why is this a different patch though?

No special reason, I will merge this into #4 "efi_loader: support boot
from URI device path" patch.

> My concern is code duplication when we add similar functionality in
> eficonfig.  Isn't there a better place to handle the memory reservation?

I think eficonfig will only provide add/edit/delete URI boot option,
efibootmgr is
responsible for handling the URI device path and reserving the memory.
So there will not be code duplication.

Thanks,
Masahisa Kojima

>
> [...]
>
> Thanks
> /Ilias
>


More information about the U-Boot mailing list