[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/8] PE: Add LoongArch definitions
From: |
Xiaotian Wu |
Subject: |
[PATCH 1/8] PE: Add LoongArch definitions |
Date: |
Fri, 7 Jan 2022 16:13:14 +0800 |
Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn>
Signed-off-by: Zhou Yang <zhouyang@loongson.cn>
---
include/grub/efi/pe32.h | 36 ++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/include/grub/efi/pe32.h b/include/grub/efi/pe32.h
index 0ed8781f0..de56edef6 100644
--- a/include/grub/efi/pe32.h
+++ b/include/grub/efi/pe32.h
@@ -77,6 +77,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_LOONGARCH32 0x6232
+#define GRUB_PE32_MACHINE_LOONGARCH64 0x6264
#define GRUB_PE32_MACHINE_RISCV32 0x5032
#define GRUB_PE32_MACHINE_RISCV64 0x5064
@@ -283,22 +285,24 @@ struct grub_pe32_fixup_block
#define GRUB_PE32_FIXUP_ENTRY(type, offset) (((type) << 12) | (offset))
-#define GRUB_PE32_REL_BASED_ABSOLUTE 0
-#define GRUB_PE32_REL_BASED_HIGH 1
-#define GRUB_PE32_REL_BASED_LOW 2
-#define GRUB_PE32_REL_BASED_HIGHLOW 3
-#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
+#define GRUB_PE32_REL_BASED_ABSOLUTE 0
+#define GRUB_PE32_REL_BASED_HIGH 1
+#define GRUB_PE32_REL_BASED_LOW 2
+#define GRUB_PE32_REL_BASED_HIGHLOW 3
+#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_LOONGARCH32_MARK_LA 8
+#define GRUB_PE32_REL_BASED_LOONGARCH64_MARK_LA 8
+#define GRUB_PE32_REL_BASED_IA64_IMM64 9
+#define GRUB_PE32_REL_BASED_DIR64 10
+#define GRUB_PE32_REL_BASED_HIGH3ADJ 11
struct grub_pe32_symbol
{
--
2.32.0
- Add LoongArch support, Xiaotian Wu, 2022/01/07
- [PATCH 1/8] PE: Add LoongArch definitions,
Xiaotian Wu <=
- [PATCH 3/8] LoongArch: Add setjmp implementation, Xiaotian Wu, 2022/01/07
- [PATCH 4/8] LoongArch: Add early startup code, Xiaotian Wu, 2022/01/07
- [PATCH 2/8] Add LoongArch definitions, Xiaotian Wu, 2022/01/07
- [PATCH 5/8] LoongArch: Add stubs for Linux loading commands, Xiaotian Wu, 2022/01/07
- [PATCH 6/8] LoongArch: Add awareness for LoongArch relocations, Xiaotian Wu, 2022/01/07
- [PATCH 7/8] LoongArch: Add auxiliary files, Xiaotian Wu, 2022/01/07
- [PATCH 8/8] LoongArch: Add to build system, Xiaotian Wu, 2022/01/07