From patchwork Wed Feb 26 18:02:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 25424 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B373D20636 for ; Wed, 26 Feb 2014 19:41:07 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id m5sf5004828qaj.1 for ; Wed, 26 Feb 2014 11:41:07 -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:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=1SloCanHgUJ8GRMccj3E7c3dxJqTDJkdMF9inp09saA=; b=DUqJLFxLjUnbTtwOptcaydg9VcK9cPGG0+Xi+Xcf01fxDFHtXoHFryz0sTZz2sA8uS gcdq8c87nfqPiciBDUAszf6LsuyzrmipgMcEE1Q9gmuYPDmX8sxeqynNC7Ne3Lz3QBr/ 3pYo78K4fH6stHcR8E2Y74pYmtsEz0FAv6Nie1/L7Pk6SrvjQK/gm3DFmMepz0usNGRy VR13bi+JF+WtOXeqK1N+aHG64cQnbWFLe+eCl/q0mbBn/qxDTBbYDFmlltM6XKbELKdH RXVTAQ2ZQ9ji5GMTAy4eVqw6Dk84I7CTh3DzKFK7tI7AUt+hMAQ8C2U5mEgEC7UUh7Ml 3kDA== X-Gm-Message-State: ALoCoQlMfJNIZRHrXKHV6uJgWuQ//WILa252tihwr4XcQTjoFIaD4CwRdKnkjU5M9BcQziaNq/Go X-Received: by 10.52.29.16 with SMTP id f16mr3468011vdh.8.1393443667219; Wed, 26 Feb 2014 11:41:07 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.95.119 with SMTP id h110ls406717qge.54.gmail; Wed, 26 Feb 2014 11:41:07 -0800 (PST) X-Received: by 10.58.231.169 with SMTP id th9mr514895vec.49.1393443666964; Wed, 26 Feb 2014 11:41:06 -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 b7si491889vej.146.2014.02.26.11.41.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Feb 2014 11:41:06 -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 lh14so1432571vcb.24 for ; Wed, 26 Feb 2014 11:41:06 -0800 (PST) X-Received: by 10.58.48.133 with SMTP id l5mr1185518ven.36.1393443666897; Wed, 26 Feb 2014 11:41:06 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp50222vcz; Wed, 26 Feb 2014 11:41:06 -0800 (PST) X-Received: by 10.229.171.8 with SMTP id f8mr12915935qcz.13.1393443666331; Wed, 26 Feb 2014 11:41:06 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id v2si1173702qaf.38.2014.02.26.11.41.06 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 26 Feb 2014 11:41:06 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:42238 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIizD-0006Ww-BW for patch@linaro.org; Wed, 26 Feb 2014 13:13:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIiok-0000ng-Aa for qemu-devel@nongnu.org; Wed, 26 Feb 2014 13:02:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIioj-0007LT-A3 for qemu-devel@nongnu.org; Wed, 26 Feb 2014 13:02:50 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:46191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIioj-0007Eu-4B for qemu-devel@nongnu.org; Wed, 26 Feb 2014 13:02:49 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WIioX-0006Cq-CC; Wed, 26 Feb 2014 18:02:37 +0000 From: Peter Maydell To: Anthony Liguori Date: Wed, 26 Feb 2014 18:02:25 +0000 Message-Id: <1393437755-23586-36-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1393437755-23586-1-git-send-email-peter.maydell@linaro.org> References: <1393437755-23586-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: Blue Swirl , qemu-devel@nongnu.org, Aurelien Jarno Subject: [Qemu-devel] [PULL 35/45] target-arm: Implement AArch64 view of CPACR X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 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-bounces+patch=linaro.org@nongnu.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 Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Implement the AArch64 view of the CPACR. The AArch64 CPACR is defined to have a lot of RES0 bits, but since the architecture defines that RES0 bits may be implemented as reads-as-written and we know that a v8 CPU will have no registered coprocessors for cp0..cp13 we can safely implement the whole register this way. Signed-off-by: Peter Maydell Reviewed-by: Peter Crosthwaite --- target-arm/cpu.h | 2 +- target-arm/helper.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 67e935d..328c256 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -172,7 +172,7 @@ typedef struct CPUARMState { uint32_t c0_cpuid; uint64_t c0_cssel; /* Cache size selection. */ uint64_t c1_sys; /* System control register. */ - uint32_t c1_coproc; /* Coprocessor access register. */ + uint64_t c1_coproc; /* Coprocessor access register. */ uint32_t c1_xscaleauxcr; /* XScale auxiliary control register. */ uint32_t c1_scr; /* secure config register. */ uint64_t ttbr0_el1; /* MMU translation table base 0. */ diff --git a/target-arm/helper.c b/target-arm/helper.c index 01d1ef6..5621952 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -458,7 +458,8 @@ static const ARMCPRegInfo v6_cp_reginfo[] = { */ { .name = "WFAR", .cp = 15, .crn = 6, .crm = 0, .opc1 = 0, .opc2 = 1, .access = PL1_RW, .type = ARM_CP_CONST, .resetvalue = 0, }, - { .name = "CPACR", .cp = 15, .crn = 1, .crm = 0, .opc1 = 0, .opc2 = 2, + { .name = "CPACR", .state = ARM_CP_STATE_BOTH, .opc0 = 3, + .crn = 1, .crm = 0, .opc1 = 0, .opc2 = 2, .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.c1_coproc), .resetvalue = 0, .writefn = cpacr_write }, REGINFO_SENTINEL