Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CECC8CCA462 for ; Fri, 16 Oct 2026 08:09:31 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xHczg-0003tx-Mb; Fri, 16 Oct 2026 04:08:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHczK-0003od-IB; Fri, 16 Oct 2026 04:08:29 -0400 Received: from mailsender.cdac.in ([196.1.113.117] helo=mailsender-core1.pune.cdac.in) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xHczG-0005xB-DO; Fri, 16 Oct 2026 04:08:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cdac.in; s=default; t=1792138089; bh=5nWtAO4eDgun5El3ax95KIS+TUrX8uE5A3LV2dn1u1M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aA7kcTjIERazQmnREpGLsYiYaMHXQYVtns74fEqssq15U0uBZCxQ7lC3UdmAEwaDN kT2bYeFhri72Jn7Ndo0ZBWVjbz0W3JVFWL7jf8gTGuUJ01lm5cdobAQbXAnTWQ5oZk EsXIVdanrqb1AFGYB+d2oYgR46tNqbqJSrMGqBFg= Received: from mscr-int.pune.cdac.in (mscr-int.pune.cdac.in [10.208.193.2]) by mailsender.cdac.in (8.15.2/8.15.2/Debian-22ubuntu3) with ESMTP id 69G888B43825298; Fri, 16 Oct 2026 13:38:09 +0530 Received: from mailgw-cip.pune.cdac.in (mscr-haproxy.pune.cdac.in [10.208.193.46]) by mscr-int.pune.cdac.in (Postfix) with ESMTP id E1D811000723A; Fri, 16 Oct 2026 13:37:48 +0530 (IST) X-Auth: karthika.b@cdac.in Received: from hdg164.tvm.cdac.in (hd_hdg164.tvm.cdac.in [10.176.18.107]) (Authenticated sender: karthika.b@cdac.in) by mailgw-cip.pune.cdac.in (Postfix) with ESMTPSA id 864BE14E17D2; Fri, 16 Oct 2026 13:37:48 +0530 (IST) From: Karthika B To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, sreenadh@cdac.in, raokk@cdac.in, Karthika B , Palmer Dabbelt , Alistair Francis , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , Chao Liu Subject: [PATCH 3/7] target/riscv: Add VEGA32 and VEGA64 CPU types Date: Fri, 16 Oct 2026 13:37:03 +0530 Message-ID: <20261016080709.17331-4-karthika.b@cdac.in> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261016080709.17331-1-karthika.b@cdac.in> References: <385625713.441366.1761727810206@webmail2.cdac.in> <20261016080709.17331-1-karthika.b@cdac.in> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CDAC-PUNE-MailScanner-Information: Please contact the ISP for more information X-CDAC-PUNE-MailScanner-ID: E1D811000723A.AEE86 X-CDAC-PUNE-MailScanner: Found to be clean X-CDAC-PUNE-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-2.9, required 6, autolearn=not spam, ALL_TRUSTED -1.00, BAYES_00 -1.90) X-CDAC-PUNE-MailScanner-From: karthika.b@cdac.in Received-SPF: pass client-ip=196.1.113.117; envelope-from=karthika.b@cdac.in; helo=mailsender-core1.pune.cdac.in X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Signed-off-by: Karthika B --- target/riscv/cpu-qom.h | 2 ++ target/riscv/cpu.c | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/target/riscv/cpu-qom.h b/target/riscv/cpu-qom.h index 30dcdcfaae..58abfef048 100644 --- a/target/riscv/cpu-qom.h +++ b/target/riscv/cpu-qom.h @@ -58,6 +58,8 @@ #define TYPE_RISCV_CPU_XIANGSHAN_KMH RISCV_CPU_TYPE_NAME("xiangshan-kunminghu") #define TYPE_RISCV_CPU_MIPS_P8700 RISCV_CPU_TYPE_NAME("mips-p8700") #define TYPE_RISCV_CPU_HOST RISCV_CPU_TYPE_NAME("host") +#define TYPE_RISCV_CPU_VEGA32 RISCV_CPU_TYPE_NAME("vega32") +#define TYPE_RISCV_CPU_VEGA64 RISCV_CPU_TYPE_NAME("vega64") OBJECT_DECLARE_CPU_TYPE(RISCVCPU, RISCVCPUClass, RISCV_CPU) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 5903df9954..7b96b7b670 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -2987,6 +2987,20 @@ static const TypeInfo riscv_cpu_type_infos[] = { ), #endif + +#if defined(TARGET_RISCV32) + DEFINE_RISCV_CPU(TYPE_RISCV_CPU_VEGA32, TYPE_RISCV_CPU_SIFIVE_U, + .misa_mxl_max = MXL_RV32, + .misa_ext = RVI | RVM | RVA | RVS | RVU, + .priv_spec = PRIV_VERSION_LATEST, + + .cfg.max_satp_mode = VM_1_10_SV32, + .cfg.ext_zicsr = true, + .cfg.ext_zifencei = true, + .cfg.pmp = false, + ), +#endif + #if (defined(TARGET_RISCV64) && !defined(CONFIG_USER_ONLY)) DEFINE_RISCV_CPU(TYPE_RISCV_CPU_MAX32, TYPE_RISCV_DYNAMIC_CPU, .cfg.max_satp_mode = VM_1_10_SV32, @@ -3032,6 +3046,17 @@ static const TypeInfo riscv_cpu_type_infos[] = { .misa_mxl_max = MXL_RV64, ), + DEFINE_RISCV_CPU(TYPE_RISCV_CPU_VEGA64, TYPE_RISCV_CPU_SIFIVE_U, + .misa_mxl_max = MXL_RV64, + .misa_ext = RVI | RVM | RVA | RVS | RVU, + .priv_spec = PRIV_VERSION_LATEST, + + .cfg.max_satp_mode = VM_1_10_SV39, + .cfg.ext_zicsr = true, + .cfg.ext_zifencei = true, + .cfg.pmp = false, + ), + DEFINE_RISCV_CPU(TYPE_RISCV_CPU_THEAD_C906, TYPE_RISCV_VENDOR_CPU, .misa_mxl_max = MXL_RV64, .misa_ext = RVG | RVC | RVS | RVU, -- 2.43.0 ------------------------------------------------------------------------------------------------------------ [ C-DAC is on Social-Media too. Kindly follow us at: Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ] This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken. ------------------------------------------------------------------------------------------------------------