
From: Simon Glass <sjg@chromium.org> This value is useful when running a binary, so provide a function to obtain it. Signed-off-by: Simon Glass <sjg@chromium.org> --- include/efi.h | 7 +++++++ lib/efi_client/efi.c | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/include/efi.h b/include/efi.h index fb37de38334..c7de1f82ac7 100644 --- a/include/efi.h +++ b/include/efi.h @@ -604,6 +604,13 @@ struct efi_system_table *efi_get_sys_table(void); */ struct efi_boot_services *efi_get_boot(void); +/** + * efi_get_parent_image() - Get the handle of the parent image + * + * Return: parent-image handle + */ +efi_handle_t efi_get_parent_image(void); + /** * efi_get_ram_base() - Find the base of RAM * diff --git a/lib/efi_client/efi.c b/lib/efi_client/efi.c index 86856014c3e..e670e1f7169 100644 --- a/lib/efi_client/efi.c +++ b/lib/efi_client/efi.c @@ -65,6 +65,11 @@ struct efi_boot_services *efi_get_boot(void) return global_priv->boot; } +efi_handle_t efi_get_parent_image(void) +{ + return global_priv->parent_image; +} + unsigned long efi_get_ram_base(void) { return global_priv->ram_base; -- 2.43.0