Message ID | 20200702162354.928528-6-alistair.francis@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=VsHw=AN=nongnu.org=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A88C613B6 for <patchwork-qemu-devel@patchwork.kernel.org>; Thu, 2 Jul 2020 16:37:43 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7FA3C207D4 for <patchwork-qemu-devel@patchwork.kernel.org>; Thu, 2 Jul 2020 16:37:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="fTRxUzz/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7FA3C207D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:37432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1jr2DW-0005qI-NC for patchwork-qemu-devel@patchwork.kernel.org; Thu, 02 Jul 2020 12:37:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <prvs=4451fe355=alistair.francis@wdc.com>) id 1jr29a-0003Z5-6t for qemu-devel@nongnu.org; Thu, 02 Jul 2020 12:33:38 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:44861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <prvs=4451fe355=alistair.francis@wdc.com>) id 1jr29Y-00008W-DA for qemu-devel@nongnu.org; Thu, 02 Jul 2020 12:33:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1593707616; x=1625243616; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pYE94VblWtm89FUXM5cLogTgc0Cw9nQ6R1YC89Ho/TA=; b=fTRxUzz/dxe0SLzia5GlVeMBRtDbie6aAP8EN+8gZYUi0H+4c+LhT0bF GjA4Jbq1ZEZK9xShLKeYS+mv/TxcAEBKIqeqbTsw+v25yUaRkvPkD7shN HJf/vFnthOXwUrMPl09nTEOLDU3LZs712I1NEQGyIEfMf2fZ9yHWOr9FO 7Ez2xjS3ZGOsfFcZEUSAXJbL612U2Bf0tojMC311s2MDG3Jwxou9A7fpZ XS32f5C8ahIXJBg5H0We4PQyQNjC026HnMDaIDmBr/aKvpm90XXoq+y5b OA1SUoN7TvS9SuSfmFx8M6MSC7upbCAbJE/+DuObz64ag71IjNtrub4jo A==; IronPort-SDR: EQZHyq0OLGd6CZKZT4pLiGZFOfGkNHEHqIxRxYnnLHEyqttl+YpUQukQa4Xn1dj0f19nItUzHn OeTHyvsKP7Qw3UCbnBCPMUBpCR2Pm6su4U7R790o9mg8x+NwlqTlO7RJAUiuqNc59JMj0JcB2u USjgqocJQrygR21psDTcGm0CefxXOIHEH7yY7r3Xz+nMNcFh7bDmKZJY16JXAKMXdl+AJOK0VK 77xI6IrlqREuaBKoqhr60KB+hO6SfyLeINe2NF7Eywiz1c3rWD1FZGCTlsrC9L5iwKyjZou/Gn Q2k= X-IronPort-AV: E=Sophos;i="5.75,304,1589212800"; d="scan'208";a="141498466" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 03 Jul 2020 00:33:20 +0800 IronPort-SDR: QOVOGA8GZ4a6G2JgqqEoIllW0B+wqVlc9bkHE1U8qOSrPEE+f+aST8y99oQMN27m2NTZhDpk2x lnrj0VHXXN1rtaQ6Xpf9cW8azIvR8wE/M= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2020 09:21:35 -0700 IronPort-SDR: YZ9gausMzTq5swpE1KymhMHiQlcHJnU7MehbyBtaOjoo3qWqxq1nuBu+hczJ6KeLlZ3LbbDG7D Q4CXJWzbyVjw== WDCIronportException: Internal Received: from 6hj08h2.ad.shared (HELO risc6-mainframe.hgst.com) ([10.86.58.118]) by uls-op-cesaip01.wdc.com with ESMTP; 02 Jul 2020 09:33:20 -0700 From: Alistair Francis <alistair.francis@wdc.com> To: peter.maydell@linaro.org, qemu-devel@nongnu.org Subject: [PULL v2 05/64] target/riscv: implementation-defined constant parameters Date: Thu, 2 Jul 2020 09:22:55 -0700 Message-Id: <20200702162354.928528-6-alistair.francis@wdc.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200702162354.928528-1-alistair.francis@wdc.com> References: <20200702162354.928528-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=216.71.154.42; envelope-from=prvs=4451fe355=alistair.francis@wdc.com; helo=esa4.hgst.iphmx.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/02 12:33:30 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: alistair23@gmail.com, Richard Henderson <richard.henderson@linaro.org>, Alistair Francis <alistair.francis@wdc.com>, LIU Zhiwei <zhiwei_liu@c-sky.com> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> |
Series |
[PULL,v2,01/64] riscv: plic: Honour source priorities
|
expand
|
diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 0018a79fa3..302e0859a0 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -78,6 +78,8 @@ enum { #define PRIV_VERSION_1_10_0 0x00011000 #define PRIV_VERSION_1_11_0 0x00011100 +#define VEXT_VERSION_0_07_1 0x00000701 + #define TRANSLATE_PMP_FAIL 2 #define TRANSLATE_FAIL 1 #define TRANSLATE_SUCCESS 0 @@ -113,6 +115,7 @@ struct CPURISCVState { target_ulong guest_phys_fault_addr; target_ulong priv_ver; + target_ulong vext_ver; target_ulong misa; target_ulong misa_mask; @@ -275,6 +278,8 @@ typedef struct RISCVCPU { char *priv_spec; char *user_spec; + uint16_t vlen; + uint16_t elen; bool mmu; bool pmp; } cfg; diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 391a0b9eec..d525cfb687 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -106,6 +106,11 @@ static void set_priv_version(CPURISCVState *env, int priv_ver) env->priv_ver = priv_ver; } +static void set_vext_version(CPURISCVState *env, int vext_ver) +{ + env->vext_ver = vext_ver; +} + static void set_feature(CPURISCVState *env, int feature) { env->features |= (1ULL << feature); @@ -334,6 +339,7 @@ static void riscv_cpu_realize(DeviceState *dev, Error **errp) CPURISCVState *env = &cpu->env; RISCVCPUClass *mcc = RISCV_CPU_GET_CLASS(dev); int priv_version = PRIV_VERSION_1_11_0; + int vext_version = VEXT_VERSION_0_07_1; target_ulong target_misa = 0; Error *local_err = NULL; @@ -357,6 +363,7 @@ static void riscv_cpu_realize(DeviceState *dev, Error **errp) } set_priv_version(env, priv_version); + set_vext_version(env, vext_version); if (cpu->cfg.mmu) { set_feature(env, RISCV_FEATURE_MMU);