RISC-V: Add kexec_file support
authorLiao Chang <liaochang1@huawei.com>
Fri, 8 Apr 2022 10:09:11 +0000 (18:09 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 19 May 2022 19:14:18 +0000 (12:14 -0700)
commit6261586e0c91db14c34f894f4bc48f2300cff1d4
tree0bac89b95a140653c0051982eaf0a9cc4743645c
parentb7fb4d78a6ade6026d9e5cf438c2a46ab962e032
RISC-V: Add kexec_file support

This patch adds support for kexec_file on RISC-V. I tested it on riscv64
QEMU with busybear-linux and single core along with the OpenSBI firmware
fw_jump.bin for generic platform.

On SMP system, it depends on CONFIG_{HOTPLUG_CPU, RISCV_SBI} to
resume/stop hart through OpenSBI firmware, it also needs a OpenSBI that
support the HSM extension.

Signed-off-by: Liao Chang <liaochang1@huawei.com>
Signed-off-by: Li Zhengyu <lizhengyu3@huawei.com>
Link: https://lore.kernel.org/r/20220408100914.150110-4-lizhengyu3@huawei.com
[Palmer: Make 64-bit only]
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/Kconfig
arch/riscv/include/asm/kexec.h
arch/riscv/kernel/Makefile
arch/riscv/kernel/elf_kexec.c [new file with mode: 0644]
arch/riscv/kernel/machine_kexec_file.c [new file with mode: 0644]