[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230914020044.1397356-1-songshuaishuai@tinylab.org>
Date: Thu, 14 Sep 2023 10:00:42 +0800
From: Song Shuai <songshuaishuai@...ylab.org>
To: paul.walmsley@...ive.com, palmer@...belt.com,
aou@...s.berkeley.edu, lihuafei1@...wei.com,
conor.dooley@...rochip.com, liaochang1@...wei.com,
guoren@...nel.org, ajones@...tanamicro.com, alexghiti@...osinc.com,
evan@...osinc.com, sunilvl@...tanamicro.com,
xianting.tian@...ux.alibaba.com, samitolvanen@...gle.com,
masahiroy@...nel.org, apatel@...tanamicro.com, jszhang@...nel.org,
duwe@...e.de, eric.devolder@...cle.com
Cc: linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
Song Shuai <songshuaishuai@...ylab.org>
Subject: [PATCH 0/2] riscv: kexec_file: Support loading Image binary file
Hi,
This series makes the kexec_file_load() syscall support to load Image binary file.
At the same time, corresponding support for kexec-tools had been pushed to my repo[1].
Now, we can leverage that kexec-tools and this series to use the
kexec_load() or kexec_file_load() syscall to boot both vmlinux
and Image file, as seen in these combo tests:
```
1. kexec -l vmlinux [other options] // or boot paniced kernel with -p
2. kexec -l Image
3. kexec -s -l vmlinux
4. kexec -s -l Image
```
Though all of the aforementioned tests had been passed in my RV64 Qemu-virt,
it should be noted that tests 3 and 4 should be the emphasis for the current series.
[1]: https://github.com/sugarfillet/kexec-tools/commits/rv-Image
Song Shuai (2):
riscv: kexec_file: Split the loading of kernel and others
riscv: kexec_file: Support loading Image binary file
arch/riscv/include/asm/image.h | 2 +
arch/riscv/include/asm/kexec.h | 6 +
arch/riscv/kernel/Makefile | 2 +-
arch/riscv/kernel/elf_kexec.c | 469 -------------------------
arch/riscv/kernel/kexec_elf.c | 147 ++++++++
arch/riscv/kernel/kexec_image.c | 97 +++++
arch/riscv/kernel/machine_kexec_file.c | 8 +
7 files changed, 261 insertions(+), 470 deletions(-)
delete mode 100644 arch/riscv/kernel/elf_kexec.c
create mode 100644 arch/riscv/kernel/kexec_elf.c
create mode 100644 arch/riscv/kernel/kexec_image.c
--
2.20.1
Powered by blists - more mailing lists