diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/pe.h | 16 | ||||
-rw-r--r-- | include/charset.h | 4 | ||||
-rw-r--r-- | include/efi_loader.h | 6 | ||||
-rw-r--r-- | include/pe.h | 16 |
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; |