All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 14/18] efi_loader: provide link between devices and EFI handles
Date: Fri, 19 Jan 2018 20:24:50 +0100	[thread overview]
Message-ID: <20180119192454.11172-15-xypron.glpk@gmx.de> (raw)
In-Reply-To: <20180119192454.11172-1-xypron.glpk@gmx.de>

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@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

  parent reply	other threads:[~2018-01-19 19:24 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19 19:24 [U-Boot] [PATCH v3 00/18] efi_loader: enable EFI driver provided block device Heinrich Schuchardt
2018-01-19 19:24 ` [U-Boot] [PATCH v3 01/18] efi_loader: return NULL from device path functions Heinrich Schuchardt
2018-01-19 19:24 ` [U-Boot] [PATCH v3 02/18] efi_loader: address of the simple file system protocol Heinrich Schuchardt
2018-01-19 19:24 ` [U-Boot] [PATCH v3 03/18] efi_loader: correct find " Heinrich Schuchardt
2018-01-19 19:24 ` [U-Boot] [PATCH v3 04/18] efi_loader: print device path when entering efi_load_image Heinrich Schuchardt
2018-01-19 19:24 ` [U-Boot] [PATCH v3 05/18] efi_loader: allocate correct memory type for EFI image Heinrich Schuchardt
2018-01-19 19:24 ` [U-Boot] [PATCH v3 06/18] efi_loader: check tables in helloworld.efi Heinrich Schuchardt
2018-01-19 19:24 ` [U-Boot] [PATCH v3 07/18] efi_loader: fix StartImage bootservice Heinrich Schuchardt
2018-01-19 19:24 ` [U-Boot] [PATCH v3 08/18] efi_loader: efi_disk_register: correctly determine if_type_name Heinrich Schuchardt
2018-01-19 19:24 ` [U-Boot] [PATCH v3 09/18] efi_loader: make efi_block_io_guid a global symbol Heinrich Schuchardt
2018-01-19 19:24 ` [U-Boot] [PATCH v3 10/18] efi_loader: provide a function to create a partition node Heinrich Schuchardt
2018-01-19 19:24 ` [U-Boot] [PATCH v3 11/18] efi_loader: make efi_disk_create_partitions a global symbol Heinrich Schuchardt
2018-02-09  0:15   ` Jonathan Gray
2018-02-09  4:07     ` Heinrich Schuchardt
2018-02-09  9:44       ` Artturi Alm
2018-02-09 16:42         ` Heinrich Schuchardt
2018-01-19 19:24 ` [U-Boot] [PATCH v3 12/18] efi_loader: correct EFI_BLOCK_IO_PROTOCOL definitions Heinrich Schuchardt
2018-01-19 19:24 ` [U-Boot] [PATCH v3 13/18] efi_loader: provide function to get last node of a device path Heinrich Schuchardt
2018-01-19 19:24 ` Heinrich Schuchardt [this message]
2018-01-19 20:20   ` [U-Boot] [PATCH v3 14/18] efi_loader: provide link between devices and EFI handles Alexander Graf
2018-01-19 20:33     ` Heinrich Schuchardt
2018-01-19 20:36       ` Alexander Graf
2018-01-19 19:24 ` [U-Boot] [PATCH v3 15/18] efi_loader: add check_tpl parameter to efi_signal_event Heinrich Schuchardt
2018-01-19 19:24 ` [U-Boot] [PATCH v3 16/18] efi_loader: fix ExitBootServices Heinrich Schuchardt
2018-01-19 19:24 ` [U-Boot] [PATCH v3 17/18] efi_driver: EFI block driver Heinrich Schuchardt
2018-01-19 21:03   ` Alexander Graf
2018-01-19 19:24 ` [U-Boot] [PATCH v3 18/18] efi_selftest: provide a test for block io Heinrich Schuchardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180119192454.11172-15-xypron.glpk@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.