Skip to content

hw/riscv: Socify Atlantis

Joel Stanley qemu-devel qemu-riscv 3 versions – Applied

Status from this message: Applied to riscv-to-apply.next

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest16 patches 9 repliesApplied
  2. v216 patches 34 repliesSuperseded
  3. v116 patches 21 repliesSuperseded

Changes in v3 from the cover letter

- Rebase on today's riscv-to-apply.next, fixing conflicts with the device tree rework
- Take up Phil's suggestion to change @mr to @container in the first five patches
- Add r-b from Alistair, Daniel, Phil. Thank you!

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/16hw/riscv/aia: Take a MemoryRegion for the created deviceshw/riscv/aia.c hw/riscv/aia.h hw/riscv/tt_atlantis.c +1 more+8 -41 reply
2/16hw/intc/riscv_aclint: Take a MemoryRegion for the created deviceshw/intc/riscv_aclint.c hw/riscv/cps.c hw/riscv/k230.c +9 more+52 -320 replies
3/16hw/intc/riscv_imsic: Take a MemoryRegion for the created devicehw/intc/riscv_imsic.c hw/riscv/aia.c hw/riscv/xiangshan_kmh.c +1 more+13 -70 replies
4/16hw/intc/riscv_aplic: Take a MemoryRegion for the created devicehw/intc/riscv_aplic.c hw/riscv/aia.c hw/riscv/cps.c +2 more+22 -150 replies
5/16hw/intc/sifive_plic: Take a MemoryRegion for the created devicehw/intc/sifive_plic.c hw/riscv/k230.c hw/riscv/microchip_pfsoc.c +5 more+16 -101 reply
6/16hw/riscv/cps: Map interrupt controllers in SoC containerhw/riscv/cps.c+4 -40 replies
7/16hw/riscv/atlantis: Make UART unimp region a SoC devicehw/riscv/tt_atlantis.c include/hw/riscv/tt_atlantis.h+18 -30 replies
8/16hw/riscv/atlantis: Remove unused fdt_sizehw/riscv/tt_atlantis.c include/hw/riscv/tt_atlantis.h+5 -60 replies
9/16hw/riscv/atlantis: Rename hart array 'soc' to 'cpus'hw/riscv/tt_atlantis.c include/hw/riscv/tt_atlantis.h+18 -180 replies
10/16hw/riscv/atlantis: Rework device tree creationhw/riscv/tt_atlantis.c+23 -280 replies
11/16hw/riscv/atlantis: Use local reference for system memoryhw/riscv/tt_atlantis.c include/hw/riscv/tt_atlantis.h+11 -90 replies
12/16hw/riscv/atlantis: Decouple RAM size from MachineStatehw/riscv/tt_atlantis.c include/hw/riscv/tt_atlantis.h+13 -80 replies
13/16hw/riscv/atlantis: Make TTAtlantisState own memory containershw/riscv/tt_atlantis.c include/hw/riscv/tt_atlantis.h+10 -90 replies
14/16hw/riscv: Add property to hart array to allow private memoryhw/riscv/riscv_hart.c include/hw/riscv/riscv_hart.h+10 -02 replies
15/16hw/riscv/atlantis: Extract an Atlantis SoC devicehw/riscv/tt_atlantis.c include/hw/riscv/tt_atlantis.h+119 -463 replies
16/16hw/riscv/atlantis: Map the SoC through a memory containerhw/riscv/tt_atlantis.c include/hw/riscv/tt_atlantis.h+16 -20 replies

Reviews trailers per patch

All 16 patches have a Reviewed-by or Acked-by.

PatchDaniel Henrique BarbozaAlistair FrancisPhilippe Mathieu-DaudéChao Liu
1/16R-b R-b R-b R-b
2/16R-b R-b R-b
3/16R-b R-b R-b
4/16R-b R-b R-b
5/16R-b R-b R-b R-b
6/16R-b R-b R-b
7/16R-b R-b R-b
8/16R-b R-b
9/16R-b R-b R-b
10/16R-b R-b R-b
11/16R-b R-b
12/16R-b R-b R-b
13/16R-b R-b R-b
14/16R-b R-b
15/16R-b R-b
16/16R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v3 thread

