summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-07-23 22:29:53 -0400
committerTom Rini <trini@konsulko.com>2019-07-23 22:29:53 -0400
commitfe4243870df152f839f88e5aa355f53cfba0a866 (patch)
tree6f748cbe5c48597a4075ebea87344c4763736686 /include
parentff8c23e784f57a7098e91a200ed7f5a48612b653 (diff)
parentf62be16ddb76a32e6315bb9517b49e639726e1fa (diff)
downloadu-boot-fe4243870df152f839f88e5aa355f53cfba0a866.tar.gz
u-boot-fe4243870df152f839f88e5aa355f53cfba0a866.tar.xz
u-boot-fe4243870df152f839f88e5aa355f53cfba0a866.zip
Merge tag 'efi-2019-10-rc1-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for v2019.10-rc1 (2) * Implement the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event. * Address errors of type -Werror=address-of-packed-member when building with GCC9.1 * Fix an error when adding memory add addres 0x00000000. * Rework some code comments for Sphinx compliance.
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/pe.h16
-rw-r--r--include/charset.h4
-rw-r--r--include/efi_loader.h6
-rw-r--r--include/pe.h16
4 files changed, 21 insertions, 21 deletions
diff --git a/include/asm-generic/pe.h b/include/asm-generic/pe.h
index faae534e37..b247519a3d 100644
--- a/include/asm-generic/pe.h
+++ b/include/asm-generic/pe.h
@@ -29,6 +29,22 @@
#define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000
#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000
+/* Machine types */
+#define IMAGE_FILE_MACHINE_I386 0x014c
+#define IMAGE_FILE_MACHINE_ARM 0x01c0
+#define IMAGE_FILE_MACHINE_THUMB 0x01c2
+#define IMAGE_FILE_MACHINE_ARMNT 0x01c4
+#define IMAGE_FILE_MACHINE_AMD64 0x8664
+#define IMAGE_FILE_MACHINE_ARM64 0xaa64
+#define IMAGE_FILE_MACHINE_RISCV32 0x5032
+#define IMAGE_FILE_MACHINE_RISCV64 0x5064
+
+/* Header magic constants */
+#define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x010b
+#define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x020b
+#define IMAGE_DOS_SIGNATURE 0x5a4d /* MZ */
+#define IMAGE_NT_SIGNATURE 0x00004550 /* PE00 */
+
/* Subsystem type */
#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10
#define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
diff --git a/include/charset.h b/include/charset.h
index 4f7ae8fafd..020f8a90df 100644
--- a/include/charset.h
+++ b/include/charset.h
@@ -178,7 +178,7 @@ s32 utf_to_upper(const s32 code);
* ReturnValue: number of non-zero words.
* This is not the number of utf-16 letters!
*/
-size_t u16_strlen(const u16 *in);
+size_t u16_strlen(const void *in);
/**
* u16_strlen - count non-zero words
@@ -214,7 +214,7 @@ u16 *u16_strcpy(u16 *dest, const u16 *src);
* @src: source buffer (null terminated)
* Return: allocated new buffer on success, NULL on failure
*/
-u16 *u16_strdup(const u16 *src);
+u16 *u16_strdup(const void *src);
/**
* utf16_to_utf8() - Convert an utf16 string to utf8
diff --git a/include/efi_loader.h b/include/efi_loader.h
index db4763fc9b..5298ea7997 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -476,8 +476,8 @@ efi_status_t efi_get_memory_map(efi_uintn_t *memory_map_size,
efi_uintn_t *descriptor_size,
uint32_t *descriptor_version);
/* Adds a range into the EFI memory map */
-uint64_t efi_add_memory_map(uint64_t start, uint64_t pages, int memory_type,
- bool overlap_only_ram);
+efi_status_t efi_add_memory_map(uint64_t start, uint64_t pages, int memory_type,
+ bool overlap_only_ram);
/* Called by board init to initialize the EFI drivers */
efi_status_t efi_driver_init(void);
/* Called by board init to initialize the EFI memory map */
@@ -567,7 +567,7 @@ static inline void ascii2unicode(u16 *unicode, const char *ascii)
*unicode = 0;
}
-static inline int guidcmp(const efi_guid_t *g1, const efi_guid_t *g2)
+static inline int guidcmp(const void *g1, const void *g2)
{
return memcmp(g1, g2, sizeof(efi_guid_t));
}
diff --git a/include/pe.h b/include/pe.h
index 36e1908b7e..bff3b0aa7a 100644
--- a/include/pe.h
+++ b/include/pe.h
@@ -34,22 +34,6 @@ typedef struct _IMAGE_DOS_HEADER {
uint32_t e_lfanew; /* 3c: Offset to extended header */
} IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER;
-#define IMAGE_DOS_SIGNATURE 0x5A4D /* MZ */
-#define IMAGE_NT_SIGNATURE 0x00004550 /* PE00 */
-
-#define IMAGE_FILE_MACHINE_I386 0x014c
-#define IMAGE_FILE_MACHINE_ARM 0x01c0
-#define IMAGE_FILE_MACHINE_THUMB 0x01c2
-#define IMAGE_FILE_MACHINE_ARMNT 0x01c4
-#define IMAGE_FILE_MACHINE_AMD64 0x8664
-#define IMAGE_FILE_MACHINE_ARM64 0xaa64
-#define IMAGE_FILE_MACHINE_RISCV32 0x5032
-#define IMAGE_FILE_MACHINE_RISCV64 0x5064
-
-#define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b
-#define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b
-#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10
-
typedef struct _IMAGE_FILE_HEADER {
uint16_t Machine;
uint16_t NumberOfSections;