qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ben Dooks <ben.dooks@codethink.co.uk>
To: nazar.kazakov@codethink.co.uk, joseph.baker@codethink.co.uk,
	fran.redondo@codethink.co.uk, lawrence.hunter@codethink.co.uk,
	liwei1518@gmail.com, dbarboza@ventanamicro.com,
	zhiwei_liu@linux.alibaba.com, qemu-riscv@nongnu.org
Cc: ben.dooks@codethink.co.uk, qemu-devel@nongnu.org
Subject: [PATCH v2 2/3] target/riscv: add cva6 core type
Date: Tue, 27 May 2025 12:24:36 +0100	[thread overview]
Message-ID: <20250527112437.291445-3-ben.dooks@codethink.co.uk> (raw)
In-Reply-To: <20250527112437.291445-1-ben.dooks@codethink.co.uk>

Add TYPE_RISCV_CPU_CVA6 for the CVA6 core

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 target/riscv/cpu-qom.h |  1 +
 target/riscv/cpu.c     | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/target/riscv/cpu-qom.h b/target/riscv/cpu-qom.h
index 1ee05eb393..3daf75568c 100644
--- a/target/riscv/cpu-qom.h
+++ b/target/riscv/cpu-qom.h
@@ -34,6 +34,7 @@
 #define TYPE_RISCV_CPU_BASE32           RISCV_CPU_TYPE_NAME("rv32")
 #define TYPE_RISCV_CPU_BASE64           RISCV_CPU_TYPE_NAME("rv64")
 #define TYPE_RISCV_CPU_BASE128          RISCV_CPU_TYPE_NAME("x-rv128")
+#define TYPE_RISCV_CPU_CVA6             RISCV_CPU_TYPE_NAME("cva6")
 #define TYPE_RISCV_CPU_RV32I            RISCV_CPU_TYPE_NAME("rv32i")
 #define TYPE_RISCV_CPU_RV32E            RISCV_CPU_TYPE_NAME("rv32e")
 #define TYPE_RISCV_CPU_RV64I            RISCV_CPU_TYPE_NAME("rv64i")
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index 629ac37501..fca45dc9d9 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -3009,6 +3009,17 @@ static const TypeInfo riscv_cpu_type_infos[] = {
         .misa_mxl_max = MXL_RV64,
     ),
 
+    DEFINE_RISCV_CPU(TYPE_RISCV_CPU_CVA6, TYPE_RISCV_VENDOR_CPU,
+        .misa_ext = RVI | RVM | RVA | RVF | RVD | RVC | RVB | RVS | RVU,
+        .misa_mxl_max = MXL_RV64,
+        .cfg.max_satp_mode = VM_1_10_SV39,
+        .priv_spec = PRIV_VERSION_1_12_0,
+        .cfg.pmp = true,
+        .cfg.mmu = true,
+        .cfg.ext_zifencei = true,
+        .cfg.ext_zicsr = true,
+    ),
+
     DEFINE_RISCV_CPU(TYPE_RISCV_CPU_SIFIVE_E51, TYPE_RISCV_CPU_SIFIVE_E,
         .misa_mxl_max = MXL_RV64
     ),
-- 
2.37.2.352.g3c44437643



  parent reply	other threads:[~2025-05-27 12:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-27 11:24 Add initial CVA6 implementaiton Ben Dooks
2025-05-27 11:24 ` [PATCH v2 1/3] hw/riscv: add CVA6 machine Ben Dooks
2025-06-09 11:24   ` Daniel Henrique Barboza
2025-06-09 11:32     ` Ben Dooks
2025-06-09 12:03       ` Daniel Henrique Barboza
2025-05-27 11:24 ` Ben Dooks [this message]
2025-06-07 20:17   ` [PATCH v2 2/3] target/riscv: add cva6 core type Daniel Henrique Barboza
2025-06-09 10:40     ` Ben Dooks
2025-06-09 11:30       ` Daniel Henrique Barboza
2025-06-09 11:47         ` Ben Dooks
2025-06-09 12:28           ` Daniel Henrique Barboza
2025-06-09 11:59         ` Ben Dooks
2025-06-09 12:30           ` Daniel Henrique Barboza
2025-05-27 11:24 ` [PATCH v2 3/3] hw/riscv: set cva6 to use TYPE_RISCV_CPU_CVA6 Ben Dooks
2025-06-07 20:22 ` Add initial CVA6 implementaiton Daniel Henrique Barboza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250527112437.291445-3-ben.dooks@codethink.co.uk \
    --to=ben.dooks@codethink.co.uk \
    --cc=dbarboza@ventanamicro.com \
    --cc=fran.redondo@codethink.co.uk \
    --cc=joseph.baker@codethink.co.uk \
    --cc=lawrence.hunter@codethink.co.uk \
    --cc=liwei1518@gmail.com \
    --cc=nazar.kazakov@codethink.co.uk \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=zhiwei_liu@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).