From nobody Tue Nov 26 18:28:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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 ARC-Seal: i=1; a=rsa-sha256; t=1705663337; cv=none; d=zohomail.com; s=zohoarc; b=iaKCYwL/NBLBXQYMsgYghPuSwK5BTsYTbyZsC/7N0Ggmxbk8A6cHGtBlKSs3OErPmdtFwj6TGTWUmAPJxS+cQjFS7gkx4iag0tBHtD8dp5VGIsZQF3qTsBlS2Dh2XsLFgSoOXXt6Ni533T0BoSTnt2XLveQRHAQtpPZHIYzwJyk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705663337; h=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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=meHfwEYbS6E+e0h+odVZXRTQRV6tLtgSbMqCs98rgEc=; b=GG0+5MWee/NtfqV9lFgBJc4VWjKTbIr+5yRF5JS/8LTl4fSsPK6uw7fir4N7b7zCP/zsAtvypCaQZtCWmKcyqbn5MQHQpj1WJ03eEYeZI8E30kEEy7FDJuXOZsdiFy7hjDoOGNmer7a6hXyBPUT1QnBQOPH1c2V/nvEhO1fPkcg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1705663336927606.8232908224313; Fri, 19 Jan 2024 03:22:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQmwN-0004nD-Ev; Fri, 19 Jan 2024 06:21:39 -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 1rQmwM-0004mH-69 for qemu-devel@nongnu.org; Fri, 19 Jan 2024 06:21:38 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQmwJ-0008UG-R0 for qemu-devel@nongnu.org; Fri, 19 Jan 2024 06:21:37 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-40e9fd483e2so2477835e9.0 for ; Fri, 19 Jan 2024 03:21:35 -0800 (PST) Received: from rockhopper.ba.rivosinc.com (214.11.169.217.in-addr.arpa. [217.169.11.214]) by smtp.gmail.com with ESMTPSA id l22-20020a05600c4f1600b0040d6b91efd9sm32428067wmq.44.2024.01.19.03.21.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 03:21:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1705663293; x=1706268093; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=meHfwEYbS6E+e0h+odVZXRTQRV6tLtgSbMqCs98rgEc=; b=hoaYMOOHSf+FRYLLFspgWf/I9Y3QhrKKCIC0yzaWnIsjEscBldw3GnzwvgKXkkCQ/G g66rAeH+dth2kIgMwSINaZgECHwHgU0H3/pXHh8zvDYGrxsjhxrZr1UbzbTKVeJwnnS6 nMlTsihqCSGE0W84EpvILc2w07EEePB83wdCClYCNgKnxLFSy4O9WfEUINwfM6edpuGv VkdgBlrqeJ6U6iFTyTuimkJuIMUDvW19qT90rpgOkhgcrOUlTImaDhgj8kKLJMfnfxQH jEiWjuF/VL2JIYkQ3oyF2Cr1yBEI7QTFp5FcSJypDLrM8DU2IzNEcDB/fsa8Gb3Zz5fq e4DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705663293; x=1706268093; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=meHfwEYbS6E+e0h+odVZXRTQRV6tLtgSbMqCs98rgEc=; b=v0yvZ7xpgbRUDcxPEme0bIWXtsH40T9h2tMGPydJrqLMzvL2oeVr81qZCNAB1Gx/fs eQpyJb63H2dTF+HZetKF0B8/tRldpvOb6SX8exCWsY4Fmcg/X1g1p2QNYWae+9yb+9LP pc04x3VppPXhXTCQBiknVHH6HwzwE/rGtw9/eKqGxIdSZ9q1Ly5yFbZLwpPEYexobMKD 0YfqBodxNtrFeqt+ojTrvSIF/qRSYYwXNH/RcprigzPqFBF3+R/bOK39LV26DsmLLrBI QIjq3C94x/8WEs+vJiAr4BdVBo4GEFxacneyHyf0TPLNH+envjjryvUAxO+vKH4Czb4H kdhA== X-Gm-Message-State: AOJu0YwZq1e4RlQDwaXk0K2l+C4myPYdBjD7qy5m+zv3QjzLyExGUTlL Z7C+F8G0Rc1Z3/3xRu7s07KssGAiPzb5qSqgrxOPuitcVTioYQwZJNKGqKXwqj9U5YPW7hFWS0l 8fmA= X-Google-Smtp-Source: AGHT+IHfBCcuhIeSt6bmy9hebd77oXZYfwD5PCJc29IZ4wut0VWkKuB8OFi8MQ4+ivK+Dvw1SkJFRQ== X-Received: by 2002:a05:600c:2205:b0:40e:8bb2:6bdc with SMTP id z5-20020a05600c220500b0040e8bb26bdcmr1449697wml.87.1705663292856; Fri, 19 Jan 2024 03:21:32 -0800 (PST) From: Rob Bradford To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, atishp@rivosinc.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, liwei1518@gmail.com, dbarboza@ventanamicro.com, zhiwei_liu@linux.alibaba.com, Rob Bradford Subject: [PATCH v2 1/2] target/riscv: Add Zaamo and Zalrsc extensions Date: Fri, 19 Jan 2024 11:21:28 +0000 Message-ID: <20240119112129.20067-2-rbradford@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240119112129.20067-1-rbradford@rivosinc.com> References: <20240119112129.20067-1-rbradford@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::32b; envelope-from=rbradford@rivosinc.com; helo=mail-wm1-x32b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @rivosinc-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1705663339545100005 Content-Type: text/plain; charset="utf-8" These extensions represent the atomic operations from A (Zaamo) and the Load-Reserved/Store-Conditional operations from A (Zalrsc) Signed-off-by: Rob Bradford Reviewed-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 5 +++++ target/riscv/cpu_cfg.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 8d3ec74a1c..604baf53c8 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -103,7 +103,9 @@ const RISCVIsaExtData isa_edata_arr[] =3D { ISA_EXT_DATA_ENTRY(zihintpause, PRIV_VERSION_1_10_0, ext_zihintpause), ISA_EXT_DATA_ENTRY(zihpm, PRIV_VERSION_1_12_0, ext_zihpm), ISA_EXT_DATA_ENTRY(zmmul, PRIV_VERSION_1_12_0, ext_zmmul), + ISA_EXT_DATA_ENTRY(zaamo, PRIV_VERSION_1_12_0, ext_zaamo), ISA_EXT_DATA_ENTRY(zacas, PRIV_VERSION_1_12_0, ext_zacas), + ISA_EXT_DATA_ENTRY(zalrsc, PRIV_VERSION_1_12_0, ext_zalrsc), ISA_EXT_DATA_ENTRY(zawrs, PRIV_VERSION_1_12_0, ext_zawrs), ISA_EXT_DATA_ENTRY(zfa, PRIV_VERSION_1_12_0, ext_zfa), ISA_EXT_DATA_ENTRY(zfbfmin, PRIV_VERSION_1_12_0, ext_zfbfmin), @@ -1491,6 +1493,9 @@ const RISCVCPUMultiExtConfig riscv_cpu_experimental_e= xts[] =3D { MULTI_EXT_CFG_BOOL("x-smaia", ext_smaia, false), MULTI_EXT_CFG_BOOL("x-ssaia", ext_ssaia, false), =20 + MULTI_EXT_CFG_BOOL("x-zaamo", ext_zaamo, false), + MULTI_EXT_CFG_BOOL("x-zalrsc", ext_zalrsc, false), + MULTI_EXT_CFG_BOOL("x-zvfh", ext_zvfh, false), MULTI_EXT_CFG_BOOL("x-zvfhmin", ext_zvfhmin, false), =20 diff --git a/target/riscv/cpu_cfg.h b/target/riscv/cpu_cfg.h index fea14c275f..cc4c30244c 100644 --- a/target/riscv/cpu_cfg.h +++ b/target/riscv/cpu_cfg.h @@ -78,7 +78,9 @@ struct RISCVCPUConfig { bool ext_svnapot; bool ext_svpbmt; bool ext_zdinx; + bool ext_zaamo; bool ext_zacas; + bool ext_zalrsc; bool ext_zawrs; bool ext_zfa; bool ext_zfbfmin; --=20 2.43.0