summaryrefslogtreecommitdiff
path: root/include/efi.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-12-29 21:57:45 +0300
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2021-12-31 08:45:01 +0300
commit2a1cf03ea4ff9a43fd990dc9ae0110464569c59b (patch)
tree065ee5c259e3d84d434a765a2bfc49c3b9322c2e /include/efi.h
parent184be592580178dd149800459c8817199160ca22 (diff)
downloadu-boot-2a1cf03ea4ff9a43fd990dc9ae0110464569c59b.tar.xz
efi: Share struct efi_priv between the app and stub code
At present each of these has its own static variable and helper functions. Move them into a shared file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'include/efi.h')
-rw-r--r--include/efi.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/efi.h b/include/efi.h
index ac50a9c899..8c3f332468 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -475,6 +475,27 @@ extern char _binary_u_boot_bin_start[], _binary_u_boot_bin_end[];
EFI_VARIABLE_APPEND_WRITE)
/**
+ * efi_get_priv() - Get access to the EFI-private information
+ *
+ * This struct it used by both the stub and the app to record things about the
+ * EFI environment. It is not available in U-Boot proper after the stub has
+ * jumped there. Use efi_info_get() to obtain info in that case.
+ *
+ * Return: pointer to private info
+ */
+struct efi_priv *efi_get_priv(void);
+
+/**
+ * efi_set_priv() - Set up a pointer to the EFI-private information
+ *
+ * This is called in the stub and app to record the location of this
+ * information.
+ *
+ * @priv: New location of private data
+ */
+void efi_set_priv(struct efi_priv *priv);
+
+/**
* efi_get_sys_table() - Get access to the main EFI system table
*
* @return pointer to EFI system table