summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-09-21 07:31:23 -0400
committerTom Rini <trini@konsulko.com>2019-09-21 07:31:23 -0400
commit390183b58179ddaf986422f4d9446c596660f7e0 (patch)
treed2401285ea91806eeac338eeaf721d855c896f4b /include
parentd6c7309f561ac832c080e5ec07b0af9c8da319a8 (diff)
parent79907a4f8429aef161add59b3d026cf2c734c1aa (diff)
Merge tag 'efi-2019-10-rc4-5' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for v2019.10-rc4 (5) This patch set fixes errors in the UEFI sub-system and adds a function to compare u16 strings which is prerequisite for further patches.
Diffstat (limited to 'include')
-rw-r--r--include/charset.h15
-rw-r--r--include/efi_loader.h8
2 files changed, 23 insertions, 0 deletions
diff --git a/include/charset.h b/include/charset.h
index 020f8a90df..fde6bddbc2 100644
--- a/include/charset.h
+++ b/include/charset.h
@@ -168,6 +168,21 @@ s32 utf_to_lower(const s32 code);
*/
s32 utf_to_upper(const s32 code);
+/*
+ * u16_strncmp() - compare two u16 string
+ *
+ * @s1: first string to compare
+ * @s2: second string to compare
+ * @n: maximum number of u16 to compare
+ * Return: 0 if the first n u16 are the same in s1 and s2
+ * < 0 if the first different u16 in s1 is less than the
+ * corresponding u16 in s2
+ * > 0 if the first different u16 in s1 is greater than the
+ * corresponding u16 in s2
+ */
+int u16_strncmp(const u16 *s1, const u16 *s2, size_t n);
+#define u16_strcmp(s1, s2) u16_strncmp((s1), (s2), SIZE_MAX)
+
/**
* u16_strlen - count non-zero words
*
diff --git a/include/efi_loader.h b/include/efi_loader.h
index dd24a2746c..53b369945b 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -24,6 +24,10 @@
#define U_BOOT_GUID \
EFI_GUID(0xe61d73b9, 0xa384, 0x4acc, \
0xae, 0xab, 0x82, 0xe8, 0x28, 0xf3, 0x62, 0x8b)
+/* GUID used as host device on sandbox */
+#define U_BOOT_HOST_DEV_GUID \
+ EFI_GUID(0xbbe4e671, 0x5773, 0x4ea1, \
+ 0x9a, 0xab, 0x3a, 0x7d, 0xbf, 0x40, 0xc4, 0x82)
/* Root node */
extern efi_handle_t efi_root;
@@ -121,6 +125,10 @@ uint16_t *efi_dp_str(struct efi_device_path *dp);
/* GUID of the U-Boot root node */
extern const efi_guid_t efi_u_boot_guid;
+#ifdef CONFIG_SANDBOX
+/* GUID of U-Boot host device on sandbox */
+extern const efi_guid_t efi_guid_host_dev;
+#endif
/* GUID of the EFI_BLOCK_IO_PROTOCOL */
extern const efi_guid_t efi_block_io_guid;
extern const efi_guid_t efi_global_variable_guid;