[Concept,03/18] efi: Allow inclusion of EFI-runtime headers

Message ID 20250902152158.2285264-4-sjg@u-boot.org
State New
Headers
Series efi: Improve integration of the app with a Shim environment |

Commit Message

Simon Glass Sept. 2, 2025, 3:21 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

Some headers use the __efi_runtime macro in their declarations. With the
app we do not have a separate runtime sections, so define this to be
empty. This allows the headers to be included from the app.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 include/efi.h | 5 +++++
 1 file changed, 5 insertions(+)
  

Patch

diff --git a/include/efi.h b/include/efi.h
index 6c2c1f815dd..6caa51c38a7 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -58,6 +58,11 @@  struct udevice;
 #define EFI32_LOADER_SIGNATURE	"EL32"
 #define EFI64_LOADER_SIGNATURE	"EL64"
 
+#ifdef CONFIG_EFI_APP
+/* add an empty value for this so that efi_variables.h can be included */
+#define __efi_runtime
+#endif
+
 /**
  * struct efi_device_path - device path protocol
  *