Cover letter [PATCH v3 00/16] hw/riscv: Socify Atlantis

v2: https://lore.kernel.org/qemu-riscv/[email protected]

Changes in v3:

- Rebase on today's riscv-to-apply.next, fixing conflicts with the device tree rework
- Take up Phil's suggestion to change @mr to @container in the first five patches
- Add r-b from Alistair, Daniel, Phil. Thank you!

Original commit message:

This addresses the review given by Cedric on v1 of the Atlantis patches, where he suggested making the machine a SoC. This is the pattern followed by the Aspeed ARM machines, where the SoC represents the modelled hardware, attaching its devices to a memory container, with the SoC instantiated by a QEMU machine that provides the memory container and the machine's RAM.

Aside from the clean abstraction that this encourages, this pattern will be useful in adding other SoCs to the Atlantis machine, such as the RCPU (boot microcontroller) and CPL (Cluster Power Logic microcontroller).

The series converts the RISC-V interrupt controllers to take a MemoryRegion for mapping themselves, with no change in behaviour for existing machines, and then cleans up the CPS device to place its devices in the memory container provided.

The next few patches clean up the Atlantis machine to make extracting the SoC device and mapping it in a container relatively straightforward.

Joel Stanley (15):
hw/riscv/aia: Take a MemoryRegion for the created devices hw/intc/riscv_aclint: Take a MemoryRegion for the created devices hw/intc/riscv_imsic: Take a MemoryRegion for the created device hw/intc/riscv_aplic: Take a MemoryRegion for the created device hw/intc/sifive_plic: Take a MemoryRegion for the created device hw/riscv/cps: Map interrupt controllers in SoC container hw/riscv/atlantis: Make UART unimp region a SoC device hw/riscv/atlantis: Remove unused fdt_size hw/riscv/atlantis: Rename hart array 'soc' to 'cpus' hw/riscv/atlantis: Rework device tree creation hw/riscv/atlantis: Use local reference for system memory hw/riscv/atlantis: Decouple RAM size from MachineState hw/riscv/atlantis: Make TTAtlantisState own memory containers hw/riscv/atlantis: Extract an Atlantis SoC device hw/riscv/atlantis: Map the SoC through a memory container

Portia Stephens (1):
hw/riscv: Add property to hart array to allow private memory

 hw/riscv/aia.h                 |   3 +-
 include/hw/intc/riscv_aclint.h |   7 +-
 include/hw/intc/riscv_aplic.h  |   7 +-
 include/hw/intc/riscv_imsic.h  |   3 +-
 include/hw/intc/sifive_plic.h  |   4 +-
 include/hw/riscv/riscv_hart.h  |   2 +
 include/hw/riscv/tt_atlantis.h |  32 +++-
 hw/intc/riscv_aclint.c         |  12 +-
 hw/intc/riscv_aplic.c          |  10 +-
 hw/intc/riscv_imsic.c          |   6 +-
 hw/intc/sifive_plic.c          |   7 +-
 hw/riscv/aia.c                 |  17 +-
 hw/riscv/cps.c                 |  12 +-
 hw/riscv/k230.c                |   9 +-
 hw/riscv/microchip_pfsoc.c     |   8 +-
 hw/riscv/riscv_hart.c          |   8 +
 hw/riscv/shakti_c.c            |  10 +-
 hw/riscv/sifive_e.c            |   6 +-
 hw/riscv/sifive_u.c            |  10 +-
 hw/riscv/spike.c               |   4 +-
 hw/riscv/tt_atlantis.c         | 280 +++++++++++++++++++++------------
 hw/riscv/virt.c                |  21 ++-
 hw/riscv/xiangshan_kmh.c       |  17 +-
 23 files changed, 326 insertions(+), 169 deletions(-)
Signature · 1 line
2.47.3