]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
efi_loader: export root node handle
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Tue, 16 Apr 2019 04:24:20 +0000 (13:24 +0900)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 22 Apr 2019 22:37:27 +0000 (00:37 +0200)
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.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Rebased.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
include/efi_loader.h
lib/efi_loader/efi_root_node.c

index f7bf7328271a9f4dd27444f44953d04b01b7dab6..93f7672aecbc9cc6a84631d3086eb4b43d9ca84f 100644 (file)
@@ -25,6 +25,9 @@
        EFI_GUID(0xe61d73b9, 0xa384, 0x4acc, \
                 0xae, 0xab, 0x82, 0xe8, 0x28, 0xf3, 0x62, 0x8b)
 
+/* Root node */
+extern efi_handle_t efi_root;
+
 int __efi_entry_check(void);
 int __efi_exit_check(void);
 const char *__efi_nesting(void);
index 392f5c49513d9874fdef858c118aa9fcd0d281cc..e0fcbb85a4d2324dca08723a746e890512f7eda9 100644 (file)
@@ -11,6 +11,8 @@
 
 const efi_guid_t efi_u_boot_guid = U_BOOT_GUID;
 
+efi_handle_t efi_root = NULL;
+
 struct efi_root_dp {
        struct efi_device_path_vendor vendor;
        struct efi_device_path end;
@@ -26,7 +28,6 @@ struct efi_root_dp {
  */
 efi_status_t efi_root_node_register(void)
 {
-       efi_handle_t root = NULL;
        struct efi_root_dp *dp;
 
        /* Create device path protocol */
@@ -46,7 +47,7 @@ efi_status_t efi_root_node_register(void)
        dp->end.length = sizeof(struct efi_device_path);
 
        /* Create root node and install protocols */
-       return EFI_CALL(efi_install_multiple_protocol_interfaces(&root,
+       return EFI_CALL(efi_install_multiple_protocol_interfaces(&efi_root,
                       /* Device path protocol */
                       &efi_guid_device_path, dp,
                       /* Device path to text protocol */