From patchwork Wed Sep 14 11:52:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 605718 Delivered-To: patch@linaro.org Received: by 2002:ab3:1c02:0:b0:1e7:4ce8:c350 with SMTP id u2csp714751lth; Wed, 14 Sep 2022 05:49:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR5kDSy/7u/o8BDXxbCX/LfT6MA0Vv00/srNYuIjDCWG5CpOr9QDW5pf4kwXxk9yFyRI9Bxq X-Received: by 2002:a05:6214:e62:b0:4ac:aaf6:3944 with SMTP id jz2-20020a0562140e6200b004acaaf63944mr15249892qvb.9.1663159796872; Wed, 14 Sep 2022 05:49:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663159796; cv=none; d=google.com; s=arc-20160816; b=lxP7Bh2G1F+LhKJ/fDRD7XOR3wt8MbuQ355FjbsTZOU3k/xwxg1jIbbxpsCfh1ZfM9 Fn7WFcgai2L5QLaMGYrmx6Uf8G1Ao268HcTkuduL3sLL3SHxeUUmFqDXuCMSx1CHdHrr R2drAb8I/FUFxa/Hj9Kj7UQpVpM9BP9EdSiaxMyt7vEjJGxyRlVjx1A9lyI7JbOfYTir 2ul+57pf1965nefiydS/S9LxXp1f1Y9e4yK/z4JRNp78QrnjYsSvM0/KhSMoiY91D4wX ekbVt0l1EN0LsXp6KuykR/X6rSQWNHst+RvAf4nw/MwA3Wl520Q3c6Exr3WpzWOpDGhC QDHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PzQ7HFDyU7lDe3IC5gWQsNSOhu4RpaCEIUnJKd3sdMI=; b=eZKJDsHsTK8u5WvuIngWlWMLlzZ3Ovu21stsSOXS9cBhYm+m3AsbpFhoDEUk/pspUa dgWXMidt+F0JNahSnCk95Q6aheYFq84EuLc1EzMfj8avyRfoPdKzD5Gxe/H50e33GCsd i8mDltI3jNIup0+5z582Gia+xlFscf7KFB034Es047zu4ps//JFJMea0S2DFPQcSi/jQ 7J7l4FacJbBTwALIQG7Yx6sErDxm2KaASzEFU29nAVt2TN9VpVCMfzkXeM/S9QQ0mHVG XjDBAjUJWVxvw6mQFwHUG7c8/1hfoisJa4XLz6Lo2Rkk0IEtS6Ce5roYoQHG9XqZsBXq 2mxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IfD5jf+t; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q14-20020a05622a04ce00b0035ba7175553si1344804qtx.645.2022.09.14.05.49.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Sep 2022 05:49:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IfD5jf+t; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:35362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYRq0-0004Wv-Be for patch@linaro.org; Wed, 14 Sep 2022 08:49:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYQwW-0000GH-9y for qemu-devel@nongnu.org; Wed, 14 Sep 2022 07:52:36 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:53059) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYQwM-0008Vr-CY for qemu-devel@nongnu.org; Wed, 14 Sep 2022 07:52:36 -0400 Received: by mail-wm1-x32e.google.com with SMTP id l8so6026766wmi.2 for ; Wed, 14 Sep 2022 04:52:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=PzQ7HFDyU7lDe3IC5gWQsNSOhu4RpaCEIUnJKd3sdMI=; b=IfD5jf+tzB6R6bqd2UFwtYFZjFYQkp0AmOT381SsBqkBw/tSflxVW9HP8djT+mXxVc edrklaiMuXjlTjsxac8I1rht8TuX9dUIdQrg81/GB10lcq9u7H/OA9vy+z3lPbgNouyF 3+K1FVTrCBlAgbfhQueWonrhq3rVkThnv3APakNL+vjUXKMR7wGVWGhdBerF0li8lBNm 5shUos06flX6R1RD+dIfAs/w1muQtN0e8++gDhsfjsdH/PYJixP4+2ZGtqvWxEtgT3QO 8Zg/Mb3GkNRfDdiG6gt4kfBdU9oo9NQ0XdprJKyCZqRuBeozG0rjr0y/o23O3j/PcAkA XBIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=PzQ7HFDyU7lDe3IC5gWQsNSOhu4RpaCEIUnJKd3sdMI=; b=7V6hz+0BGwHVCokhwkU98bSo5TUx8oQHlqMp85ZiMgjGtTfRYHeTEVto1p5EGpLgl1 fdGHB/2wQwxKKu7NA71R/EAqO6OEt+ZgXjnjfiRAhaSePMZwOkHVPUPEQ3y6CE0upL6O u/ncrMr97a/1Gx60xNzIc7VMpnSXfJ50+GDy0NH24EmJolWXdRun93baKIAzsNiQa5sa ubDZ1XzmAaNe00xX9hb3xragncGgLlfpKRoMQQgvRR5EqF3+h5dHMyPF/BMDTni8/XhD oh6AuZaKJ0T0gVU2l1B45tJLAO+eG/K0DQ0L2jw1h9X0EyT2+ONfdHD3Or58nVpDZMiZ tW4Q== X-Gm-Message-State: ACgBeo3Db+vwYcbBwwKiWG60CAQoomkG/qD3c0J03MW0hYbPHYSrzmxE Ss0ssoOUSVQ2YoBqwugC4kPurzO780/6trgQ X-Received: by 2002:a1c:c91a:0:b0:3a6:38bf:2c36 with SMTP id f26-20020a1cc91a000000b003a638bf2c36mr2858336wmb.38.1663156345005; Wed, 14 Sep 2022 04:52:25 -0700 (PDT) Received: from stoup.. ([89.101.193.70]) by smtp.gmail.com with ESMTPSA id t9-20020a5d6909000000b0022a3a887ceasm13712970wru.49.2022.09.14.04.52.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Sep 2022 04:52:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PULL 06/20] target/arm: Implement ID_DFR1 Date: Wed, 14 Sep 2022 12:52:03 +0100 Message-Id: <20220914115217.117532-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220914115217.117532-1-richard.henderson@linaro.org> References: <20220914115217.117532-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell In Armv8.6, a new AArch32 ID register ID_DFR1 is defined; implement it. We don't have any CPUs with features that they need to advertise here yet, but plumbing in the ID register gives it the right name when debugging and will help in future when we do add a CPU that has non-zero ID_DFR1 fields. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-Id: <20220819110052.2942289-5-peter.maydell@linaro.org> Signed-off-by: Richard Henderson --- target/arm/cpu.h | 1 + target/arm/helper.c | 4 ++-- target/arm/kvm64.c | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index fcc5927587..fa24ce9f96 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -983,6 +983,7 @@ struct ArchCPU { uint32_t mvfr1; uint32_t mvfr2; uint32_t id_dfr0; + uint32_t id_dfr1; uint32_t dbgdidr; uint32_t dbgdevid; uint32_t dbgdevid1; diff --git a/target/arm/helper.c b/target/arm/helper.c index 0737851925..7ff03f1a4b 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -7581,11 +7581,11 @@ void register_cp_regs_for_features(ARMCPU *cpu) .access = PL1_R, .type = ARM_CP_CONST, .accessfn = access_aa64_tid3, .resetvalue = cpu->isar.id_pfr2 }, - { .name = "RES_0_C0_C3_5", .state = ARM_CP_STATE_BOTH, + { .name = "ID_DFR1", .state = ARM_CP_STATE_BOTH, .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 5, .access = PL1_R, .type = ARM_CP_CONST, .accessfn = access_aa64_tid3, - .resetvalue = 0 }, + .resetvalue = cpu->isar.id_dfr1 }, { .name = "ID_MMFR5", .state = ARM_CP_STATE_BOTH, .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 6, .access = PL1_R, .type = ARM_CP_CONST, diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c index 2d737c443e..1197253d12 100644 --- a/target/arm/kvm64.c +++ b/target/arm/kvm64.c @@ -643,6 +643,8 @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) ARM64_SYS_REG(3, 0, 0, 3, 2)); err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_pfr2, ARM64_SYS_REG(3, 0, 0, 3, 4)); + err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_dfr1, + ARM64_SYS_REG(3, 0, 0, 3, 5)); err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_mmfr5, ARM64_SYS_REG(3, 0, 0, 3, 6));