diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-07-11 06:39:32 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-07-16 22:17:14 +0000 |
commit | a35c33c0dc9ef9d2ab44cf677ac17a359c79b019 (patch) | |
tree | 57f3de7da7c34beeca79b0e87d3a278e77da5494 /include/asm-generic | |
parent | 38671d4f1cd44c22e5485606034ed5f3be9f1211 (diff) | |
download | u-boot-a35c33c0dc9ef9d2ab44cf677ac17a359c79b019.tar.gz |
efi_loader: use predefined constants in crt0_*_efi.S
We should use predefined constants instead of magic numbers.
Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.
Use these constants in crt0_*_efi.S.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/pe.h | 16 |
1 files changed, 16 insertions, 0 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 |