[U-Boot] [PATCH v3 14/18] efi_loader: provide link between devices and EFI handles
Heinrich Schuchardt
xypron.glpk at gmx.de
Fri Jan 19 19:24:50 UTC 2018
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;
};
/**
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));
efi_add_handle(obj);
*handle = obj->handle;
return r;
--
2.14.2
More information about the U-Boot
mailing list