From patchwork Mon Apr 5 14:31:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cupertino Miranda X-Patchwork-Id: 1462412 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=pu8pWesH; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=EdhxKA1W; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FDY665y6Nz9sSC for ; Tue, 6 Apr 2021 00:32:46 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4zPCyeYFm718RDXIHHil6ySCKYvdUuYb2xSRPRAhi7g=; b=pu8pWesHYC5hPGoRWg8jbJi66 SqVRip0nM5Mkdj8Me1vux8GcEnvLwt1WoeX9BkOg9V2Zpow8smBCcqL+2+gfymYVS2V5gmbJOSGMF XXTwdAPeB3wjNn7C6BYzqkKBzQDvteI6ey+4BMMGcEmbe5M0La2obm8KuYCA4fL2PlN6JRY9s2OV5 dmXrdjrD8VcTKo9gPQa+eR27sVO+BR5vAxiBsKGLNRuoxdxgMjwoNvK3I47kJuH1OR2RxWEru1dvf moGWDdw5i6vdoTpOpa5AYDiRN5uDkeifeSFQtl1wq/6VzVfG6ydpQC1wvEY/KdXGFOJmCIHclHR17 2FR36BCZA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lTQHT-00HPiC-Un; Mon, 05 Apr 2021 14:32:43 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lTQHK-00HPe4-TG for linux-snps-arc@lists.infradead.org; Mon, 05 Apr 2021 14:32:37 +0000 Received: by mail-wm1-x332.google.com with SMTP id y20-20020a1c4b140000b029011f294095d3so592338wma.3 for ; Mon, 05 Apr 2021 07:32:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WpMshF9WUsdtJUGU8Fhgh+vZmUfhSBfrnYZEgnqW7JI=; b=EdhxKA1Wj6QWKGJeY4DsStDw21VO1nBbX+MdXrg1iqcvW7nEs3djHL5UngqgGikjaE hy9veL/tdrVez9Ntx6ef+fS96ueY6AJp0ZJzOeEM7nt4DUhPRk/5f1KaBgOlWznoSAre hZ6on1zgwr/QpTq0t+N+57C28bAWRLOuhI+m2FOCDIY6VdJaY0/MdREM0VlevSDsIQMu oP0qcydOmP0pbky4nG1DE8zDwlAjCbgp3Lm611iMwfIw+emkHuwsKZZYf3k1GEOWvVlE m9JvTzWVPjAN5wrcZQKjU8FY0zltsvdH4Z9AAGdQGiZ8wsRBm+kZM9RSR6GQBtrwyoUM wVHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WpMshF9WUsdtJUGU8Fhgh+vZmUfhSBfrnYZEgnqW7JI=; b=QzpPQnzncaj65XsYu6SkCJ/gXrnl7xyC6e6FCOjjNDq2KoUCbqgbcrsjyqQV4H4sBd 8+v0HyOvB2c7aPyCWXEMh7hDCg2iDDue6hpUj9txFNGYdnoa7jsa4lFm74xAPOQnOan0 WBBtRhdxx9WN3S6Rg0sZk4NdSPUtXCSNCnE7ZtGvGLhRf0YMDWne5f/ABVaWbK81k2T+ 6Ht2+0SN2JZbXYutBOxo6ljSqzTeNL1L1oxWgZoQbW6phOljCa0fdqgNQG6TKP2XFlTN tdrgAo918RaLI088YpYS8dd6pd8sL6QmwA+SzhdavYvyWwDIr1GwpSmLoE7zLOSIwOvu AKrA== X-Gm-Message-State: AOAM533VMsI9ptsWwTIiEv7dLCMgxhfIfVkxe4DPaxoR3H4u0v8bdAmc DynQUKbg/kB3PQXwafAq9tM= X-Google-Smtp-Source: ABdhPJzA+Mk3Z0Rt2/rdSs+Fz9/m9gSqLvvU/Yu0/IaGPs85UCVNLSSgCWwUsoKMMQthsHSRWpJlTg== X-Received: by 2002:a7b:c5d2:: with SMTP id n18mr25229205wmk.53.1617633154541; Mon, 05 Apr 2021 07:32:34 -0700 (PDT) Received: from cmiranda-laptop.localdomain (bl15-158-218.dsl.telepac.pt. [188.80.158.218]) by smtp.gmail.com with ESMTPSA id k3sm8231552wrc.67.2021.04.05.07.32.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Apr 2021 07:32:34 -0700 (PDT) From: cupertinomiranda@gmail.com To: qemu-devel@nongnu.org Cc: linux-snps-arc@lists.infradead.org, claziss@synopsys.com, shahab@synopsys.com, cmiranda@synopsys.com Subject: [PATCH 23/27] arcv3: BCR and AUX register changes Date: Mon, 5 Apr 2021 15:31:34 +0100 Message-Id: <20210405143138.17016-24-cupertinomiranda@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210405143138.17016-1-cupertinomiranda@gmail.com> References: <20210405143138.17016-1-cupertinomiranda@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210405_153235_027315_18F78C41 X-CRM114-Status: UNSURE ( 9.13 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Cupertino Miranda --- target/arc/regs-detail.def | 40 ++++++++++++++++++++++++++++++++++++++ target/arc/regs-impl.c | 5 +++++ target/arc/regs.def | 20 +++++++++++++++++++ 3 files changed, 65 insertions(+) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:332 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [cupertinomiranda[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Cupertino Miranda --- target/arc/regs-detail.def | 40 ++++++++++++++++++++++++++++++++++++++ target/arc/regs-impl.c | 5 +++++ target/arc/regs.def | 20 +++++++++++++++++++ 3 files changed, 65 insertions(+) diff --git a/target/arc/regs-detail.def b/target/arc/regs-detail.def index 6f0cc94809..48b26d6cb0 100644 --- a/target/arc/regs-detail.def +++ b/target/arc/regs-detail.def @@ -39,8 +39,10 @@ DEF(0xa, ARC_OPCODE_ARCALL, NONE, status32) DEF(0xb, ARC_OPCODE_ARCV2, NONE, status32_p0) DEF(0xc, ARC_OPCODE_ARCv2EM, NONE, sec_extra) DEF(0xd, ARC_OPCODE_ARCV2, NONE, aux_user_sp) +DEF(0xd, ARC_OPCODE_V3_ALL, NONE, aux_user_sp) DEF(0xe, ARC_OPCODE_ARC700, NONE, clk_enable) DEF(0xe, ARC_OPCODE_ARCV2, NONE, aux_irq_ctrl) +DEF(0xe, ARC_OPCODE_V3_ALL, NONE, aux_irq_ctrl) DEF(0xf, ARC_OPCODE_ARC700, NONE, bpu_flush) DEF(0xf, ARC_OPCODE_ARCv2HS, NONE, debugi) DEF(0x10, ARC_OPCODE_ARCV1, NONE, ivic) @@ -75,6 +77,7 @@ DEF(0x23, ARC_OPCODE_ARCALL, NONE, limit0) DEF(0x24, ARC_OPCODE_ARCV1, NONE, pcport) DEF(0x25, ARC_OPCODE_ARC700, NONE, int_vector_base) DEF(0x25, ARC_OPCODE_ARCV2, NONE, int_vector_base) +DEF(0x25, ARC_OPCODE_V3_ALL, NONE, int_vector_base) DEF(0x26, ARC_OPCODE_ARC600, NONE, aux_vbfdw_mode) DEF(0x27, ARC_OPCODE_ARC600, NONE, aux_vbfdw_bm0) DEF(0x28, ARC_OPCODE_ARC600, NONE, aux_vbfdw_bm1) @@ -116,6 +119,7 @@ DEF(0x41, ARC_OPCODE_ARCV1, NONE, aux_macmode) DEF(0x42, ARC_OPCODE_ARC600, NONE, lsp_newval) DEF(0x43, ARC_OPCODE_ARCV1, NONE, aux_irq_lv12) DEF(0x43, ARC_OPCODE_ARCV2, NONE, aux_irq_act) +DEF(0x43, ARC_OPCODE_V3_ALL, NONE, aux_irq_act) DEF(0x44, ARC_OPCODE_ARCV1, NONE, aux_xmac0) DEF(0x45, ARC_OPCODE_ARCV1, NONE, aux_xmac1) DEF(0x46, ARC_OPCODE_ARCV1, NONE, aux_xmac2) @@ -126,7 +130,9 @@ DEF(0x4a, ARC_OPCODE_ARCALL, NONE, dc_ivdl) DEF(0x4b, ARC_OPCODE_ARCALL, NONE, dc_flsh) DEF(0x4c, ARC_OPCODE_ARCALL, NONE, dc_fldl) DEF(0x4d, ARC_OPCODE_ARCV2, NONE, dc_startr) +DEF(0x4d, ARC_OPCODE_V3_ALL, NONE, dc_startr) DEF(0x4e, ARC_OPCODE_ARCV2, NONE, dc_endr) +DEF(0x4e, ARC_OPCODE_V3_ALL, NONE, dc_endr) DEF(0x50, ARC_OPCODE_NONE, NONE, hexdata) DEF(0x51, ARC_OPCODE_NONE, NONE, hexctrl) DEF(0x52, ARC_OPCODE_NONE, NONE, led) @@ -191,13 +197,17 @@ DEF(0x100, ARC_OPCODE_ARCALL, NONE, count1) DEF(0x101, ARC_OPCODE_ARCALL, NONE, control1) DEF(0x102, ARC_OPCODE_ARCALL, NONE, limit1) DEF(0x103, ARC_OPCODE_ARCV2, NONE, aux_rtc_ctrl) +DEF(0x103, ARC_OPCODE_V3_ALL, NONE, aux_rtc_ctrl) DEF(0x104, ARC_OPCODE_ARCV2, NONE, aux_rtc_low) +DEF(0x104, ARC_OPCODE_V3_ALL, NONE, aux_rtc_low) DEF(0x105, ARC_OPCODE_ARCV2, NONE, aux_rtc_high) +DEF(0x105, ARC_OPCODE_V3_ALL, NONE, aux_rtc_high) DEF(0x200, ARC_OPCODE_ARCV1, NONE, aux_irq_lev) DEF(0x200, ARC_OPCODE_ARCV2, NONE, irq_priority_pending) DEF(0x201, ARC_OPCODE_ARCALL, NONE, aux_irq_hint) DEF(0x202, ARC_OPCODE_ARC600, NONE, aux_inter_core_interrupt) DEF(0x206, ARC_OPCODE_ARCV2, NONE, irq_priority) +DEF(0x206, ARC_OPCODE_V3_ALL, NONE, irq_priority) DEF(0x210, ARC_OPCODE_ARC700, NONE, aes_aux_0) DEF(0x211, ARC_OPCODE_ARC700, NONE, aes_aux_1) DEF(0x212, ARC_OPCODE_ARC700, NONE, aes_aux_2) @@ -273,10 +283,15 @@ DEF(0x408, ARC_OPCODE_ARC700, NONE, tlbcommand) DEF(0x409, ARC_OPCODE_ARC700, NONE, pid) DEF(0x409, ARC_OPCODE_ARCALL, NONE, mpuen) DEF(0x40a, ARC_OPCODE_ARCV2, NONE, icause) +DEF(0x40a, ARC_OPCODE_V3_ALL, NONE, icause) DEF(0x40b, ARC_OPCODE_ARCV2, NONE, irq_select) +DEF(0x40b, ARC_OPCODE_V3_ALL, NONE, irq_select) DEF(0x40c, ARC_OPCODE_ARCV2, NONE, irq_enable) +DEF(0x40c, ARC_OPCODE_V3_ALL, NONE, irq_enable) DEF(0x40d, ARC_OPCODE_ARCV2, NONE, irq_trigger) +DEF(0x40d, ARC_OPCODE_V3_ALL, NONE, irq_trigger) DEF(0x40f, ARC_OPCODE_ARCV2, NONE, irq_status) +DEF(0x40f, ARC_OPCODE_V3_ALL, NONE, irq_status) DEF(0x410, ARC_OPCODE_ARCALL, NONE, xpu) DEF(0x412, ARC_OPCODE_ARCALL, NONE, bta) DEF(0x413, ARC_OPCODE_ARC700, NONE, bta_l1) @@ -497,12 +512,17 @@ DEF(0xff, ARC_OPCODE_DEFAULT, NONE, unimp_bcr) /* Actual BCR implementations */ DEF(0x6d, ARC_OPCODE_ARCv2HS, NONE, mpu_build) +DEF(0x6d, ARC_OPCODE_V3_ALL, NONE, mpu_build) DEF(0x6f, ARC_OPCODE_ARCv2HS, NONE, mmu_build) DEF(0x75, ARC_OPCODE_ARCALL, NONE, timer_build) DEF(0xf3, ARC_OPCODE_ARCV2, NONE, irq_build) +DEF(0xf3, ARC_OPCODE_V3_ALL, NONE, irq_build) DEF(0x72, ARC_OPCODE_ARCV2, NONE, d_cache_build) +DEF(0x72, ARC_OPCODE_V3_ALL, NONE, d_cache_build) DEF(0x77, ARC_OPCODE_ARCV2, NONE, i_cache_build) +DEF(0x77, ARC_OPCODE_V3_ALL, NONE, i_cache_build) DEF(0x7b, ARC_OPCODE_ARCV2, NONE, mpy_build) +DEF(0x7b, ARC_OPCODE_V3_ALL, NONE, mpy_build) /* OLD BCR definitions */ /* @@ -538,3 +558,23 @@ DEF (0xfc, ARC_OPCODE_ARCALL, NONE, vlc_build) DEF (0xfd, ARC_OPCODE_ARCALL, NONE, simd_dma_build) DEF (0xfe, ARC_OPCODE_ARCALL, NONE, ifetch_queue_build) */ + +/* ARCV3 definitions. */ + +DEF (0x7, ARC_OPCODE_V3_ALL, NONE, memseg) +DEF (0x16, ARC_OPCODE_V3_ALL, NONE, ic_ivir) +DEF (0x17, ARC_OPCODE_V3_ALL, NONE, ic_endr) +DEF (0x460, ARC_OPCODE_V3_ALL, NONE, mmu_rtp0) +DEF (0x461, ARC_OPCODE_V3_ALL, NONE, mmu_rtp0hi) +DEF (0x462, ARC_OPCODE_V3_ALL, NONE, mmu_rtp1) +DEF (0x463, ARC_OPCODE_V3_ALL, NONE, mmu_rtp1hi) +DEF (0x464, ARC_OPCODE_V3_ALL, NONE, tlbindex) +DEF (0x465, ARC_OPCODE_V3_ALL, NONE, mmuv6_tlbcommand) +DEF (0x466, ARC_OPCODE_V3_ALL, NONE, mmu_tlb_data0) +DEF (0x467, ARC_OPCODE_V3_ALL, NONE, mmu_tlb_data1) +DEF (0x468, ARC_OPCODE_V3_ALL, NONE, mmu_ctrl) +DEF (0x469, ARC_OPCODE_V3_ALL, NONE, mmu_ttbcr) +DEF (0x46a, ARC_OPCODE_V3_ALL, NONE, mmu_mem_attr) +DEF (0x46b, ARC_OPCODE_V3_ALL, NONE, mmu_fault_status) +DEF (0xc1, ARC_OPCODE_V3_ALL, NONE, isa_config) +DEF (0x6f, ARC_OPCODE_V3_ALL, NONE, mmuv6_build) diff --git a/target/arc/regs-impl.c b/target/arc/regs-impl.c index 18a307fdc4..d7ae57e8cf 100644 --- a/target/arc/regs-impl.c +++ b/target/arc/regs-impl.c @@ -46,6 +46,11 @@ static target_ulong get_identity(CPUARCState *env) arcver = 0x54; break; + /* TODO: Add V3/ARC32. */ + case ARC_OPCODE_V3_ARC64: + arcver = 0x70; + break; + default: arcver = 0; diff --git a/target/arc/regs.def b/target/arc/regs.def index 5dc3764266..9c0e81d884 100644 --- a/target/arc/regs.def +++ b/target/arc/regs.def @@ -410,3 +410,23 @@ AUX_REG (xylsbasey, NULL, NULL) AUX_REG (aux_rtc_ctrl, aux_timer_get, aux_timer_set) AUX_REG (aux_rtc_low, aux_timer_get, aux_timer_set) AUX_REG (aux_rtc_high, aux_timer_get, aux_timer_set) + +/* ARCV3 specific registers. */ + +AUX_REG_GETTER(arc_mmuv6_aux_get) +AUX_REG_SETTER(arc_mmuv6_aux_set) + +AUX_REG (mmuv6_build, arc_mmuv6_aux_get, NULL) +AUX_REG (mmuv6_tlbcommand, arc_mmuv6_aux_get, arc_mmuv6_aux_set) + +AUX_REG (mmu_ctrl, arc_mmuv6_aux_get, arc_mmuv6_aux_set) +AUX_REG (mmu_, arc_mmuv6_aux_get, arc_mmuv6_aux_set) +AUX_REG (mmu_rtp0, arc_mmuv6_aux_get, arc_mmuv6_aux_set) +AUX_REG (mmu_rtp0hi, arc_mmuv6_aux_get, arc_mmuv6_aux_set) +AUX_REG (mmu_rtp1, arc_mmuv6_aux_get, arc_mmuv6_aux_set) +AUX_REG (mmu_rtp1hi, arc_mmuv6_aux_get, arc_mmuv6_aux_set) +AUX_REG (mmu_ttbcr, arc_mmuv6_aux_get, arc_mmuv6_aux_set) +AUX_REG (mmu_tlb_data0, arc_mmuv6_aux_get, arc_mmuv6_aux_set) +AUX_REG (mmu_tlb_data1, arc_mmuv6_aux_get, arc_mmuv6_aux_set) +AUX_REG (mmu_fault_status, arc_mmuv6_aux_get, arc_mmuv6_aux_set) +AUX_REG (mmu_mem_attr, arc_mmuv6_aux_get, arc_mmuv6_aux_set)