From nobody Tue Feb 10 14:32:06 2026 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1628186269748245.34722784605833; Thu, 5 Aug 2021 10:57:49 -0700 (PDT) Received: from localhost ([::1]:38112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBhcq-00017z-Gr for importer@patchew.org; Thu, 05 Aug 2021 13:57:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBhc3-0007de-8L; Thu, 05 Aug 2021 13:56:59 -0400 Received: from exmail.andestech.com ([60.248.187.195]:49199 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 1mBhbz-0007nC-VA; Thu, 05 Aug 2021 13:56:58 -0400 Received: from mail.andestech.com (atcpcs16.andestech.com [10.0.1.222]) by ATCSQR.andestech.com with ESMTP id 175HuUWc055927; Fri, 6 Aug 2021 01:56:30 +0800 (GMT-8) (envelope-from ruinland@andestech.com) Received: from atcfdc88.andestech.com (10.0.15.120) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.498.0; Fri, 6 Aug 2021 01:56:31 +0800 From: Ruinland Chuan-Tzu Tsai To: , Subject: [RFC PATCH v4 1/4] Add options to config/meson files for custom CSR Date: Fri, 6 Aug 2021 01:56:23 +0800 Message-ID: <20210805175626.11573-2-ruinland@andestech.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20210805175626.11573-1-ruinland@andestech.com> References: <20210805175626.11573-1-ruinland@andestech.com> MIME-Version: 1.0 X-Originating-IP: [10.0.15.120] X-DNSRBL: X-MAIL: ATCSQR.andestech.com 175HuUWc055927 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.187.195; envelope-from=ruinland@andestech.com; helo=ATCSQR.andestech.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, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ruinland@andestech.com, wangjunqiang@iscas.ac.cn, bin.meng@windriver.com, Dylan Jhong Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1628186272659100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Ruinland ChuanTzu Tsai Adding option `riscv_custom` to configure script, meson.build and meson_options.txt so as to toggle custom CSR and will-be-upstreamed custom instructions handling logic. Signed-off-by: Dylan Jhong --- configure | 6 ++++++ meson.build | 2 ++ meson_options.txt | 2 ++ 3 files changed, 10 insertions(+) diff --git a/configure b/configure index 34fccaa..88f6584 100755 --- a/configure +++ b/configure @@ -324,6 +324,7 @@ virtiofsd=3D"auto" virtfs=3D"auto" libudev=3D"auto" mpath=3D"auto" +riscv_custom=3D"auto" vnc=3D"enabled" sparse=3D"auto" vde=3D"$default_feature" @@ -1016,6 +1017,10 @@ for opt do ;; --enable-vnc) vnc=3D"enabled" ;; + --enable-riscv-custom) riscv_custom=3D"enabled" + ;; + --disable-riscv-custom) riscv_custom=3D"disabled" + ;; --disable-gettext) gettext=3D"disabled" ;; --enable-gettext) gettext=3D"enabled" @@ -6416,6 +6421,7 @@ NINJA=3D$ninja $meson setup \ -Dcocoa=3D$cocoa -Dgtk=3D$gtk -Dmpath=3D$mpath -Dsdl=3D$sdl -Dsdl_= image=3D$sdl_image \ -Dvnc=3D$vnc -Dvnc_sasl=3D$vnc_sasl -Dvnc_jpeg=3D$vnc_jpeg -Dvnc_p= ng=3D$vnc_png \ -Dgettext=3D$gettext -Dxkbcommon=3D$xkbcommon -Du2f=3D$u2f -Dvirti= ofsd=3D$virtiofsd \ + -Driscv_custom=3D$riscv_custom \ -Dcapstone=3D$capstone -Dslirp=3D$slirp -Dfdt=3D$fdt -Dbrlapi=3D$b= rlapi \ -Dcurl=3D$curl -Dglusterfs=3D$glusterfs -Dbzip2=3D$bzip2 -Dlibiscs= i=3D$libiscsi \ -Dlibnfs=3D$libnfs -Diconv=3D$iconv -Dcurses=3D$curses -Dlibudev= =3D$libudev\ diff --git a/meson.build b/meson.build index adeec15..736810e 100644 --- a/meson.build +++ b/meson.build @@ -1151,6 +1151,7 @@ config_host_data.set('HAVE_SYS_KCOV_H', cc.has_header= ('sys/kcov.h')) config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', pre= fix: '#include ')) =20 config_host_data.set('CONFIG_PREADV', cc.has_function('preadv', prefix: '#= include ')) +config_host_data.set('CONFIG_RISCV_CUSTOM', get_option('riscv_custom').ena= bled()) =20 ignored =3D ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target arrays =3D ['CONFIG_AUDIO_DRIVERS', 'CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BD= RV_RO_WHITELIST'] @@ -2694,6 +2695,7 @@ summary_info +=3D {'libpmem support': config_host.h= as_key('CONFIG_LIBPMEM')} summary_info +=3D {'libdaxctl support': config_host.has_key('CONFIG_LIBDAX= CTL')} summary_info +=3D {'libudev': libudev.found()} summary_info +=3D {'FUSE lseek': fuse_lseek.found()} +summary_info +=3D {'RISC-V custom CSRs/instructions': get_option('riscv_cu= stom').enabled()} summary(summary_info, bool_yn: true, section: 'Dependencies') =20 if not supported_cpus.contains(cpu) diff --git a/meson_options.txt b/meson_options.txt index 9734019..470ef23 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -125,3 +125,5 @@ option('slirp', type: 'combo', value: 'auto', option('fdt', type: 'combo', value: 'auto', choices: ['disabled', 'enabled', 'auto', 'system', 'internal'], description: 'Whether and how to find the libfdt library') +option('riscv_custom', type: 'feature', value: 'auto', + description: 'RISC-V custom') --=20 2.32.0