//Here is my command and the outputs to the screen:
[tmp@localhost riscv]$ sudo ./qemu/build/qemu-system-riscv64 -cpu rv64 -M virt -m 512M -nographic -kernel ./build-riscv64/arch/riscv/boot/Image -initrd ./rootfs_kvm_riscv64.img -append "root=/dev/ram rw console=ttyS0 earlycon=sbi"
[sudo] password for tmp:
Boot HART ID : 0
Boot HART Domain : root
Boot HART Priv Version : v1.12
Boot HART Base ISA : rv64imafdch
Boot HART ISA Extensions : sstc,zicntr,zihpm,zicboz,zicbom
Boot HART PMP Count : 16
Boot HART PMP Granularity : 2 bits
Boot HART PMP Address Bits: 54
Boot HART MHPM Info : 16 (0x0007fff8)
Boot HART MIDELEG : 0x0000000000001666
Boot HART MEDELEG : 0x0000000000f0b509
sbi_hsm_hart_start_finish: ERR: The hart is in invalid state [2147774600] <--- stuck here
//here is all the component I have downloaded and compiled without errors.
[tmp@localhost riscv]$ ls
build-riscv64 busybox-1.33.1-kvm-riscv64 busybox-1.33.1.tar.bz2 dtc howto kvmtool linux nohup.out qemu rootfs_kvm_riscv64.img
[tmp@localhost riscv]$
I followed this link https://github.com/kvm-riscv/howto/wiki/KVM-RISCV64-on-QEMU to start a emulated riscv host, but it failed with "sbi_hsm_hart_start_finish: ERR: The hart is in invalid state [2147774600]"
//Here is my command and the outputs to the screen: [tmp@localhost riscv]$ sudo ./qemu/build/qemu-system-riscv64 -cpu rv64 -M virt -m 512M -nographic -kernel ./build-riscv64/arch/riscv/boot/Image -initrd ./rootfs_kvm_riscv64.img -append "root=/dev/ram rw console=ttyS0 earlycon=sbi" [sudo] password for tmp:
OpenSBI v1.4
Platform Name : riscv-virtio,qemu Platform Features : medeleg Platform HART Count : 1 Platform IPI Device : aclint-mswi Platform Timer Device : aclint-mtimer @ 10000000Hz Platform Console Device : uart8250 Platform HSM Device : --- Platform PMU Device : --- Platform Reboot Device : syscon-reboot Platform Shutdown Device : syscon-poweroff Platform Suspend Device : --- Platform CPPC Device : --- Firmware Base : 0x80000000 Firmware Size : 323 KB Firmware RW Offset : 0x40000 Firmware RW Size : 67 KB Firmware Heap Offset : 0x48000 Firmware Heap Size : 35 KB (total), 2 KB (reserved), 9 KB (used), 23 KB (free) Firmware Scratch Size : 4096 B (total), 328 B (used), 3768 B (free) Runtime SBI Version : 2.0
Domain0 Name : root Domain0 Boot HART : 0 Domain0 HARTs : 0* Domain0 Region00 : 0x0000000000100000-0x0000000000100fff M: (I,R,W) S/U: (R,W) Domain0 Region01 : 0x0000000010000000-0x0000000010000fff M: (I,R,W) S/U: (R,W) Domain0 Region02 : 0x0000000002000000-0x000000000200ffff M: (I,R,W) S/U: () Domain0 Region03 : 0x0000000080040000-0x000000008005ffff M: (R,W) S/U: () Domain0 Region04 : 0x0000000080000000-0x000000008003ffff M: (R,X) S/U: () Domain0 Region05 : 0x000000000c400000-0x000000000c5fffff M: (I,R,W) S/U: (R,W) Domain0 Region06 : 0x000000000c000000-0x000000000c3fffff M: (I,R,W) S/U: (R,W) Domain0 Region07 : 0x0000000000000000-0xffffffffffffffff M: () S/U: (R,W,X) Domain0 Next Address : 0x0000000080200000 Domain0 Next Arg1 : 0x000000009fe00000 Domain0 Next Mode : S-mode Domain0 SysReset : yes Domain0 SysSuspend : yes
Boot HART ID : 0 Boot HART Domain : root Boot HART Priv Version : v1.12 Boot HART Base ISA : rv64imafdch Boot HART ISA Extensions : sstc,zicntr,zihpm,zicboz,zicbom Boot HART PMP Count : 16 Boot HART PMP Granularity : 2 bits Boot HART PMP Address Bits: 54 Boot HART MHPM Info : 16 (0x0007fff8) Boot HART MIDELEG : 0x0000000000001666 Boot HART MEDELEG : 0x0000000000f0b509 sbi_hsm_hart_start_finish: ERR: The hart is in invalid state [2147774600] <--- stuck here
//here is all the component I have downloaded and compiled without errors. [tmp@localhost riscv]$ ls build-riscv64 busybox-1.33.1-kvm-riscv64 busybox-1.33.1.tar.bz2 dtc howto kvmtool linux nohup.out qemu rootfs_kvm_riscv64.img [tmp@localhost riscv]$