From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC v3 02/10] efi_loader: export root node handle
Date: Wed, 17 Apr 2019 15:57:22 +0900 [thread overview]
Message-ID: <20190417065721.GP7158@linaro.org> (raw)
In-Reply-To: <7e637d3b-f64b-0a8b-54be-e4ad9af64585@gmx.de>
On Tue, Apr 16, 2019 at 06:48:46AM +0200, Heinrich Schuchardt wrote:
> On 4/16/19 6:24 AM, AKASHI Takahiro wrote:
> >This is a preparatory patch.
> >The root node handle will be used as a dummy parent handle when invoking
> >an EFI image from bootefi/bootmgr command.
>
> This patch is not based on the efi-2019-07 branch.
This is intentional.
> Please, rebase your patch series.
As efi-2019-07 can be updated frequently and get old quickly (day by day),
in particular before or around rc1 and rc2, I don't want to rebase my patch,
instead look forward to the consensus to my approach first.
That is why I have sent out this series as a RFC.
-Takahiro Akashi
> Best regards
>
> Heinrich
>
> >
> >Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> >---
> > include/efi_loader.h | 2 ++
> > lib/efi_loader/efi_root_node.c | 13 +++++++------
> > 2 files changed, 9 insertions(+), 6 deletions(-)
> >
> >diff --git a/include/efi_loader.h b/include/efi_loader.h
> >index 00b81c6010ff..d524dc7e24c1 100644
> >--- a/include/efi_loader.h
> >+++ b/include/efi_loader.h
> >@@ -25,6 +25,8 @@
> > EFI_GUID(0xe61d73b9, 0xa384, 0x4acc, \
> > 0xae, 0xab, 0x82, 0xe8, 0x28, 0xf3, 0x62, 0x8b)
> >
> >+extern efi_handle_t efi_root;
> >+
> > int __efi_entry_check(void);
> > int __efi_exit_check(void);
> > const char *__efi_nesting(void);
> >diff --git a/lib/efi_loader/efi_root_node.c b/lib/efi_loader/efi_root_node.c
> >index b056ba3ee880..f2521a64091c 100644
> >--- a/lib/efi_loader/efi_root_node.c
> >+++ b/lib/efi_loader/efi_root_node.c
> >@@ -10,6 +10,7 @@
> > #include <efi_loader.h>
> >
> > const efi_guid_t efi_u_boot_guid = U_BOOT_GUID;
> >+efi_handle_t efi_root;
> >
> > struct efi_root_dp {
> > struct efi_device_path_vendor vendor;
> >@@ -26,12 +27,11 @@ struct efi_root_dp {
> > */
> > efi_status_t efi_root_node_register(void)
> > {
> >- efi_handle_t root;
> > efi_status_t ret;
> > struct efi_root_dp *dp;
> >
> > /* Create handle */
> >- ret = efi_create_handle(&root);
> >+ ret = efi_create_handle(&efi_root);
> > if (ret != EFI_SUCCESS)
> > return ret;
> >
> >@@ -52,24 +52,25 @@ efi_status_t efi_root_node_register(void)
> > dp->end.length = sizeof(struct efi_device_path);
> >
> > /* Install device path protocol */
> >- ret = efi_add_protocol(root, &efi_guid_device_path, dp);
> >+ ret = efi_add_protocol(efi_root, &efi_guid_device_path, dp);
> > if (ret != EFI_SUCCESS)
> > goto failure;
> >
> > /* Install device path to text protocol */
> >- ret = efi_add_protocol(root, &efi_guid_device_path_to_text_protocol,
> >+ ret = efi_add_protocol(efi_root, &efi_guid_device_path_to_text_protocol,
> > (void *)&efi_device_path_to_text);
> > if (ret != EFI_SUCCESS)
> > goto failure;
> >
> > /* Install device path utilities protocol */
> >- ret = efi_add_protocol(root, &efi_guid_device_path_utilities_protocol,
> >+ ret = efi_add_protocol(efi_root,
> >+ &efi_guid_device_path_utilities_protocol,
> > (void *)&efi_device_path_utilities);
> > if (ret != EFI_SUCCESS)
> > goto failure;
> >
> > /* Install Unicode collation protocol */
> >- ret = efi_add_protocol(root, &efi_guid_unicode_collation_protocol,
> >+ ret = efi_add_protocol(efi_root, &efi_guid_unicode_collation_protocol,
> > (void *)&efi_unicode_collation_protocol);
> > if (ret != EFI_SUCCESS)
> > goto failure;
> >
>
next prev parent reply other threads:[~2019-04-17 6:57 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-16 4:24 [U-Boot] [RFC v3 00/10] efi_loader: rework bootefi/bootmgr AKASHI Takahiro
2019-04-16 4:24 ` [U-Boot] [RFC v3 01/10] efi_loader: device_path: handle special case of loading AKASHI Takahiro
2019-04-16 4:44 ` Heinrich Schuchardt
2019-04-16 4:24 ` [U-Boot] [RFC v3 02/10] efi_loader: export root node handle AKASHI Takahiro
2019-04-16 4:48 ` Heinrich Schuchardt
2019-04-17 6:57 ` AKASHI Takahiro [this message]
2019-04-16 4:24 ` [U-Boot] [RFC v3 03/10] cmd: bootefi: carve out fdt handling from do_bootefi() AKASHI Takahiro
2019-04-16 4:54 ` Heinrich Schuchardt
2019-04-17 7:01 ` AKASHI Takahiro
2019-04-17 16:35 ` Heinrich Schuchardt
2019-04-18 0:16 ` AKASHI Takahiro
2019-04-16 4:24 ` [U-Boot] [RFC v3 04/10] cmd: bootefi: merge efi_install_fdt() and efi_process_fdt() AKASHI Takahiro
2019-04-16 5:05 ` Heinrich Schuchardt
2019-04-17 10:53 ` Heinrich Schuchardt
2019-04-16 4:24 ` [U-Boot] [RFC v3 05/10] cmd: bootefi: carve out efi_selftest code from do_bootefi() AKASHI Takahiro
2019-04-16 5:21 ` Heinrich Schuchardt
2019-04-17 7:19 ` AKASHI Takahiro
2019-04-16 4:24 ` [U-Boot] [RFC v3 06/10] cmd: bootefi: move do_bootefi_bootmgr_exec() forward AKASHI Takahiro
2019-04-16 5:22 ` Heinrich Schuchardt
2019-04-16 4:24 ` [U-Boot] [RFC v3 07/10] cmd: bootefi: carve out bootmgr code from do_bootefi() AKASHI Takahiro
2019-04-16 4:24 ` [U-Boot] [RFC v3 08/10] cmd: bootefi: carve out do_boot_efi() " AKASHI Takahiro
2019-04-16 5:31 ` Heinrich Schuchardt
2019-04-17 7:43 ` AKASHI Takahiro
2019-04-16 4:24 ` [U-Boot] [RFC v3 09/10] efi_loader: rework bootmgr/bootefi using load_image API AKASHI Takahiro
2019-04-16 10:56 ` Heinrich Schuchardt
2019-04-16 16:20 ` Heinrich Schuchardt
2019-04-18 8:29 ` Alexander Graf
2019-04-18 0:13 ` AKASHI Takahiro
2019-04-18 3:06 ` AKASHI Takahiro
2019-04-16 4:24 ` [U-Boot] [RFC v3 10/10] cmd: add efibootmgr command AKASHI Takahiro
2019-04-16 5:27 ` Heinrich Schuchardt
2019-04-17 8:07 ` AKASHI Takahiro
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=20190417065721.GP7158@linaro.org \
--to=takahiro.akashi@linaro.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox