[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 02/11] PE: Add RISC-V definitions
From: |
Alexander Graf |
Subject: |
[PATCH v5 02/11] PE: Add RISC-V definitions |
Date: |
Mon, 28 Jan 2019 13:44:38 +0100 |
The PE format defines magic numbers as well as relocation identifiers for
RISC-V. Add them to our include file, so we can make use of them.
Signed-off-by: Alexander Graf <address@hidden>
Reviewed-by: Leif Lindholm <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Reviewed-by: Bin Meng <address@hidden>
Tested-by: Bin Meng <address@hidden>
Reviewed-by: Daniel Kiper <address@hidden>
---
include/grub/efi/pe32.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/grub/efi/pe32.h b/include/grub/efi/pe32.h
index 7d44732d2..d1359eb66 100644
--- a/include/grub/efi/pe32.h
+++ b/include/grub/efi/pe32.h
@@ -70,6 +70,8 @@ struct grub_pe32_coff_header
#define GRUB_PE32_MACHINE_X86_64 0x8664
#define GRUB_PE32_MACHINE_ARMTHUMB_MIXED 0x01c2
#define GRUB_PE32_MACHINE_ARM64 0xAA64
+#define GRUB_PE32_MACHINE_RISCV32 0x5032
+#define GRUB_PE32_MACHINE_RISCV64 0x5064
#define GRUB_PE32_RELOCS_STRIPPED 0x0001
#define GRUB_PE32_EXECUTABLE_IMAGE 0x0002
@@ -281,9 +283,12 @@ struct grub_pe32_fixup_block
#define GRUB_PE32_REL_BASED_HIGHADJ 4
#define GRUB_PE32_REL_BASED_MIPS_JMPADDR 5
#define GRUB_PE32_REL_BASED_ARM_MOV32A 5
+#define GRUB_PE32_REL_BASED_RISCV_HI20 5
#define GRUB_PE32_REL_BASED_SECTION 6
#define GRUB_PE32_REL_BASED_REL 7
#define GRUB_PE32_REL_BASED_ARM_MOV32T 7
+#define GRUB_PE32_REL_BASED_RISCV_LOW12I 7
+#define GRUB_PE32_REL_BASED_RISCV_LOW12S 8
#define GRUB_PE32_REL_BASED_IA64_IMM64 9
#define GRUB_PE32_REL_BASED_DIR64 10
#define GRUB_PE32_REL_BASED_HIGH3ADJ 11
--
2.12.3
- [PATCH v5 00/11] Add RISC-V support, Alexander Graf, 2019/01/28
- [PATCH v5 02/11] PE: Add RISC-V definitions,
Alexander Graf <=
- [PATCH v5 03/11] elf.h: Add RISC-V definitions, Alexander Graf, 2019/01/28
- [PATCH v5 01/11] efi: Rename armxx to arch, Alexander Graf, 2019/01/28
- [PATCH v5 05/11] RISC-V: Add early startup code, Alexander Graf, 2019/01/28
- [PATCH v5 09/11] RISC-V: Add libgcc helpers for clz, Alexander Graf, 2019/01/28
- [PATCH v5 11/11] fdt: Treat device tree file type like ACPI, Alexander Graf, 2019/01/28
- [PATCH v5 07/11] RISC-V: Add awareness for RISC-V reloations, Alexander Graf, 2019/01/28
- [PATCH v5 10/11] RISC-V: Add to build system, Alexander Graf, 2019/01/28
- [PATCH v5 04/11] RISC-V: Add setjmp implementation, Alexander Graf, 2019/01/28
- [PATCH v5 06/11] RISC-V: Add Linux load logic, Alexander Graf, 2019/01/28
- [PATCH v5 08/11] RISC-V: Add auxiliary files, Alexander Graf, 2019/01/28