summaryrefslogtreecommitdiffstats
path: root/include/efi_loader.h
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2021-03-17 21:54:59 +0200
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2021-03-25 20:14:25 +0100
commit37c3ca5c0b1a449356279efdcaca346b3eae84fd (patch)
treef2148b2140f74289665143c3c995179b705dad05 /include/efi_loader.h
parent76e8acce12fe6e914fdab422c8af44956c1dac04 (diff)
downloadu-boot-37c3ca5c0b1a449356279efdcaca346b3eae84fd.tar.gz
u-boot-37c3ca5c0b1a449356279efdcaca346b3eae84fd.tar.xz
u-boot-37c3ca5c0b1a449356279efdcaca346b3eae84fd.zip
efi_loader: Add helper functions for EFI
A following patch introduces a different logic for loading initrd's based on the EFI_LOAD_FILE2_PROTOCOL. Since similar logic can be applied in the future for other system files (i.e DTBs), let's add some helper functions which will retrieve and parse file paths stored in EFI variables. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'include/efi_loader.h')
-rw-r--r--include/efi_loader.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 5d534e69bb..9c227005d1 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -558,6 +558,11 @@ struct efi_simple_file_system_protocol *efi_simple_file_system(
/* open file from device-path: */
struct efi_file_handle *efi_file_from_path(struct efi_device_path *fp);
+efi_status_t efi_file_size(struct efi_file_handle *fh, efi_uintn_t *size);
+
+/* get a device path from a Boot#### option */
+struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t guid);
+
/**
* efi_size_in_pages() - convert size in bytes to size in pages
*
@@ -723,6 +728,8 @@ efi_status_t EFIAPI efi_query_variable_info(
u64 *remaining_variable_storage_size,
u64 *maximum_variable_size);
+void *efi_get_var(u16 *name, const efi_guid_t *vendor, efi_uintn_t *size);
+
/*
* See section 3.1.3 in the v2.7 UEFI spec for more details on
* the layout of EFI_LOAD_OPTION. In short it is: