qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] RISC-V: NEORV32 CPU, devices, and machine
@ 2025-10-27 10:09 Michael Levit
  2025-10-27 10:09 ` [PATCH v2 1/5] target/riscv: add NEORV32 RV32 CPU type and vendor CSR hooks Michael Levit
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Michael Levit @ 2025-10-27 10:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-riscv, philmd, pbonzini, dbarboza, zhiwei_liu, liwei1518,
	smishash

Hi all,

This v2 reworks my initial NEORV32 submission into a small, reviewable
series, following feedback to split the changes by subsystem.

The series introduces:
  * a minimal NEORV32 RV32 CPU type and vendor CSR hook,
  * the SYSINFO MMIO block,
  * a small UART device,
  * an SPI controller with command-mode chip-select,
  * and the 'neorv32' RISC-V board wiring the above, plus docs.

Tested by booting the NEORV32 bootloader as -bios and chaining into a
Hello World from an MTD-backed SPI flash image, with UART on stdio.

Changes since v1:
  * Split the monolithic patch into five functional patches, as suggested.
  * Dropped the accidental '.gitignore' hunk.
  * No intentional functional changes; only file organization and clarity.
  * Kept default.mak entry off by default (n).

Patch layout
============
  1/5  target/riscv: add NEORV32 RV32 CPU type and vendor CSR hooks
  2/5  hw/misc: add NEORV32 SYSINFO block (CLK/MISC/SOC/CACHE)
  3/5  hw/char: add NEORV32 UART (CTRL/DATA, fifo, chardev)
  4/5  hw/ssi: add NEORV32 SPI controller (SSI master, CS command)
  5/5  hw/riscv: introduce 'neorv32' board, docs, and riscv32 device config

Quick usage
===========
  $ ./configure --target-list=riscv32-softmmu --enable-debug --enable-fdt
  $ make -j$(nproc)

Prepare a flash image (64MiB) and place your app at 4MiB offset:
  $ dd if=/dev/zero of=$HOME/flash_contents.bin bs=1 count=$((0x04000000))
  $ dd if=/path/to/neorv32_exe.bin of=$HOME/flash_contents.bin \\
       bs=1 seek=$((0x00400000)) conv=notrunc

Run bootloader and chain-load your app:
  $ ./build/qemu-system-riscv32 -nographic -machine neorv32 \\
      -bios /path/to/neorv32/bootloader/neorv32_raw_exe.bin \\
      -drive file=$HOME/flash_contents.bin,if=mtd,format=raw

Debugging:
  $ ... -s -S   # gdbstub on :1234, start paused


Michael Levit (5):
  target/riscv: add NEORV32 RV32 CPU type and vendor CSR hooks
  hw/misc: add NEORV32 SYSINFO block (CLK/MISC/SOC/CACHE)
  hw/char: add NEORV32 UART (CTRL/DATA, fifo, chardev)
  hw/ssi: add NEORV32 SPI controller (SSI master, CS command)
  hw/riscv: introduce 'neorv32' board, docs, and riscv32 device config

Thanks for reviewing!
Michael

-- 
2.20.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-11-14 13:26 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-27 10:09 [PATCH v2 0/5] RISC-V: NEORV32 CPU, devices, and machine Michael Levit
2025-10-27 10:09 ` [PATCH v2 1/5] target/riscv: add NEORV32 RV32 CPU type and vendor CSR hooks Michael Levit
2025-10-30 11:43   ` Daniel Henrique Barboza
2025-10-31 10:46   ` Philippe Mathieu-Daudé
2025-11-12  1:52   ` Alistair Francis
2025-10-27 10:09 ` [PATCH v2 2/5] hw/misc: add NEORV32 SYSINFO block (CLK/MISC/SOC/CACHE) Michael Levit
2025-11-12  2:00   ` Alistair Francis
2025-11-14 13:01     ` Michael Levit
2025-10-27 10:09 ` [PATCH v2 3/5] hw/char: add NEORV32 UART (CTRL/DATA, fifo, chardev) Michael Levit
2025-10-30 12:36   ` Daniel Henrique Barboza
2025-10-31  8:39     ` Michael Levit
2025-11-12  2:03   ` Alistair Francis
2025-10-27 10:09 ` [PATCH v2 4/5] hw/ssi: add NEORV32 SPI controller (SSI master, CS command) Michael Levit
2025-11-12  2:05   ` Alistair Francis
2025-11-14 13:16     ` Michael Levit
2025-10-27 10:09 ` [PATCH v2 5/5] hw/riscv: introduce 'neorv32' board, docs, and riscv32 device config Michael Levit
2025-11-12  2:10   ` Alistair Francis
2025-11-14 13:24     ` Michael Levit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).