summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/efi.h11
-rw-r--r--include/efi_api.h12
-rw-r--r--include/efi_config.h2
-rw-r--r--include/efi_loader.h7
-rw-r--r--include/menu.h1
5 files changed, 30 insertions, 3 deletions
diff --git a/include/efi.h b/include/efi.h
index 42f4e58a917..c3087d3da28 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -54,9 +54,18 @@
struct efi_device_path;
+/*
+ * The EFI spec defines the EFI_GUID as
+ * "128-bit buffer containing a unique identifier value. Unless otherwise specified,
+ * aligned on a 64-bit boundary".
+ * Page 163 of the UEFI specification v2.10 and
+ * EDK2 reference implementation both define EFI_GUID as
+ * struct { u32 a; u16; b; u16 c; u8 d[8]; }; which is 4-byte
+ * aligned.
+ */
typedef struct {
u8 b[16];
-} efi_guid_t __attribute__((aligned(8)));
+} efi_guid_t __attribute__((aligned(4)));
#define EFI_BITS_PER_LONG (sizeof(long) * 8)
diff --git a/include/efi_api.h b/include/efi_api.h
index 9bd70b0f18c..2d18d25a713 100644
--- a/include/efi_api.h
+++ b/include/efi_api.h
@@ -513,6 +513,16 @@ struct efi_system_table {
struct efi_configuration_table *tables;
};
+/**
+ * efi_main() - entry point of EFI applications
+ *
+ * @image_handle: handle with the Loaded Image Protocol
+ * @systab: pointer to the system table
+ * Return: status code
+ */
+efi_status_t EFIAPI efi_main(efi_handle_t image_handle,
+ struct efi_system_table *systab);
+
#define EFI_LOADED_IMAGE_PROTOCOL_GUID \
EFI_GUID(0x5b1b31a1, 0x9562, 0x11d2, \
0x8e, 0x3f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b)
@@ -817,7 +827,7 @@ struct efi_simple_text_output_protocol {
struct efi_input_key {
u16 scan_code;
- s16 unicode_char;
+ u16 unicode_char;
};
#define EFI_SHIFT_STATE_INVALID 0x00000000
diff --git a/include/efi_config.h b/include/efi_config.h
index e5edbb5e090..01ce9b2b06d 100644
--- a/include/efi_config.h
+++ b/include/efi_config.h
@@ -11,7 +11,7 @@
#include <efi_loader.h>
#include <menu.h>
-#define EFICONFIG_ENTRY_NUM_MAX INT_MAX
+#define EFICONFIG_ENTRY_NUM_MAX (INT_MAX - 1)
#define EFICONFIG_VOLUME_PATH_MAX 512
#define EFICONFIG_FILE_PATH_MAX 512
#define EFICONFIG_FILE_PATH_BUF_SIZE (EFICONFIG_FILE_PATH_MAX * sizeof(u16))
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 4560b0d04cb..c664d6cdf2c 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -1137,4 +1137,11 @@ efi_status_t efi_console_get_u16_string
efi_status_t efi_disk_get_device_name(const efi_handle_t handle, char *buf, int size);
+/**
+ * efi_add_known_memory() - add memory banks to EFI memory map
+ *
+ * This weak function may be overridden for specific architectures.
+ */
+void efi_add_known_memory(void);
+
#endif /* _EFI_LOADER_H */
diff --git a/include/menu.h b/include/menu.h
index 1e88141d6bf..64ce89b7d26 100644
--- a/include/menu.h
+++ b/include/menu.h
@@ -53,6 +53,7 @@ enum bootmenu_key {
BKEY_PLUS,
BKEY_MINUS,
BKEY_SPACE,
+ BKEY_SAVE,
BKEY_COUNT,
};