00
80822426 80822422
ff293f20 814ee2a8
ff6000104800 ff200027bb18
```
Signed-off-by: Song Shu
013d80] vfs_write at 801b68b4
#5 [ff213e30] ksys_write at 801b6c4a
#6 [ff213e80] __riscv_sys_write at 801b6cc4
#7 [ff213e90] do_trap_ecall_u at ffff80836798
crash>
```
Signed-off-by: Song Shuai
---
riscv64.c | 15 +--
1 file chang
: 39b33072941f ("riscv: Introduce CONFIG_RELOCATABLE")
Signed-off-by: Song Shuai
---
arch/riscv/purgatory/Makefile | 4
1 file changed, 4 insertions(+)
diff --git a/arch/riscv/purgatory/Makefile b/arch/riscv/purgatory/Makefile
index 9e6476719abb..982fc8e77108 100644
--- a/arch/riscv/purgator
machine and works as it was.
Signed-off-by: Song Shuai
---
arch/riscv/kernel/kexec_relocate.S | 54 +-
1 file changed, 24 insertions(+), 30 deletions(-)
diff --git a/arch/riscv/kernel/kexec_relocate.S
b/arch/riscv/kernel/kexec_relocate.S
index 059c5e216ae7
ntry point of kernel at 0x8020
[ 880.388650] kexec_image: Unknown rela relocation: 20
[ 880.389173] kexec_image: Error loading purgatory ret=-8
So remove the -fPIE option for PURGATORY_CFLAGS to generate
R_RISCV_PCREL_HI20 relocations type making puragtory work as it was.
Song Shuai (2):
ri
在 2023/9/20 19:56, Simon Horman 写道:
On Fri, Sep 15, 2023 at 11:50:06AM +0800, Song Shuai wrote:
Hi,
This series is created to improve RISC-V port of kexec-tools,
and is based on the horms/kexec-tools:build-test-riscv-v2 branch.
In my mind the big question is how to move RISC-V support
from
To let info->max_mapnr indicate the direct max PFN and then
make the kdump header's max_mapnr_64 correct, riscv64 port
didn't define ARCH_PFN_OFFSET.
As for FLATMEM type, the pfn region of mem_map_data should
be adjusted to start from info->phys_base instead of zero.
Signed-off-by: Song
80096000 => 20026001
PTE: 80098000 => 20021ce7
PAGE: 80087000
PTE PHYSICAL FLAGS
20021ce7 80087000 (PRESENT|READ|WRITE|GLOBAL|ACCESSED|DIRTY)
PAGE PHYSICAL MAPPING INDEX CNT FLAGS
ff1c020021c0 800870000 0 1 0
This patch adds support for riscv64 in makedumpfile.
It implements the "vtop" for kenrel memory regions
and supports Sv39/Sv48/Sv57 page modes for RV64.
Signed-off-by: Song Shuai
---
Makefile | 2 +-
arch/riscv64.c | 219 +
make
在 2023/10/3 12:22, HAGIO KAZUHITO(萩尾 一仁) 写道:
Hi,
thank you for the patch.
On 2023/09/27 20:18, Song Shuai wrote:
These 2 patches add riscv64 support for makedumpfile:
Patch1 - Add riscv64 support
===
This patch adds support for riscv64 in makedumpfile
To let info->max_mapnr indicte the direct max PFN and then
make the kdump header's max_mapnr_64 correct, riscv64 port
didn't define ARCH_PFN_OFFSET.
As for FLATMEM type, the pfn region of mem_map_data should
be adjusted to start from info->phys_base instead of zero.
Signed-off-by: Song
This patch adds support for riscv64 in makedumpfile.
It implements the "vtop" for kenrel memory regions
and supports Sv39/Sv48/Sv57 page modes for RV64.
Signed-off-by: Song Shuai
---
Makefile | 2 +-
arch/riscv64.c | 219 +
make
20026001
PTE: 80098000 => 20021ce7
PAGE: 80087000
PTE PHYSICAL FLAGS
20021ce7 80087000 (PRESENT|READ|WRITE|GLOBAL|ACCESSED|DIRTY)
PAGE PHYSICAL MAPPING INDEX CNT FLAGS
ff1c020021c0 800870000 0 1 0 // same as the
makedum
Add image-riscv file_type to probe/load Image file type,
As for kexec_load, find the pbase aligned text_offset from image header
and prepare segments for this syscall.
for kexec_file_load, setup the related options and let kernel part to
deal with the Image.
Signed-off-by: Song Shuai
The is the preparative patch for RISC-V kexec Image file support.
Separate the elf_riscv_find_pbase() function out to
allow kernel_load syscall load Image binary file.
Signed-off-by: Song Shuai
---
kexec/arch/riscv/kexec-elf-riscv.c | 72 +-
kexec/arch/riscv/kexec
]: https://lore.kernel.org/all/20220408100914.150110-1-lizheng...@huawei.com/
Signed-off-by: Song Shuai
---
kexec/arch/riscv/kexec-elf-riscv.c | 5 ++--
kexec/arch/riscv/kexec-riscv.c | 41 ++
kexec/arch/riscv/kexec-riscv.h | 1 +
kexec/kexec-syscall.h
RISC-V process OPT_CMDLINE with the "command-line" partten,
but the riscv_opts_usage shows the "cmdline" option.
So correct the usage's output.
Signed-off-by: Song Shuai
---
kexec/arch/riscv/kexec-riscv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ke
FI Runtime memory and fail the kexeced kernel to
deal EFI stuff.
In my test, the kexeced kernel warned "efi: System table signature incorrect!"
and then paniced at efi_call_rts() due to the null efi.runtime.
So we should use /proc/iomem to get memory ranges.
Signed-off-by: Song Shuai
-
Use local `elf.h` instead of `linux/elf.h` to fix this build error:
```
kexec/arch/riscv/crashdump-riscv.c:17:13: error: ‘EM_RISCV’ undeclared here
(not in a function); did you mean ‘EM_CRIS’?
.machine = EM_RISCV,
^~~~
EM_CRIS
```
Signed-off-by: Song Shuai
ema/blob/main/dtschema/schemas/chosen.yaml
Signed-off-by: Song Shuai
---
kexec/arch/riscv/kexec-riscv.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kexec/arch/riscv/kexec-riscv.c b/kexec/arch/riscv/kexec-riscv.c
index fe5dd2d..5aea035 100644
--- a/kexec/arch/riscv/kexec-
://lore.kernel.org/linux-riscv/20230914020044.1397356-1-songshuaish...@tinylab.org/T/#t
Li Zhengyu (1):
RISC-V: Enable kexe_file_load
Song Shuai (6):
RISC-V: Use linux,usable-memory-range for crash kernel
RISC-V: Fix the undeclared ‘EM_RISCV’ build failure
RISC-V: Get memory ranges from iomem
("RISC-V: Support for kexec_file on panic")
Signed-off-by: Song Shuai
---
arch/riscv/kernel/elf_kexec.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/kernel/elf_kexec.c b/arch/riscv/kernel/elf_kexec.c
index 38390d3bdcac..bc7a00ff5c8b 100644
--- a/
: 39b33072941f ("riscv: Introduce CONFIG_RELOCATABLE")
Signed-off-by: Song Shuai
---
arch/riscv/purgatory/Makefile | 4
1 file changed, 4 insertions(+)
diff --git a/arch/riscv/purgatory/Makefile b/arch/riscv/purgatory/Makefile
index dc20e166983e..c2065d63945f 100644
--- a/arch/riscv/purgator
machine and works as it was.
Signed-off-by: Song Shuai
---
arch/riscv/kernel/kexec_relocate.S | 52 +-
1 file changed, 23 insertions(+), 29 deletions(-)
diff --git a/arch/riscv/kernel/kexec_relocate.S
b/arch/riscv/kernel/kexec_relocate.S
index 059c5e216ae7
1]:
https://lore.kernel.org/linux-riscv/20230830063435.1105726-1-songshuaish...@tinylab.org/
[2]:
https://lore.kernel.org/linux-riscv/20230906095817.364390-1-songshuaish...@tinylab.org/
[3]: https://github.com/sugarfillet/kexec-tools/tree/fix-riscv
Song Shuai (3):
riscv: kexec: Cleanup riscv_kexe
From: Song Shuai
This patch adds KASLR support for Crash to analyze KASLR-ed vmcore
since RISC-V Linux is already sufficiently prepared for KASLR [1].
With this patch, even if the Crash '--kaslr' option is not set or Linux
CONFIG_RANDOMIZE_BASE is not configured, the 'derive_kaslr_offset
From: Song Shuai
This patch adds KASLR support for Crash to analyze KASLR-ed vmcore
since RISC-V Linux is already sufficiently prepared for KASLR [1].
With this patch, even if the Crash '--kaslr' option is not set or Linux
CONFIG_RANDOMIZE_BASE is not configured, the 'derive_kaslr_offset
在 2023/8/14 19:10, Conor Dooley 写道:
On Fri, Aug 11, 2023 at 06:41:16PM +0800, Song Shuai wrote:
Now we use "memeory::linux,usable-memory" to indicate the available
memory for the crash kernel.
While booting with UEFI, the crash kernel would use efi.memmap to
re-populat
ema/blob/main/dtschema/schemas/chosen.yaml
Signed-off-by: Song Shuai
---
kexec/arch/riscv/kexec-riscv.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kexec/arch/riscv/kexec-riscv.c b/kexec/arch/riscv/kexec-riscv.c
index fe5dd2d..5aea035 100644
--- a/kexec/arch/riscv/kexec-
Use local `elf.h` instead of `linux/elf.h` to fix this build error:
```
kexec/arch/riscv/crashdump-riscv.c:17:13: error: ‘EM_RISCV’ undeclared here
(not in a function); did you mean ‘EM_CRIS’?
.machine = EM_RISCV,
^~~~
EM_CRIS
```
Signed-off-by: Song Shuai
在 2023/8/4 12:42, HAGIO KAZUHITO(萩尾 一仁) 写道:
On 2023/07/24 13:06, Song Shuai wrote:
Since RISC-V Linux v6.4, the commit 3335068f8721 ("riscv: Use
PUD/P4D/PGD pages for the linear mapping") changes the
phys_ram_base from the kernel_map.phys_addr to the start of DRAM.
The Crash's VT
el virtual address, that made Crash boot failed with
Linux v6.4 and later version.
Let Linux export kernel_map.va_kernel_pa_offset in v6.5 and backported
v6.4.0 stable, so Crash can use "va_kernel_pa_offset" to translate the
kernel virtual address in VTOP() correctly.
Signed-off-by: Son
rnel.org/linux-riscv/20230724040649.220279-1-suagrfil...@gmail.com/
[1]
Signed-off-by: Song Shuai
---
arch/riscv/kernel/crash_core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/riscv/kernel/crash_core.c b/arch/riscv/kernel/crash_core.c
index b351a3c01355..55f1d7856b54 100644
---
://lore.kernel.org/linux-riscv/20230724040649.220279-1-suagrfil...@gmail.com/
Signed-off-by: Song Shuai
---
Documentation/admin-guide/kdump/vmcoreinfo.rst | 6 ++
1 file changed, 6 insertions(+)
diff --git a/Documentation/admin-guide/kdump/vmcoreinfo.rst
b/Documentation/admin-guide/kdump/vmc
rnel.org/linux-riscv/20230724040649.220279-1-suagrfil...@gmail.com/
[1]
Signed-off-by: Song Shuai
---
arch/riscv/kernel/crash_core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/riscv/kernel/crash_core.c b/arch/riscv/kernel/crash_core.c
index b351a3c01355..55f1d7856b54 100644
---
在 2023/7/24 16:13, Alexandre Ghiti 写道:
Hi Song,
On 24/07/2023 06:06, Song Shuai wrote:
Since RISC-V Linux v6.4, the commit 3335068f8721 ("riscv: Use
PUD/P4D/PGD pages for the linear mapping") changes the
phys_ram_base from the kernel_map.phys_addr to the start of DRAM.
Mayb
在 2023/7/24 15:41, Conor Dooley 写道:
Hey,
On Mon, Jul 24, 2023 at 12:06:49PM +0800, Song Shuai wrote:
Since RISC-V Linux v6.4, the commit 3335068f8721 ("riscv: Use
PUD/P4D/PGD pages for the linear mapping") changes the
phys_ram_base from the kernel_map.phys_addr to the sta
al address, that made Crash boot failed with
Linux v6.4 and later version.
Let Linux export kernel_map.va_kernel_pa_offset in v6.5 and Crash can
use "va_kernel_pa_offset" to translate the kernel virtual address in
VTOP() correctly.
Signed-off-by: Song Shuai
---
You can check/test the Linux ch
38 matches
Mail list logo