summaryrefslogtreecommitdiff
path: root/include/efi_loader.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/efi_loader.h')
-rw-r--r--include/efi_loader.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h
index d9e9d8fa7b..8b3aaddd59 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -30,6 +30,7 @@
#define EFI_EXIT(ret) efi_exit_func(ret);
+extern struct efi_runtime_services efi_runtime_services;
extern struct efi_system_table systab;
extern const struct efi_simple_text_output_protocol efi_con_out;
@@ -40,6 +41,9 @@ extern const efi_guid_t efi_guid_console_control;
extern const efi_guid_t efi_guid_device_path;
extern const efi_guid_t efi_guid_loaded_image;
+extern unsigned int __efi_runtime_start, __efi_runtime_stop;
+extern unsigned int __efi_runtime_rel_start, __efi_runtime_rel_stop;
+
/*
* While UEFI objects can have callbacks, you can also call functions on
* protocols (classes) themselves. This struct maps a protocol GUID to its
@@ -101,9 +105,22 @@ void efi_save_gd(void);
void efi_restore_gd(void);
/* Called from EFI_EXIT on callback exit to restore the gd register */
efi_status_t efi_exit_func(efi_status_t ret);
+/* Call this to relocate the runtime section to an address space */
+void efi_runtime_relocate(ulong offset, struct efi_mem_desc *map);
+
+/*
+ * Use these to indicate that your code / data should go into the EFI runtime
+ * section and thus still be available when the OS is running
+ */
+#define EFI_RUNTIME_DATA __attribute__ ((section ("efi_runtime_data")))
+#define EFI_RUNTIME_TEXT __attribute__ ((section ("efi_runtime_text")))
#else /* defined(EFI_LOADER) && !defined(CONFIG_SPL_BUILD) */
+/* Without CONFIG_EFI_LOADER we don't have a runtime section, stub it out */
+#define EFI_RUNTIME_DATA
+#define EFI_RUNTIME_TEXT
+
/* No loader configured, stub out EFI_ENTRY */
static inline void efi_restore_gd(void) { }