summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYouling Tang <tangyouling@loongson.cn>2022-09-28 10:28:23 +0800
committerSimon Horman <horms@kernel.org>2022-10-10 13:34:54 +0200
commit1c8bf2dc0127b06f97a7973488c7f8cf9a5f7c19 (patch)
treeba9628df718ee3459e066274c59aa0a032790c42 /include
parentdceb1d8926e609ccf8f00e92001226888529283b (diff)
downloadkexec-tools-1c8bf2dc0127b06f97a7973488c7f8cf9a5f7c19.tar.gz
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 <tangyouling@loongson.cn> Signed-off-by: Simon Horman <horms@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/elf.h1
-rw-r--r--include/image.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/elf.h b/include/elf.h
index b7677a2a..1c8d2ccf 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 8e9d81e2..7a4bccf4 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