[U-Boot] [PATCH v3 14/18] efi_loader: provide link between devices and EFI handles
Alexander Graf
agraf at suse.de
Fri Jan 19 20:20:43 UTC 2018
On 19.01.18 20:24, Heinrich Schuchardt wrote:
> U-Boot devices and EFI handles can be related, e.g. an
> IDE disk relates to a handle with the EFI_BLOCK_IO_PROTOCOL.
> Provide a pointer to store this link.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
> v3
> Don't add an unused handle field to struct udevice.
> v2
> no change
> ---
> include/efi_loader.h | 2 ++
> lib/efi_loader/efi_boottime.c | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/include/efi_loader.h b/include/efi_loader.h
> index 188bc06bcc..3579db8b63 100644
> --- a/include/efi_loader.h
> +++ b/include/efi_loader.h
> @@ -139,6 +139,8 @@ struct efi_object {
> struct list_head protocols;
> /* The object spawner can either use this for data or as identifier */
> void *handle;
> + /* Device */
> + struct udevice *dev;
I still don't think you need this.
> };
>
> /**
> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
> index 324abe4d48..15baeb275f 100644
> --- a/lib/efi_loader/efi_boottime.c
> +++ b/lib/efi_loader/efi_boottime.c
> @@ -361,6 +361,7 @@ efi_status_t efi_create_handle(void **handle)
> (void **)&obj);
> if (r != EFI_SUCCESS)
> return r;
> + memset(obj, 0, sizeof(struct efi_object));
And without change you don't need the memset either :)
Alex
> efi_add_handle(obj);
> *handle = obj->handle;
> return r;
>
More information about the U-Boot
mailing list