From 1c8bf2dc0127b06f97a7973488c7f8cf9a5f7c19 Mon Sep 17 00:00:00 2001 From: Youling Tang Date: Wed, 28 Sep 2022 10:28:23 +0800 Subject: LoongArch: Add kexec/kdump support Add the 64-bit processing support of the LoongArch architecture. For the time being, the quick restart function(kexec) is supported. That is, the "kexec -l" and "kexec -e" commands can be used normally. At the same time, the crash dump function also supports, "kexec -p" operation can be successfully performed, and the vmcore file can be generated. I tested this on LoongArch 3A5000 machine and works as expected, kexec: $ sudo kexec -l /boot/vmlinux --reuse-cmdline $ sudo kexec -e kdump: $ sudo kexec -p /boot/vmlinux-kdump --reuse-cmdline --append="nr_cpus=1" # echo c > /proc/sysrq_trigger Signed-off-by: Youling Tang Signed-off-by: Simon Horman --- include/elf.h | 1 + include/image.h | 1 + 2 files changed, 2 insertions(+) (limited to 'include') diff --git a/include/elf.h b/include/elf.h index b7677a2..1c8d2cc 100644 --- a/include/elf.h +++ b/include/elf.h @@ -259,6 +259,7 @@ typedef struct #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */ #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ #define EM_AARCH64 183 /* ARM AARCH64 */ +#define EM_LOONGARCH 258 /* Loongson Loongarch*/ #define EM_NUM 184 /* If it is necessary to assign new unofficial EM_* values, please diff --git a/include/image.h b/include/image.h index 8e9d81e..7a4bccf 100644 --- a/include/image.h +++ b/include/image.h @@ -86,6 +86,7 @@ #define IH_ARCH_ARC 23 /* Synopsys DesignWare ARC */ #define IH_ARCH_X86_64 24 /* AMD x86_64, Intel and Via */ #define IH_ARCH_XTENSA 25 /* Xtensa */ +#define IH_ARCH_LOONGARCH 26 /* LoongArch Loongson */ /* * Image Types -- cgit