[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v12 01/10] PE: Add LoongArch definitions
From: |
Xiaotian Wu |
Subject: |
[PATCH v12 01/10] PE: Add LoongArch definitions |
Date: |
Mon, 5 Dec 2022 18:46:29 +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 98c4ff177..101859af1 100644
--- a/include/grub/efi/pe32.h
+++ b/include/grub/efi/pe32.h
@@ -88,6 +88,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
@@ -291,22 +293,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.38.1
- [PATCH v12 00/10] Add support for LoongArch, Xiaotian Wu, 2022/12/05
- [PATCH v12 01/10] PE: Add LoongArch definitions,
Xiaotian Wu <=
- [PATCH v12 03/10] LoongArch: Add setjmp implementation, Xiaotian Wu, 2022/12/05
- [PATCH v12 05/10] LoongArch: Add efi stubs kernel loader support, Xiaotian Wu, 2022/12/05
- [PATCH v12 06/10] LoongArch: Add awareness for LoongArch relocations, Xiaotian Wu, 2022/12/05
- [PATCH v12 02/10] Add LoongArch definitions, Xiaotian Wu, 2022/12/05
- [PATCH v12 04/10] LoongArch: Add early startup code, Xiaotian Wu, 2022/12/05