From patchwork Fri Jan 31 15:45:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 23983 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B0F1B202B2 for ; Fri, 31 Jan 2014 15:58:52 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id fa1sf11408440pad.0 for ; Fri, 31 Jan 2014 07:58:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=LuL/CpoBsw9spPgt1Y1J5fAYNRHR/w7W/2gj9hc0yoc=; b=I2W9v/2IGYhey7Swh/PTMyrzmSTZbFzfAy0wCQdcuZMEW99eUTbOygEpBLcdjD0NGv EKdzDMS022Qk1VQqI4Le7QfBK06R4LoTZkzn8Q9jg87vjwsWxStMyRI6/QsDJ3MD3ZNq eVzdc56QyaOdlcRYmCK3FFiKw6TYxYVUoKuy7QFVhIy+wV61Snn3YVm3XPrLCDG9laG7 fftSYrKMU09hqqe3Mz2tNM6F49qkGW8+oo2hXfg6ODgN/n8JvegdcgBL4VFGqc/QyFN+ +calLzMI+aJXl60fWiiYOwqbFl7hhmu3Yaby/R8TqNSZGTkw/7sBpFtZjD+uDPzFwF3N /gnA== X-Gm-Message-State: ALoCoQmqIWboP/68HFr8Y6H+TCVkUcpPbR5QCtMFCxasEbMh2ngF0u0lr2Jx3CY0iuIF7fIMlo65 X-Received: by 10.66.222.105 with SMTP id ql9mr8702963pac.9.1391183931990; Fri, 31 Jan 2014 07:58:51 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.24.215 with SMTP id 81ls996036qgr.14.gmail; Fri, 31 Jan 2014 07:58:51 -0800 (PST) X-Received: by 10.58.29.42 with SMTP id g10mr2655741veh.28.1391183931753; Fri, 31 Jan 2014 07:58:51 -0800 (PST) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id g4si3645747vch.148.2014.01.31.07.58.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Jan 2014 07:58:51 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id lh14so3090216vcb.38 for ; Fri, 31 Jan 2014 07:58:51 -0800 (PST) X-Received: by 10.58.85.133 with SMTP id h5mr16808945vez.4.1391183931653; Fri, 31 Jan 2014 07:58:51 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp106514vcz; Fri, 31 Jan 2014 07:58:51 -0800 (PST) X-Received: by 10.180.73.196 with SMTP id n4mr28052310wiv.24.1391183930387; Fri, 31 Jan 2014 07:58:50 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id fs14si5395758wjc.134.2014.01.31.07.58.48 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 31 Jan 2014 07:58:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1W9GHp-000821-2x; Fri, 31 Jan 2014 15:45:45 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Alexander Graf , Michael Matz , Claudio Fontana , Dirk Mueller , Laurent Desnogues , kvmarm@lists.cs.columbia.edu, Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Christoffer Dall , Will Newton , Peter Crosthwaite , Rob Herring Subject: [PATCH v2 31/35] target-arm: Implement AArch64 MPIDR Date: Fri, 31 Jan 2014 15:45:39 +0000 Message-Id: <1391183143-30724-32-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1391183143-30724-1-git-send-email-peter.maydell@linaro.org> References: <1391183143-30724-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Implement the AArch64 MPIDR system register. Signed-off-by: Peter Maydell Reviewed-by: Peter Crosthwaite --- target-arm/helper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index a23b40d..d943963 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -1435,7 +1435,8 @@ static uint64_t mpidr_read(CPUARMState *env, const ARMCPRegInfo *ri) { CPUState *cs = CPU(arm_env_get_cpu(env)); uint32_t mpidr = cs->cpu_index; - /* We don't support setting cluster ID ([8..11]) + /* We don't support setting cluster ID ([8..11]) (known as Aff1 + * in later ARM ARM versions), or any of the higher affinity level fields, * so these bits always RAZ. */ if (arm_feature(env, ARM_FEATURE_V7MP)) { @@ -1450,7 +1451,8 @@ static uint64_t mpidr_read(CPUARMState *env, const ARMCPRegInfo *ri) } static const ARMCPRegInfo mpidr_cp_reginfo[] = { - { .name = "MPIDR", .cp = 15, .crn = 0, .crm = 0, .opc1 = 0, .opc2 = 5, + { .name = "MPIDR", .state = ARM_CP_STATE_BOTH, + .opc0 = 3, .crn = 0, .crm = 0, .opc1 = 0, .opc2 = 5, .access = PL1_R, .readfn = mpidr_read, .type = ARM_CP_NO_MIGRATE }, REGINFO_SENTINEL };