[PATCH 00/12] Add the RCPU to Tenstorrent Atlantis

Portia Stephens posted 12 patches 1 month, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20261015031804.2406055-1-portias@oss.tenstorrent.com
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>, Joel Stanley <joel@jms.id.au>, Nicholas Piggin <npiggin@gmail.com>, Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com>, Michael Ellerman <mpe@kernel.org>, Portia Stephens <portias@oss.tenstorrent.com>, Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Chao Liu <chao.liu@processmission.com>, Zhao Liu <zhao1.liu@intel.com>
There is a newer version of this series
MAINTAINERS                                  |   1 +
accel/tcg/tcg-all.c                          |   2 +-
docs/system/gdb.rst                          |   2 +
docs/system/riscv/tt_atlantis.rst            |  30 +
hw/riscv/Kconfig                             |   2 +
hw/riscv/tt_atlantis.c                       | 613 +++++++++++++++----
include/hw/core/boards.h                     |   4 +
include/hw/riscv/tt_atlantis.h               |  81 ++-
target/riscv/cpu-qom.h                       |   1 +
target/riscv/cpu.c                           |  28 +
target/riscv/tcg/csr.h                       |   3 +
target/riscv/tcg/meson.build                 |   1 +
target/riscv/tcg/tt_csr.c                    |  58 ++
tests/functional/riscv64/test_tt_atlantis.py |  10 +-
14 files changed, 709 insertions(+), 127 deletions(-)
create mode 100644 target/riscv/tcg/tt_csr.c
[PATCH 00/12] Add the RCPU to Tenstorrent Atlantis
Posted by Portia Stephens 1 month, 1 week ago
Atlantis includes a 32-bit RISC-V core (RCPU) used for boot, low-level
control, and ongoing system management [1]. This series is the first step in
adding the RCPU to the tt-atlantis machine. The RCPU shares access to most
peripherals with the Ascalon cores. However, the RCPU has a different memory view.
This requires a different memory map and a private memory container that the
SoC aliases the shared devices into, at the addresses the RCPU expects.

On hardware, the RCPU is responsible for loading images from the boot medium
into DRAM and releasing the Ascalon cores from reset, via the CPL. This
functionality is not implemented in these changes. The images for the Ascalon
cores continue to be loaded directly into DRAM via command line arguments and
the Ascalon cores start executing at reset.

With these changes, running tt-atlantis with rcpu=on will create a separate
CPUCluster with the RCPU, giving gdb two inferiors. If no bootrom is provided,
the RCPU hart will be held powered off. With a bootrom provided,
via tt-atlantis,rcpu=on,bootrom=, the RCPU will execute the image and console
output is on the second command line serial. This series does not provide a
binary to test on the RCPU, it is in active development and not publicly
available. The QEMU tests are updated to test booting of the Ascalon cores with
and without the RCPU modeled. The machine properties related to the cpus, smp
count and cpu-type, apply to the Ascalon cluster. The RCPU is an auxiliary
core and is not configurable.

See docs/system/riscv/tt_atlantis.rst for usage.

[1] https://github.com/tenstorrent/atlantis-soc-docs/blob/main/data_sheet/atl_soc_data_sheet.pdf

Joel Stanley (1):
  machine: Support extra board CPUs outside -smp

Portia Stephens (11):
  hw/riscv/atlantis: Set valid_cpu_types for Atlantis machine
  hw/riscv/atlantis: Update fdt functions to take generic parameters
  hw/riscv/atlantis: Move Ascalon into cluster struct
  hw/riscv/atlantis: Store Ascalon memory in cluster struct
  hw/riscv/atlantis: Create CPU cluster for Atlantis cpus
  target/riscv: Add Tenstorrent Real-time CPU
  hw/riscv/atlantis: Add the RCPU to the Atlantis SoC
  hw/riscv/atlantis: Back RCPU memory region by unimplemented device
  hw/riscv/atlantis: Load the RCPU bootrom
  tests/functional/riscv64: Add rcpu to tt-atlantis tests
  docs/atlantis: Update Atlantis documentation to include the RCPU

 MAINTAINERS                                  |   1 +
 accel/tcg/tcg-all.c                          |   2 +-
 docs/system/gdb.rst                          |   2 +
 docs/system/riscv/tt_atlantis.rst            |  30 +
 hw/riscv/Kconfig                             |   2 +
 hw/riscv/tt_atlantis.c                       | 613 +++++++++++++++----
 include/hw/core/boards.h                     |   4 +
 include/hw/riscv/tt_atlantis.h               |  81 ++-
 target/riscv/cpu-qom.h                       |   1 +
 target/riscv/cpu.c                           |  28 +
 target/riscv/tcg/csr.h                       |   3 +
 target/riscv/tcg/meson.build                 |   1 +
 target/riscv/tcg/tt_csr.c                    |  58 ++
 tests/functional/riscv64/test_tt_atlantis.py |  10 +-
 14 files changed, 709 insertions(+), 127 deletions(-)
 create mode 100644 target/riscv/tcg/tt_csr.c

-- 
2.43.0