linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] riscv: kexec_file: Support loading Image binary file
@ 2023-09-14  2:00 Song Shuai
  2023-09-14  2:00 ` [PATCH 1/2] riscv: kexec_file: Split the loading of kernel and others Song Shuai
  2023-09-14  2:00 ` [PATCH 2/2] riscv: kexec_file: Support loading Image binary file Song Shuai
  0 siblings, 2 replies; 12+ messages in thread
From: Song Shuai @ 2023-09-14  2:00 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou, lihuafei1, conor.dooley, liaochang1,
	guoren, ajones, alexghiti, evan, sunilvl, xianting.tian,
	samitolvanen, masahiroy, apatel, jszhang, duwe, eric.devolder
  Cc: linux-riscv, linux-kernel, Song Shuai

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


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-02-20  3:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-14  2:00 [PATCH 0/2] riscv: kexec_file: Support loading Image binary file Song Shuai
2023-09-14  2:00 ` [PATCH 1/2] riscv: kexec_file: Split the loading of kernel and others Song Shuai
2024-02-16  8:32   ` [External] " yunhui cui
2023-09-14  2:00 ` [PATCH 2/2] riscv: kexec_file: Support loading Image binary file Song Shuai
2023-09-14  8:37   ` Emil Renner Berthing
2023-10-11  6:03     ` Song Shuai
2023-10-11 10:48       ` Emil Renner Berthing
2023-10-16  5:19         ` Song Shuai
2023-10-16  8:17           ` Emil Renner Berthing
2024-02-16  8:54   ` [External] " yunhui cui
2024-02-19  9:52     ` Song Shuai
2024-02-20  3:09       ` yunhui cui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).