#
69574079 |
| 22-Mar-2025 |
Andrew Jones <andrew.jones@linux.dev> |
Merge branch 'riscv/sbi' into 'master'
riscv: SBI SSE tests and baremetal boot support
See merge request kvm-unit-tests/kvm-unit-tests!75
|
#
98ea1f96 |
| 17-Mar-2025 |
Clément Léger <cleger@rivosinc.com> |
lib: riscv: Add SBI SSE support
Add support for registering and handling SSE events. This will be used for sbi tests as well as upcoming double trap tests.
Signed-off-by: Clément Léger <cleger@rivo
lib: riscv: Add SBI SSE support
Add support for registering and handling SSE events. This will be used for sbi tests as well as upcoming double trap tests.
Signed-off-by: Clément Léger <cleger@rivosinc.com> Reviewed-by: Andrew Jones <andrew.jones@linux.dev> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
30f161db |
| 22-Oct-2024 |
Andrew Jones <andrew.jones@linux.dev> |
Merge branch 'riscv/sbi' into 'master'
riscv: Collect some patches supporting SBI tests
See merge request kvm-unit-tests/kvm-unit-tests!68
|
#
75c732f6 |
| 21-Sep-2024 |
Andrew Jones <andrew.jones@linux.dev> |
riscv: Rewrite hartid_to_cpu in assembly
Some SBI HSM tests run without a stack being setup so they can't run C code. Those tests still need to know the corresponding cpuid for the hartid on which t
riscv: Rewrite hartid_to_cpu in assembly
Some SBI HSM tests run without a stack being setup so they can't run C code. Those tests still need to know the corresponding cpuid for the hartid on which they are running. Give those tests hartid_to_cpu() by reimplementing it in assembly.
Signed-off-by: James Raphael Tiovalen <jamestiotio@gmail.com> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
48d59524 |
| 02-Feb-2024 |
Andrew Jones <andrew.jones@linux.dev> |
Merge branch 'riscv/initial-port-v3' into 'master'
riscv: Initial port
See merge request kvm-unit-tests/kvm-unit-tests!50
|
#
0c39d9ea |
| 22-Jan-2024 |
Andrew Jones <andrew.jones@linux.dev> |
riscv: Enable the MMU in secondaries
Set each secondary satp to the same as the primary's and enable the MMU when starting. We also change the memalign() to alloc_pages() to prepare for enabling vma
riscv: Enable the MMU in secondaries
Set each secondary satp to the same as the primary's and enable the MMU when starting. We also change the memalign() to alloc_pages() to prepare for enabling vmalloc_ops. We always want an address for the stack where its virtual address is the same as its physical address, but vmalloc_ops.memalign wouldn't provide that.
Signed-off-by: Andrew Jones <andrew.jones@linux.dev> Acked-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
9c92b28e |
| 03-Oct-2023 |
Andrew Jones <andrew.jones@linux.dev> |
riscv: Add SMP support
Implement the same SMP API that Arm has but using an SBI HSM call instead of PSCI. Unlike Arm, riscv needs to always set cpu0_calls_idle, because the boot hart doesn't have to
riscv: Add SMP support
Implement the same SMP API that Arm has but using an SBI HSM call instead of PSCI. Unlike Arm, riscv needs to always set cpu0_calls_idle, because the boot hart doesn't have to be the first hart described in the DT, which means cpu0 may well be a secondary. As usual, add a couple tests to selftest.c to make sure everything works.
(The secondary boot process is also improved over Arm's a bit by keeping boot data percpu, dropping the need for a lock. We could create percpu data for Arm too, but that's left as future work.)
Signed-off-by: Andrew Jones <andrew.jones@linux.dev> Acked-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
386561f8 |
| 02-Oct-2023 |
Andrew Jones <andrew.jones@linux.dev> |
riscv: Add exception handling
Steal more code from Linux to implement exception handling, but with the same kvm-unit-tests API that Arm has. Also introduce struct thread_info like Arm has in order t
riscv: Add exception handling
Steal more code from Linux to implement exception handling, but with the same kvm-unit-tests API that Arm has. Also introduce struct thread_info like Arm has in order to hold the handler pointers. Finally, as usual, extend the selftest to make sure it all works.
Signed-off-by: Andrew Jones <andrew.jones@linux.dev> Acked-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
3b10c7e2 |
| 25-Sep-2023 |
Andrew Jones <andrew.jones@linux.dev> |
riscv: Add riscv32 support
Make a few tweaks to allow also building and running riscv32.
Signed-off-by: Andrew Jones <andrew.jones@linux.dev> Acked-by: Thomas Huth <thuth@redhat.com>
|
#
bd744d46 |
| 24-Sep-2023 |
Andrew Jones <andrew.jones@linux.dev> |
riscv: Initial port, hello world
Add the minimal amount of code possible in order to launch a first test, which just prints "Hello, world" using the expected UART address of the QEMU virt machine. A
riscv: Initial port, hello world
Add the minimal amount of code possible in order to launch a first test, which just prints "Hello, world" using the expected UART address of the QEMU virt machine. Add files, stubs, and some support, such as barriers and MMIO read/write along the way in order to satisfy the compiler. Basically everything is either copied from the arm64 port of kvm-unit-tests, or at least inspired by it, and, in that case, the RISC-V Linux kernel code was copied.
Run with qemu-system-riscv64 -nographic -M virt -kernel riscv/selftest.flat
and then go to the monitor (ctrl-a c) and use 'q' to quit, since the unit test will just hang after printing hello world and the exit code.
Signed-off-by: Andrew Jones <andrew.jones@linux.dev> Acked-by: Thomas Huth <thuth@redhat.com>
show more ...
|