summaryrefslogtreecommitdiff
path: root/lib/efi/efi.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-12-31 07:28:36 -0500
committerTom Rini <trini@konsulko.com>2021-12-31 07:28:36 -0500
commit5fec3c853d5e6b998db66f586871839c408195a3 (patch)
treec3368f8625b3a9383f30745ce1fafafc35cafac3 /lib/efi/efi.c
parent87a9aa604de8a4a50642e25b88af328ab375893b (diff)
parent86bb48880d75653d692cd02edb81888a2ed2dbb2 (diff)
Merge tag 'efi-next' of https://source.denx.de/u-boot/custodians/u-boot-efi into next
Pull request of efi-next Documentation: * Add Sunxi board description UEFI: * Improvements to U-Boot running on top of UEFI
Diffstat (limited to 'lib/efi/efi.c')
-rw-r--r--lib/efi/efi.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/efi/efi.c b/lib/efi/efi.c
index 69e52e45748..cd6bf47b180 100644
--- a/lib/efi/efi.c
+++ b/lib/efi/efi.c
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
+ * Functions shared by the app and stub
+ *
* Copyright (c) 2015 Google, Inc
*
* EFI information obtained here:
@@ -17,6 +19,33 @@
#include <efi.h>
#include <efi_api.h>
+static struct efi_priv *global_priv;
+
+struct efi_priv *efi_get_priv(void)
+{
+ return global_priv;
+}
+
+void efi_set_priv(struct efi_priv *priv)
+{
+ global_priv = priv;
+}
+
+struct efi_system_table *efi_get_sys_table(void)
+{
+ return global_priv->sys_table;
+}
+
+struct efi_boot_services *efi_get_boot(void)
+{
+ return global_priv->boot;
+}
+
+unsigned long efi_get_ram_base(void)
+{
+ return global_priv->ram_base;
+}
+
/*
* Global declaration of gd.
*