From patchwork Sat Feb 15 16:07:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 24687 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CD53B203BE for ; Sat, 15 Feb 2014 16:07:46 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id oy12sf30029071veb.10 for ; Sat, 15 Feb 2014 08:07:45 -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=Hdkd7U7VjBTiH5M/U0arq4LByI99lhOGCvGtvn30XKM=; b=itF9ithnRhMbRQxB/PdHQygjYOsP7/pM7GJuev5DEb1jlR2sJ24ojF0JsT9ak0tvXj uc2X4jEcTtCoRXu5zxpi55NUea+2a+vJ0nAeSWxjLUf5kgBppU7E+Kp+/V+GowjBH5Jq PjP97jQ7guQ4IB9EgCMDUO4a/brBGpJ8neP6ASQpP+zPkPMrxZ05Ik4hBNoExgBas47m Lxq/vPg1D9P647KYH1rSwjdkwAOb/0BbM6u3y5fc14KDAMpGbww6p187DnB/PWeYJXR9 /ZadojYQWMHG64g2IX4pwKdpAqkgRdh9MRp+WVfB5ersEiw0WSvMYdQtJaaytwMSZhrC 3vTQ== X-Gm-Message-State: ALoCoQl2AX3pEyJr612A65wN82/mcJs8mK2xKDcHHiVaowQ55Y9qvHKe5n3KDsOVhD1NIBg4/heH X-Received: by 10.224.20.133 with SMTP id f5mr6019331qab.8.1392480465784; Sat, 15 Feb 2014 08:07:45 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.33 with SMTP id 30ls362679qgs.22.gmail; Sat, 15 Feb 2014 08:07:45 -0800 (PST) X-Received: by 10.220.109.1 with SMTP id h1mr5916511vcp.20.1392480465685; Sat, 15 Feb 2014 08:07:45 -0800 (PST) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id i8si3006069vcj.71.2014.02.15.08.07.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 15 Feb 2014 08:07:45 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.174 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.174; Received: by mail-vc0-f174.google.com with SMTP id im17so10364335vcb.33 for ; Sat, 15 Feb 2014 08:07:45 -0800 (PST) X-Received: by 10.52.227.193 with SMTP id sc1mr8167752vdc.1.1392480465374; Sat, 15 Feb 2014 08:07:45 -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 u4csp25562vcz; Sat, 15 Feb 2014 08:07:44 -0800 (PST) X-Received: by 10.15.32.72 with SMTP id z48mr15015eeu.106.1392480460766; Sat, 15 Feb 2014 08:07:40 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id b7si19248809eez.134.2014.02.15.08.07.38 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 15 Feb 2014 08:07:40 -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 1WEhm1-0006gI-Sr; Sat, 15 Feb 2014 16:07:25 +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 v3 23/31] target-arm: Implement AArch64 view of CPACR Date: Sat, 15 Feb 2014 16:07:16 +0000 Message-Id: <1392480444-25565-24-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1392480444-25565-1-git-send-email-peter.maydell@linaro.org> References: <1392480444-25565-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.174 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 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 --- 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 571b033..1f6f65d 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 c50ca5a..d35cc73 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