riscvarchive / riscv-qemu

QEMU with RISC-V (RV64G, RV32G) Emulation Support
385 stars 154 forks source link

Implement 1.9/1.10 privilege ISA support and add sifive_e300 board #71

Closed michaeljclark closed 6 years ago

michaeljclark commented 6 years ago

Supported Boards

Detailed Changelog

Running the SiFive E300 SDK hello example:

$ qemu-system-riscv32 -nographic -machine sifive_e300 \
    -kernel freedom-e-sdk/software/hello/hello
core freq at 3276800 Hz
hello world!

Progam has exited with code:0x00000000

Booting priv-1.9.1 bbl/linux with spike v1.9.1 and HTIF (default):

$ qemu-system-riscv64 -nographic -kernel bbl-1.9

Booting priv-1.10 bbl/linux with spike v1.10, HTIF and device tree:

$ qemu-system-riscv64 -nographic -machine spike_v1.10 \
    -kernel bbl-1.10

Dumping the device tree for the priv-1.10 spike emulator:

$ qemu-system-riscv64 -machine spike_v1.10,dumpdtb=spike.dts
$ fdtdump spike.dts

Dumping the device tree for the sifive_u500 emulator:

$ qemu-system-riscv64 -machine sifive_u500,dumpdtb=u500.dts $ fdtdump u500.dts

sagark commented 6 years ago

Awesome! I'll take a look

sagark commented 6 years ago

Everything looks good to me! Could you update the README.md file to reflect the new features? Then I'll merge.

michaeljclark commented 6 years ago

Okay I've updated the readme to list both privilege spec versions and added a pointer to the commit id for current riscv-tools (v1.10), along with instructions on selecting the various boards... (spike_v1.9, spike_v1.10 and sifive_e300).

I'll follow up with some updates to sifive_u500. It's still under development as you know. We have three boards and two spec versions that can be used now so it should be a little easier for users, however they should ideally use the spike configuration.

Expect more pull requests soon...

michaeljclark commented 6 years ago

Thanks

sagark commented 6 years ago

Awesome, thanks!