aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pe.h
diff options
context:
space:
mode:
authorHuacai Chen <chenhuacai@loongson.cn>2022-08-19 18:20:37 +0800
committerArd Biesheuvel <ardb@kernel.org>2022-09-06 11:19:34 +0200
commitead384d956345681e1ddf97890d5e15ded015f07 (patch)
treeaa03bbe0c8e154a3743f28b7eccb281912c20dec /include/linux/pe.h
parentLinux 6.0-rc1 (diff)
downloadlinux-dev-ead384d956345681e1ddf97890d5e15ded015f07.tar.xz
linux-dev-ead384d956345681e1ddf97890d5e15ded015f07.zip
efi/loongarch: Add efistub booting support
This patch adds efistub booting support, which is the standard UEFI boot protocol for LoongArch to use. We use generic efistub, which means we can pass boot information (i.e., system table, memory map, kernel command line, initrd) via a light FDT and drop a lot of non-standard code. We use a flat mapping to map the efi runtime in the kernel's address space. In efi, VA = PA; in kernel, VA = PA + PAGE_OFFSET. As a result, flat mapping is not identity mapping, SetVirtualAddressMap() is still needed for the efi runtime. Tested-by: Xi Ruoyao <xry111@xry111.site> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> [ardb: change fpic to fpie as suggested by Xi Ruoyao] Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'include/linux/pe.h')
-rw-r--r--include/linux/pe.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pe.h b/include/linux/pe.h
index daf09ffffe38..1d3836ef9d92 100644
--- a/include/linux/pe.h
+++ b/include/linux/pe.h
@@ -65,6 +65,8 @@
#define IMAGE_FILE_MACHINE_SH5 0x01a8
#define IMAGE_FILE_MACHINE_THUMB 0x01c2
#define IMAGE_FILE_MACHINE_WCEMIPSV2 0x0169
+#define IMAGE_FILE_MACHINE_LOONGARCH32 0x6232
+#define IMAGE_FILE_MACHINE_LOONGARCH64 0x6264
/* flags */
#define IMAGE_FILE_RELOCS_STRIPPED 0x0001