summaryrefslogtreecommitdiff
path: root/include/efi_loader.h
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2017-09-13 18:05:38 -0400
committerAlexander Graf <agraf@suse.de>2017-09-20 11:08:01 +0200
commit9975fe96b697b6d64bde3f77cd08612fec812b47 (patch)
treee246223b20ba06aeddbe83b7a159f1b6285a40f6 /include/efi_loader.h
parentad644e7c18238026fecc647f62584d87d2c5b0a3 (diff)
efi_loader: add bootmgr
Similar to a "real" UEFI implementation, the bootmgr looks at the BootOrder and BootXXXX variables to try to find an EFI payload to load and boot. This is added as a sub-command of bootefi. The idea is that the distro bootcmd would first try loading a payload via the bootmgr, and then if that fails (ie. first boot or corrupted EFI variables) it would fallback to loading bootaa64.efi. (Which would then load fallback.efi which would look for \EFI\*\boot.csv and populate BootOrder and BootXXXX based on what it found.) Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include/efi_loader.h')
-rw-r--r--include/efi_loader.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h
index d8ea870eb7..2f081f8996 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -82,6 +82,7 @@ extern const struct efi_device_path_to_text_protocol efi_device_path_to_text;
uint16_t *efi_dp_str(struct efi_device_path *dp);
+extern const efi_guid_t efi_global_variable_guid;
extern const efi_guid_t efi_guid_console_control;
extern const efi_guid_t efi_guid_device_path;
extern const efi_guid_t efi_guid_loaded_image;
@@ -232,6 +233,8 @@ efi_status_t efi_install_configuration_table(const efi_guid_t *guid, void *table
void efi_setup_loaded_image(struct efi_loaded_image *info, struct efi_object *obj,
struct efi_device_path *device_path,
struct efi_device_path *file_path);
+efi_status_t efi_load_image_from_path(struct efi_device_path *file_path,
+ void **buffer);
#ifdef CONFIG_EFI_LOADER_BOUNCE_BUFFER
extern void *efi_bounce_buffer;
@@ -319,6 +322,9 @@ efi_status_t EFIAPI efi_set_variable(s16 *variable_name,
efi_guid_t *vendor, u32 attributes,
unsigned long data_size, void *data);
+void *efi_bootmgr_load(struct efi_device_path **device_path,
+ struct efi_device_path **file_path);
+
#else /* defined(EFI_LOADER) && !defined(CONFIG_SPL_BUILD) */
/* Without CONFIG_EFI_LOADER we don't have a runtime section, stub it out */