From nobody Sat Nov 29 10:48:31 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1764179560; cv=none; d=zohomail.com; s=zohoarc; b=XINV6FURV2/FQ2TdZFVaVBIyltvT9tz/JhAKU66FzFowTVw4tgiBWaJJAiOpF52dyL80vdPkK4/XYjXU/cNzPD/b2eCLG0HPPwYmG8r0VXeZOKMhFB+mSIyPJuwRyJ4Vw76Iit6UhdNQUc5OEL7x68lYR6zv3Kd7WmCdDp2IDUI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764179560; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=T0PsBeXei2Zz0QUFn7jbKTw9+D6BCDhQWADztg1bno8=; b=cyxEQ8yqoy4a72+zq9dZZPvkx+ZkJ0prsdPAEBnx6kSdwI6klRd55gGDl0916971rGe9cLiPFM9AFwGv80BCkZjBv08LwborJ+Vb/jQcT7cQ4HVlOflf1AfFv46rX8sBpCBSiuevDkZFgy2bxTLUQOtm0rJh5n0q5DFJkcOO7cA= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1764179560828305.2271647787135; Wed, 26 Nov 2025 09:52:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vOIdx-0001A0-BW; Wed, 26 Nov 2025 11:45:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vOIcw-0000pg-Qp; Wed, 26 Nov 2025 11:44:28 -0500 Received: from 60-248-80-70.hinet-ip.hinet.net ([60.248.80.70] helo=Atcsqr.andestech.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vOIck-0003R2-PN; Wed, 26 Nov 2025 11:44:22 -0500 Received: from mail.andestech.com (ATCPCS31.andestech.com [10.0.1.89]) by Atcsqr.andestech.com with ESMTPS id 5AQGhZrx005667 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 27 Nov 2025 00:43:35 +0800 (+08) (envelope-from alvinga@andestech.com) Received: from swlinux02.andestech.com (10.0.15.183) by ATCPCS31.andestech.com (10.0.1.89) with Microsoft SMTP Server id 14.3.498.0; Thu, 27 Nov 2025 00:43:36 +0800 To: , CC: , , , , , , Alvin Chang , Yu-Ming Chang Subject: [PATCH v2 1/2] target/riscv: Add "debug-1.0" to specify debug specification v1.0 Date: Thu, 27 Nov 2025 00:43:28 +0800 Message-ID: <20251126164329.2157287-2-alvinga@andestech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251126164329.2157287-1-alvinga@andestech.com> References: <20251126164329.2157287-1-alvinga@andestech.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.0.15.183] X-DKIM-Results: atcpcs31.andestech.com; dkim=none; X-DNSRBL: X-SPAM-SOURCE-CHECK: pass X-MAIL: Atcsqr.andestech.com 5AQGhZrx005667 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=60.248.80.70; envelope-from=alvinga@andestech.com; helo=Atcsqr.andestech.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, RDNS_DYNAMIC=0.982, SPF_PASS=-0.001, TVD_RCVD_IP=0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Alvin Chang From: Alvin Chang via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1764179563447019200 Content-Type: text/plain; charset="utf-8" Currently RISC-V CPU has a property "debug" which is equivalent to old debug specification v0.13 version. Now we have ratified debug specification v1.0 version. To support both versions, we add "debug-1.0" as one of RISC-V CPU property to let user specify that debug v0.13 or debug v1.0 is enabled. When debug-1.0=3Dfalse CPU fallbacks to default v0.13 version. Note that "debug-1.0" depends on "debug" property: - debug=3Dfalse,debug-1.0=3D{true|false} --> debug is disabled - debug=3Dtrue,debug-1.0=3Dfalse --> debug v0.13 is enabled - debug=3Dtrue,debug-1.0=3Dtrue --> debug v1.0 is enabled Signed-off-by: Alvin Chang Reviewed-by: Yu-Ming Chang Reviewed-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 1 + target/riscv/cpu_cfg_fields.h.inc | 1 + 2 files changed, 2 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 73d4280..082035b 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -2637,6 +2637,7 @@ RISCVCPUImpliedExtsRule *riscv_multi_ext_implied_rule= s[] =3D { =20 static const Property riscv_cpu_properties[] =3D { DEFINE_PROP_BOOL("debug", RISCVCPU, cfg.debug, true), + DEFINE_PROP_BOOL("debug-1.0", RISCVCPU, cfg.debug_1_00, false), =20 {.name =3D "pmu-mask", .info =3D &prop_pmu_mask}, {.name =3D "pmu-num", .info =3D &prop_pmu_num}, /* Deprecated */ diff --git a/target/riscv/cpu_cfg_fields.h.inc b/target/riscv/cpu_cfg_field= s.h.inc index a154ecd..402b255 100644 --- a/target/riscv/cpu_cfg_fields.h.inc +++ b/target/riscv/cpu_cfg_fields.h.inc @@ -151,6 +151,7 @@ BOOL_FIELD(ext_XVentanaCondOps) BOOL_FIELD(mmu) BOOL_FIELD(pmp) BOOL_FIELD(debug) +BOOL_FIELD(debug_1_00) BOOL_FIELD(misa_w) =20 BOOL_FIELD(short_isa_string) --=20 2.43.0