From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x30.google.com (mail-oa1-x30.google.com [IPv6:2001:4860:4864:20::30]) by sourceware.org (Postfix) with ESMTPS id A0E1038582B8 for ; Thu, 22 Sep 2022 08:48:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A0E1038582B8 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-oa1-x30.google.com with SMTP id 586e51a60fabf-12803ac8113so12872211fac.8 for ; Thu, 22 Sep 2022 01:48:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=fT+TKYVNj8JzZA1PWmSERuZa5xIW46gup78Vn/7oujA=; b=fQJSgRJOf+Q2uti5Q+JQhEyt3upRSNOimEsmnNGJqiAgSNrF1vJGidPuNknD6WCjmM /PK8E3JCUA5mTynUp8ANBMxoGT0TkuBG0p9TEXsYi09h4RdZul+Oia8VVcavAxwMub2o VWtv+grDx+rGJQZahFX6pFqLEm6Cj9lUVTr7M5bN0hnUHKh7iJHPzHy1oPjPQvTzKcFm luyXpIBbihN+jpF+sEWi4Bs4SLs6Ooj91gXig8hOyYrrQE1IYrNvq+/UXZoKLptsS6bo JenQr+fUM/IdeJ6CdHQZxl3T+knsuKFv6Z45LOXNBSHOzGjPlg+NM4xNJOgTVaRyFgQM wjGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=fT+TKYVNj8JzZA1PWmSERuZa5xIW46gup78Vn/7oujA=; b=XTKFP6aWrF2IrtNYRYth8jnGcmciqtf/yJRy5JCDNp22lSJvci90RaujDYH4wyetpP G9EGQVv0NHRvemgceyEN8kvQWXxEKl2g5ze8yEs/VpRn/d6F6os6yHCidERCXIz0oD8c Iv2YchnAihBNkYNWbqZF7baAxxrZ86VNWNFmSY/mFlL3rAGRUcmrSfbVF6z6k7mZd5r/ Nf3DkFspF8Xp7Vm5yZ+gnmp5+AdYBZAfkjQ+zLrjVGJzPPnZc+1i1s1QhBum/Xvr8Ne/ PHrYBnzhis+NEdcCxojUGmnQyerhHV5O4w3XxWZ6fMGa7cZMzjOpov5VL7H4r3KwK3aR 1g5A== X-Gm-Message-State: ACrzQf0bL4WYar9W+LS4bziYunmgnBNGDev6P9aST65jms3LgootXgue ftzAcVpFTDRiaBTGnLFOVbzv0Y6C4+H/zJ50pDAmVj/sMnY= X-Google-Smtp-Source: AMsMyM5posXPvO6epe6NRDAaibdYOd9m1013ur//cSo6uPB2VKlBIvNOfrpq5DLO5w2+svA0uPTbUIBddOFlWhqm9lE= X-Received: by 2002:a05:6870:58aa:b0:118:307d:bb43 with SMTP id be42-20020a05687058aa00b00118307dbb43mr7624663oab.82.1663836513034; Thu, 22 Sep 2022 01:48:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nelson Chu Date: Thu, 22 Sep 2022 16:48:22 +0800 Message-ID: Subject: Re: [RFC PATCH 1/1] RISC-V: Add privileged extensions without instructions/CSRs To: Tsukasa OI Cc: Kito Cheng , Palmer Dabbelt , Andrew Waterman , binutils@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Sep 22, 2022 at 3:59 PM Tsukasa OI wrote: > > Currently, GNU Binutils does not support following privileged extensions: > > - 'Smepmp' > - 'Svnapot' > - 'Svpbmt' > > as they do not provide new CSRs or new instructions ('Smepmp' extends the > privileged architecture CSRs but does not define the CSR itself). However, > adding them might be useful as we no longer have to "filter" ISA strings > just for toolchains (if full ISA string is given by a vendor, we can > straightly use it). OKay. Nelson > And there's a fact that supports this theory: there's already an > (unprivileged) extension which does not provide CSRs or instructions (but > only an architectural guarantee): 'Zkt' (constant timing guarantee for > certain subset of RISC-V instructions). > > This simple patchset simply adds three privileged extensions listed above. > > bfd/ChangeLog: > > * elfxx-riscv.c (riscv_supported_std_s_ext): Add 'Smepmp', > 'Svnapot' and 'Svpbmt' extensions. > --- > bfd/elfxx-riscv.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c > index 7eda177bd6e..bbc30c9afc2 100644 > --- a/bfd/elfxx-riscv.c > +++ b/bfd/elfxx-riscv.c > @@ -1210,10 +1210,13 @@ static struct riscv_supported_ext riscv_supported_std_z_ext[] = > > static struct riscv_supported_ext riscv_supported_std_s_ext[] = > { > + {"smepmp", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, > {"smstateen", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, > {"sscofpmf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, > {"sstc", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, > {"svinval", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, > + {"svnapot", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, > + {"svpbmt", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, > {NULL, 0, 0, 0, 0} > }; > > -- > 2.34.1 >