summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-02-10 21:45:15 +0300
committerTom Rini <trini@konsulko.com>2023-02-10 21:45:15 +0300
commitc34009d5a9a570355bd9efa0853e408ef8c210f3 (patch)
tree98c945c6e428d0e3e6cf05a951bb649358e51efd /include
parenta1e6b529e57c622e862e93fa6da03d9504565089 (diff)
parent124725732fdfd63ebb2f6514c690181ccbe13444 (diff)
downloadu-boot-c34009d5a9a570355bd9efa0853e408ef8c210f3.tar.xz
Merge tag 'efi-2023-04-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2023-04-rc2 Documentation: * Provide page with links to talks on U-Boot UEFI: * Enable CTRL+S to save the boot order in eficonfig command * Run attribute check for QueryVariableInfo() only for the file store * Bug fixes Others: * Improve output formatting of the coninfo command # -----END PGP SIGNATURE----- # gpg: Signature made Fri 10 Feb 2023 12:15:45 PM EST # gpg: using RSA key 6DC4F9C71F29A6FA06B76D33C481DBBC2C051AC4 # gpg: Good signature from "Heinrich Schuchardt <xypron.glpk@gmx.de>" [unknown] # gpg: aka "[jpeg image of size 1389]" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 6DC4 F9C7 1F29 A6FA 06B7 6D33 C481 DBBC 2C05 1AC4
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 42f4e58a91..c3087d3da2 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 9bd70b0f18..2d18d25a71 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 e5edbb5e09..01ce9b2b06 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 4560b0d04c..c664d6cdf2 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 1e88141d6b..64ce89b7d2 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,
};