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

Ilias Apalodimas ilias.apalodimas at linaro.org
Mon Sep 25 14:46:11 CEST 2023


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?
My concern is code duplication when we add similar functionality in
eficonfig.  Isn't there a better place to handle the memory reservation?

[...]

Thanks
/Ilias



More information about the U-Boot mailing list