From patchwork Fri Aug 19 11:00:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 598492 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp1295733mae; Fri, 19 Aug 2022 04:07:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR45hhOqYn/2ruzWn1dl8uZb8sHXD843Yr8NRyWhxd8A00UAoSwGrQsOsU2ArAxhco37ikHI X-Received: by 2002:ac8:58c6:0:b0:343:6ea4:c5d with SMTP id u6-20020ac858c6000000b003436ea40c5dmr5807829qta.371.1660907257853; Fri, 19 Aug 2022 04:07:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660907257; cv=none; d=google.com; s=arc-20160816; b=ZXNpT9EYBtwNjTZO19fHAhI1Pe1oWV7++PBt8/wpkQeJO0cYZLKo3x6YjPZLrWHNV8 uH0m4zNh5erLoAv0qL/ilGXJ/L6zaUi2+AfWJ4yH/51irFVd7J5thwqF6uVQBpDG2ezz cIlNY5S4EE1RaJULQtj/xAZLnUmw65RG4/FKWEoxZHdvWa/SJK6mQZVux965m4U9tH1i 7q1yjLFMoeYCWDPXFjT7IG6K2x9qOqW63PYYLpSQYERbfMAe5FL91vDmtiZdu/ilwG8C tMOqgnGJXLKcZhzMxObG/rthBVTxALrAyDWmVjZ14AB0SpPImFeO2Jix+1KwO++N68cR 73qA== 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:to:from :dkim-signature; bh=D9s+L5yVb1BMeJ0aqDKJfJ1DqXUabclfNuvxPJ/OZKY=; b=Jwvf2hrqsriJqzHdxk1+wChoXTKNDWLLflENsMH3uHXd4ydhSqWLe6p4tZVZUMlSkg nFsChKujODrIzqmAl0SU3PEzjMYAhdhpxZ/4Sv97bO6uzwi5pMU5rsf2wNZ95JOvghV5 vW9jDC0RbBtsk6Rndr/TPMoXks1PsZcVFUA3NggjgyXnxIy+aqkEJ5OyDVxSciyt1Yw7 XADvdxndGKL5PpBQQn6hofqygJcMBxSOyEoKv9BrevIyx9ENEgIxYpApZSSxonYumzY+ wIQtIyybHHtbylI14U5+0F+dSin36dposFEBgDgqhIphvf0emdrJvcQBm7V1Bz+YDIA6 RaFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="PDe/8g05"; 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 13-20020a05621420ed00b004771a6dae05si1735293qvk.526.2022.08.19.04.07.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Aug 2022 04:07:37 -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="PDe/8g05"; 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]:53018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOzqj-0002yB-9k for patch@linaro.org; Fri, 19 Aug 2022 07:07:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOzkP-0002DZ-79 for qemu-devel@nongnu.org; Fri, 19 Aug 2022 07:01:07 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:38830) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oOzkJ-0001Qn-2H for qemu-devel@nongnu.org; Fri, 19 Aug 2022 07:01:04 -0400 Received: by mail-wm1-x334.google.com with SMTP id n23-20020a7bc5d7000000b003a62f19b453so850216wmk.3 for ; Fri, 19 Aug 2022 04:00:58 -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:to:from:from:to:cc; bh=D9s+L5yVb1BMeJ0aqDKJfJ1DqXUabclfNuvxPJ/OZKY=; b=PDe/8g05I8TMQT04pgN/A3wmwfrLSaX2mCBCyikdzy/VLmdQXSQ692hqL8mZGFD+j/ URsQFRh4qykhw5MY1f/yLskh75MaVqzUBF2hmgCLpnlBW3LpZzBcYsCixeGqEFfhjGqM G48VNHxADoG35DeSwqgIZns1yBz/5Aw+KXP1A0MvElnjW9+3BpOD16+Q7thYPoZHN9gA dMm5ezNSytaArVkgRT7SEVg50DabZk49DMMbUBPHI1yo7bEoCNZPmm3KmtcBx5zaiHVd /y+dC4YDKKSLCRLcDuJNae0nXvBf02l/9K2DREbNIS33N6FkUKPZNwXEXYtnL45Z0sqV 62FA== 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:to:from:x-gm-message-state:from:to:cc; bh=D9s+L5yVb1BMeJ0aqDKJfJ1DqXUabclfNuvxPJ/OZKY=; b=rVWs/h4bqQIz3uR7PfjZAfHjVo9JJFyWSi57Xkrf2r8p/KBo7G2er/5YDcmxtXrLPH SxsGVtBlZnEy+o1LAKOPIsiN76LwS8hRAg6gbMkQWGoWg7aqzsKhzXHpP7maPIErLcRb tmcXuUtoRwjJ4yFAOJjvMpbKRlWA5tlY4OQUajP83SJOHalYlLhv9nRkBhn/1c50bd2g tDFeQy5RLzbvKkX+isi/sx256qvMaSfvtZt6TCCwh0MV9WktSiS7plOpU0+6JxDbTtha SD+TWAW+TE5dSDj0f0kfRsAadWghuPCqh4KKhjj2fsi267VmDLSFc4Tw5FgMRqlK6Bnm GLxQ== X-Gm-Message-State: ACgBeo2khyAsl+OhyFH9hBLB5g3jh42L/5Z+X9/PM9i5NSw56RncWNZs 23F4uNUmQ0i7/pUQ3fgEfUJczQ== X-Received: by 2002:a05:600c:490:b0:3a5:a6aa:bf2f with SMTP id d16-20020a05600c049000b003a5a6aabf2fmr7602020wme.17.1660906857521; Fri, 19 Aug 2022 04:00:57 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id p22-20020a7bcc96000000b003a52969e89csm8154985wma.4.2022.08.19.04.00.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Aug 2022 04:00:57 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 4/6] target/arm: Implement ID_DFR1 Date: Fri, 19 Aug 2022 12:00:50 +0100 Message-Id: <20220819110052.2942289-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220819110052.2942289-1-peter.maydell@linaro.org> References: <20220819110052.2942289-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x334.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" 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 --- 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 fcc5927587e..fa24ce9f96b 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 07378519259..7ff03f1a4ba 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 2d737c443eb..1197253d12f 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));