summaryrefslogtreecommitdiff
path: root/arch
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 /arch
parentff8c23e784f57a7098e91a200ed7f5a48612b653 (diff)
parentf62be16ddb76a32e6315bb9517b49e639726e1fa (diff)
downloadu-boot-fe4243870df152f839f88e5aa355f53cfba0a866.tar.gz
u-boot-fe4243870df152f839f88e5aa355f53cfba0a866.tar.bz2
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 'arch')
-rw-r--r--arch/arm/lib/crt0_aarch64_efi.S9
-rw-r--r--arch/arm/lib/crt0_arm_efi.S9
-rw-r--r--arch/riscv/lib/crt0_riscv_efi.S11
3 files changed, 13 insertions, 16 deletions
diff --git a/arch/arm/lib/crt0_aarch64_efi.S b/arch/arm/lib/crt0_aarch64_efi.S
index cb205fa30a..368933ecf2 100644
--- a/arch/arm/lib/crt0_aarch64_efi.S
+++ b/arch/arm/lib/crt0_aarch64_efi.S
@@ -17,14 +17,13 @@
*/
.globl ImageBase
ImageBase:
- .ascii "MZ"
+ .short IMAGE_DOS_SIGNATURE /* 'MZ' */
.skip 58 /* 'MZ' + pad + offset == 64 */
.long pe_header - ImageBase /* Offset to the PE header */
pe_header:
- .ascii "PE"
- .short 0
+ .long IMAGE_NT_SIGNATURE /* 'PE' */
coff_header:
- .short 0xaa64 /* AArch64 */
+ .short IMAGE_FILE_MACHINE_ARM64 /* AArch64 */
.short 2 /* nr_sections */
.long 0 /* TimeDateStamp */
.long 0 /* PointerToSymbolTable */
@@ -36,7 +35,7 @@ coff_header:
IMAGE_FILE_LOCAL_SYMS_STRIPPED | \
IMAGE_FILE_DEBUG_STRIPPED)
optional_header:
- .short 0x20b /* PE32+ format */
+ .short IMAGE_NT_OPTIONAL_HDR64_MAGIC /* PE32+ format */
.byte 0x02 /* MajorLinkerVersion */
.byte 0x14 /* MinorLinkerVersion */
.long _edata - _start /* SizeOfCode */
diff --git a/arch/arm/lib/crt0_arm_efi.S b/arch/arm/lib/crt0_arm_efi.S
index 5470e2ff0e..cc8a115f31 100644
--- a/arch/arm/lib/crt0_arm_efi.S
+++ b/arch/arm/lib/crt0_arm_efi.S
@@ -16,14 +16,13 @@
*/
.globl image_base
image_base:
- .ascii "MZ"
+ .short IMAGE_DOS_SIGNATURE /* 'MZ' */
.skip 58 /* 'MZ' + pad + offset == 64 */
.long pe_header - image_base /* Offset to the PE header */
pe_header:
- .ascii "PE"
- .short 0
+ .long IMAGE_NT_SIGNATURE /* 'PE' */
coff_header:
- .short 0x1c2 /* Mixed ARM/Thumb */
+ .short IMAGE_FILE_MACHINE_THUMB /* Mixed ARM/Thumb */
.short 2 /* nr_sections */
.long 0 /* TimeDateStamp */
.long 0 /* PointerToSymbolTable */
@@ -36,7 +35,7 @@ coff_header:
IMAGE_FILE_32BIT_MACHINE | \
IMAGE_FILE_DEBUG_STRIPPED)
optional_header:
- .short 0x10b /* PE32 format */
+ .short IMAGE_NT_OPTIONAL_HDR32_MAGIC /* PE32 format */
.byte 0x02 /* MajorLinkerVersion */
.byte 0x14 /* MinorLinkerVersion */
.long _edata - _start /* SizeOfCode */
diff --git a/arch/riscv/lib/crt0_riscv_efi.S b/arch/riscv/lib/crt0_riscv_efi.S
index b7b5329e1f..87fe1e56f9 100644
--- a/arch/riscv/lib/crt0_riscv_efi.S
+++ b/arch/riscv/lib/crt0_riscv_efi.S
@@ -14,12 +14,12 @@
#define SIZE_LONG 8
#define SAVE_LONG(reg, idx) sd reg, (idx*SIZE_LONG)(sp)
#define LOAD_LONG(reg, idx) ld reg, (idx*SIZE_LONG)(sp)
-#define PE_MACHINE 0x5064
+#define PE_MACHINE IMAGE_FILE_MACHINE_RISCV64
#else
#define SIZE_LONG 4
#define SAVE_LONG(reg, idx) sw reg, (idx*SIZE_LONG)(sp)
#define LOAD_LONG(reg, idx) lw reg, (idx*SIZE_LONG)(sp)
-#define PE_MACHINE 0x5032
+#define PE_MACHINE IMAGE_FILE_MACHINE_RISCV32
#endif
@@ -30,12 +30,11 @@
*/
.globl ImageBase
ImageBase:
- .ascii "MZ"
+ .short IMAGE_DOS_SIGNATURE /* 'MZ' */
.skip 58 /* 'MZ' + pad + offset == 64 */
.long pe_header - ImageBase /* Offset to the PE header */
pe_header:
- .ascii "PE"
- .short 0
+ .long IMAGE_NT_SIGNATURE /* 'PE' */
coff_header:
.short PE_MACHINE /* RISC-V 64/32-bit */
.short 2 /* nr_sections */
@@ -49,7 +48,7 @@ coff_header:
IMAGE_FILE_LOCAL_SYMS_STRIPPED | \
IMAGE_FILE_DEBUG_STRIPPED)
optional_header:
- .short 0x20b /* PE32+ format */
+ .short IMAGE_NT_OPTIONAL_HDR64_MAGIC /* PE32+ format */
.byte 0x02 /* MajorLinkerVersion */
.byte 0x14 /* MinorLinkerVersion */
.long _edata - _start /* SizeOfCode */