From 894d8a2c521c2af429654c85ec2899c135679494 Mon Sep 17 00:00:00 2001 From: Inochi Amaoto Date: Wed, 12 Jun 2024 11:35:48 +0800 Subject: [PATCH] Documentation/rv-virt: Update information for S mode build As kernel mode is not necessary for S mode build, update related information for the rv-virt board. Signed-off-by: Inochi Amaoto --- .../risc-v/qemu-rv/boards/rv-virt/index.rst | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/Documentation/platforms/risc-v/qemu-rv/boards/rv-virt/index.rst b/Documentation/platforms/risc-v/qemu-rv/boards/rv-virt/index.rst index 413294dd48..522947a2e0 100644 --- a/Documentation/platforms/risc-v/qemu-rv/boards/rv-virt/index.rst +++ b/Documentation/platforms/risc-v/qemu-rv/boards/rv-virt/index.rst @@ -63,13 +63,16 @@ Finally, to run it, use the following command: For 32-bit configurations:: - $ qemu-system-riscv32 -semihosting -M virt,aclint=on -cpu rv32 -smp 8 -bios none -kernel nuttx -nographic + $ qemu-system-riscv32 -semihosting -M virt,aclint=on -cpu rv32 -smp -bios none -kernel nuttx -nographic And, for 64-bit configurations:: - $ qemu-system-riscv64 -semihosting -M virt,aclint=on -cpu rv64 -smp 8 -bios none -kernel nuttx -nographic + $ qemu-system-riscv64 -semihosting -M virt,aclint=on -cpu rv64 -smp -bios none -kernel nuttx -nographic -If testing with kernel build, remove the ``-bios none`` option. Kernel build +``-smp`` option can be only used in smp build, and the ``cpu number`` needs +to be set to the same value as ``CONFIG_SMP_NCPUS`` in the build config file. + +If testing with S-mode build, remove the ``-bios none`` option. S-mode build requires SBI to function properly. citest @@ -204,7 +207,7 @@ A ROMFS image is generated and linked to the kernel. This requires re-running `` To run it, use the following command:: - $ qemu-system-riscv32 -M virt,aclint=on -cpu rv32 -smp 8 -kernel nuttx -nographic + $ qemu-system-riscv32 -M virt,aclint=on -cpu rv32 -kernel nuttx -nographic In `nsh`, applications can be run from the `/system/bin` directory:: @@ -334,6 +337,18 @@ smp64 Similar to the `nsh`_ configuration, but with SMP support This configuration is used for 64-bit RISC-V +flats +------- + +Similar to the `nsh`_ configuration, but running in S-mode. +This configuration is used for 32-bit RISC-V + +flats64 +------- + +Similar to the `nsh`_ configuration, but running in S-mode. +This configuration is used for 64-bit RISC-V + RISC-V GDB Debugging ====================