From: "Björn Töpel" <bjorn@kernel.org>
To: Simon Horman <horms@kernel.org>,
Simon Horman <horms@verge.net.au>,
Nick Kossifidis <mick@ics.forth.gr>,
Song Shuai <songshuaishuai@tinylab.org>,
Li Zhengyu <lizhengyu3@huawei.com>,
kexec@lists.infradead.org
Cc: "Björn Töpel" <bjorn@rivosinc.com>,
"Dave Young" <dyoung@redhat.com>,
"Yixun Lan" <yixun.lan@gmail.com>,
"Xianting Tian" <xianting.tian@linux.alibaba.com>,
linux-riscv@lists.infradead.org
Subject: [PATCH 0/4] kexec-tools RISC-V port
Date: Wed, 9 Apr 2025 22:14:22 +0200 [thread overview]
Message-ID: <20250409201428.648717-1-bjorn@kernel.org> (raw)
From: Björn Töpel <bjorn@rivosinc.com>
Hi!
This is an attempt to finally get the RISC-V patches for kexec-tools
upstream.
Simon suggested in [1] that:
> In my mind the big question is how to move RISC-V support from that
> branch, to being merged into main.
>
> IIRC there were some issues that needed to be addressed. Perhaps they
> are all addressed by this series, and with some appropriate squashing
> we can move forwards with a series based on main?
I talked to Nick last week, and he suggested that we'd work the RISC-V
collab Github [2], but I think it's just easier to do it on the list.
I've been collecting a number of different trees out there, and tried
to group them in a series.
Given that there is not support for RISC-V upstream yet, I didn't see
the need to carry all the fixes/updates ("development history") as
separate commits -- it doesn't help bugtracking/bisectability.
Instead the first commit message is a big one, and tries to give
attribution to all involved parties. Input/thoughts are very much
welcome!
To properly test this on RISC-V, the upstream Linux kernel has most
things in 6.15-rc1, e.g.:
commit 28093cfef5dd ("riscv/kexec_file: Handle R_RISCV_64 in purgatory relocator")
commit 3f7023171df4 ("riscv/purgatory: 4B align purgatory_start")
To cross-build kexec-tools:
| ./bootstrap
| ./configure --host=riscv64-linux-gnu
| make
For some tests, additional kernel patches are needed, that as of today
is not in 6.15-rc1:
* To test "kexec -s -l Image", kexec_file_load with Image support is
needed [3]
* To test "kexec -c -l vmlinux" with CONFIG_RELOCATABLE, a kbuild fix
is needed [4]
* Typically if you load initrd, or a large kernel [5] (since a bunch
of Reserved regions are not properly exposed).
I've tested combinations with crashkernel (-p), and regular (-c/-s + -e) for:
* ACPI/UEFI
* DT/UEFI
* DT
* w/ initrd
* w/o initrd
* ELF (userland loader + kexec_load, and kexec_file_load)
* Image (userland loader + kexec_load, and kexec_file_load)
I'm sure there are combinations I've missed, but at least from my POV
we're in a pretty good shape.
All authors: Please let me know if you prefer another split of the
patches. Or something else for that matter! ;-)
Let's get the ball rolling!
Björn
[1] https://lore.kernel.org/kexec/20230920115634.GG224399@kernel.org/
[2] https://github.com/riscv-collab/kexec-tools.git
[3] https://lore.kernel.org/linux-riscv/20250409193004.643839-1-bjorn@kernel.org/
[4] https://lore.kernel.org/linux-riscv/20250408072851.90275-1-alexghiti@rivosinc.com/
[5] https://lore.kernel.org/linux-riscv/20250409182129.634415-1-bjorn@kernel.org/
Li Zhengyu (1):
RISC-V: Enable kexec_file_load syscall
Nick Kossifidis (1):
RISC-V: Add support for riscv kexec/kdump on kexec-tools
Song Shuai (2):
RISC-V: Separate elf_riscv_find_pbase out
RISC-V: Support loading Image binary file
configure.ac | 3 +
include/elf.h | 1 +
kexec/Makefile | 1 +
kexec/arch/riscv/Makefile | 37 ++
kexec/arch/riscv/crashdump-riscv.c | 140 +++++++
kexec/arch/riscv/image-header.h | 88 ++++
kexec/arch/riscv/include/arch/options.h | 43 ++
kexec/arch/riscv/iomem.h | 10 +
kexec/arch/riscv/kexec-elf-riscv.c | 184 +++++++++
kexec/arch/riscv/kexec-image-riscv.c | 95 +++++
kexec/arch/riscv/kexec-riscv.c | 526 ++++++++++++++++++++++++
kexec/arch/riscv/kexec-riscv.h | 53 +++
kexec/dt-ops.c | 442 +++++++++++++++++++-
kexec/dt-ops.h | 7 +
kexec/kexec-syscall.h | 7 +
purgatory/Makefile | 1 +
purgatory/arch/riscv/Makefile | 7 +
17 files changed, 1644 insertions(+), 1 deletion(-)
create mode 100644 kexec/arch/riscv/Makefile
create mode 100644 kexec/arch/riscv/crashdump-riscv.c
create mode 100644 kexec/arch/riscv/image-header.h
create mode 100644 kexec/arch/riscv/include/arch/options.h
create mode 100644 kexec/arch/riscv/iomem.h
create mode 100644 kexec/arch/riscv/kexec-elf-riscv.c
create mode 100644 kexec/arch/riscv/kexec-image-riscv.c
create mode 100644 kexec/arch/riscv/kexec-riscv.c
create mode 100644 kexec/arch/riscv/kexec-riscv.h
create mode 100644 purgatory/arch/riscv/Makefile
base-commit: a7fcd424c4c80dea5a2fd5ffa274ffeb8129c790
--
2.45.2
WARNING: multiple messages have this Message-ID (diff)
From: "Björn Töpel" <bjorn@kernel.org>
To: Simon Horman <horms@kernel.org>,
Simon Horman <horms@verge.net.au>,
Nick Kossifidis <mick@ics.forth.gr>,
Song Shuai <songshuaishuai@tinylab.org>,
Li Zhengyu <lizhengyu3@huawei.com>,
kexec@lists.infradead.org
Cc: "Björn Töpel" <bjorn@rivosinc.com>,
"Dave Young" <dyoung@redhat.com>,
"Yixun Lan" <yixun.lan@gmail.com>,
"Xianting Tian" <xianting.tian@linux.alibaba.com>,
linux-riscv@lists.infradead.org
Subject: [PATCH 0/4] kexec-tools RISC-V port
Date: Wed, 9 Apr 2025 22:14:22 +0200 [thread overview]
Message-ID: <20250409201428.648717-1-bjorn@kernel.org> (raw)
From: Björn Töpel <bjorn@rivosinc.com>
Hi!
This is an attempt to finally get the RISC-V patches for kexec-tools
upstream.
Simon suggested in [1] that:
> In my mind the big question is how to move RISC-V support from that
> branch, to being merged into main.
>
> IIRC there were some issues that needed to be addressed. Perhaps they
> are all addressed by this series, and with some appropriate squashing
> we can move forwards with a series based on main?
I talked to Nick last week, and he suggested that we'd work the RISC-V
collab Github [2], but I think it's just easier to do it on the list.
I've been collecting a number of different trees out there, and tried
to group them in a series.
Given that there is not support for RISC-V upstream yet, I didn't see
the need to carry all the fixes/updates ("development history") as
separate commits -- it doesn't help bugtracking/bisectability.
Instead the first commit message is a big one, and tries to give
attribution to all involved parties. Input/thoughts are very much
welcome!
To properly test this on RISC-V, the upstream Linux kernel has most
things in 6.15-rc1, e.g.:
commit 28093cfef5dd ("riscv/kexec_file: Handle R_RISCV_64 in purgatory relocator")
commit 3f7023171df4 ("riscv/purgatory: 4B align purgatory_start")
To cross-build kexec-tools:
| ./bootstrap
| ./configure --host=riscv64-linux-gnu
| make
For some tests, additional kernel patches are needed, that as of today
is not in 6.15-rc1:
* To test "kexec -s -l Image", kexec_file_load with Image support is
needed [3]
* To test "kexec -c -l vmlinux" with CONFIG_RELOCATABLE, a kbuild fix
is needed [4]
* Typically if you load initrd, or a large kernel [5] (since a bunch
of Reserved regions are not properly exposed).
I've tested combinations with crashkernel (-p), and regular (-c/-s + -e) for:
* ACPI/UEFI
* DT/UEFI
* DT
* w/ initrd
* w/o initrd
* ELF (userland loader + kexec_load, and kexec_file_load)
* Image (userland loader + kexec_load, and kexec_file_load)
I'm sure there are combinations I've missed, but at least from my POV
we're in a pretty good shape.
All authors: Please let me know if you prefer another split of the
patches. Or something else for that matter! ;-)
Let's get the ball rolling!
Björn
[1] https://lore.kernel.org/kexec/20230920115634.GG224399@kernel.org/
[2] https://github.com/riscv-collab/kexec-tools.git
[3] https://lore.kernel.org/linux-riscv/20250409193004.643839-1-bjorn@kernel.org/
[4] https://lore.kernel.org/linux-riscv/20250408072851.90275-1-alexghiti@rivosinc.com/
[5] https://lore.kernel.org/linux-riscv/20250409182129.634415-1-bjorn@kernel.org/
Li Zhengyu (1):
RISC-V: Enable kexec_file_load syscall
Nick Kossifidis (1):
RISC-V: Add support for riscv kexec/kdump on kexec-tools
Song Shuai (2):
RISC-V: Separate elf_riscv_find_pbase out
RISC-V: Support loading Image binary file
configure.ac | 3 +
include/elf.h | 1 +
kexec/Makefile | 1 +
kexec/arch/riscv/Makefile | 37 ++
kexec/arch/riscv/crashdump-riscv.c | 140 +++++++
kexec/arch/riscv/image-header.h | 88 ++++
kexec/arch/riscv/include/arch/options.h | 43 ++
kexec/arch/riscv/iomem.h | 10 +
kexec/arch/riscv/kexec-elf-riscv.c | 184 +++++++++
kexec/arch/riscv/kexec-image-riscv.c | 95 +++++
kexec/arch/riscv/kexec-riscv.c | 526 ++++++++++++++++++++++++
kexec/arch/riscv/kexec-riscv.h | 53 +++
kexec/dt-ops.c | 442 +++++++++++++++++++-
kexec/dt-ops.h | 7 +
kexec/kexec-syscall.h | 7 +
purgatory/Makefile | 1 +
purgatory/arch/riscv/Makefile | 7 +
17 files changed, 1644 insertions(+), 1 deletion(-)
create mode 100644 kexec/arch/riscv/Makefile
create mode 100644 kexec/arch/riscv/crashdump-riscv.c
create mode 100644 kexec/arch/riscv/image-header.h
create mode 100644 kexec/arch/riscv/include/arch/options.h
create mode 100644 kexec/arch/riscv/iomem.h
create mode 100644 kexec/arch/riscv/kexec-elf-riscv.c
create mode 100644 kexec/arch/riscv/kexec-image-riscv.c
create mode 100644 kexec/arch/riscv/kexec-riscv.c
create mode 100644 kexec/arch/riscv/kexec-riscv.h
create mode 100644 purgatory/arch/riscv/Makefile
base-commit: a7fcd424c4c80dea5a2fd5ffa274ffeb8129c790
--
2.45.2
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2025-04-09 20:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 20:14 Björn Töpel [this message]
2025-04-09 20:14 ` [PATCH 0/4] kexec-tools RISC-V port Björn Töpel
2025-04-09 20:14 ` [PATCH 1/4] RISC-V: Add support for riscv kexec/kdump on kexec-tools Björn Töpel
2025-04-09 20:14 ` Björn Töpel
2025-04-22 10:48 ` Simon Horman
2025-04-22 10:48 ` Simon Horman
2025-04-22 12:07 ` Björn Töpel
2025-04-22 12:07 ` Björn Töpel
2025-04-22 13:54 ` Simon Horman
2025-04-22 13:54 ` Simon Horman
2025-04-09 20:14 ` [PATCH 2/4] RISC-V: Enable kexec_file_load syscall Björn Töpel
2025-04-09 20:14 ` Björn Töpel
2025-04-09 20:14 ` [PATCH 3/4] RISC-V: Separate elf_riscv_find_pbase out Björn Töpel
2025-04-09 20:14 ` Björn Töpel
2025-04-09 20:14 ` [PATCH 4/4] RISC-V: Support loading Image binary file Björn Töpel
2025-04-09 20:14 ` Björn Töpel
2025-04-14 8:40 ` [PATCH 0/4] kexec-tools RISC-V port Simon Horman
2025-04-14 8:40 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250409201428.648717-1-bjorn@kernel.org \
--to=bjorn@kernel.org \
--cc=bjorn@rivosinc.com \
--cc=dyoung@redhat.com \
--cc=horms@kernel.org \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.org \
--cc=linux-riscv@lists.infradead.org \
--cc=lizhengyu3@huawei.com \
--cc=mick@ics.forth.gr \
--cc=songshuaishuai@tinylab.org \
--cc=xianting.tian@linux.alibaba.com \
--cc=yixun.lan@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.