From patchwork Fri Jan 31 15:45:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 23978 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3D6BA202B2 for ; Fri, 31 Jan 2014 15:58:29 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id c14sf12061052vea.3 for ; Fri, 31 Jan 2014 07:58:28 -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=2uZba+32j+5dl9AxWyob8tQ3lY3eUo/k4YqiQs/AR7k=; b=apg/qs1hHiO4mqzNsYjSPfxRYpTG3788vVj9PJapFQxbHoCN3R89I3VTJm32f2ohHg WvmiE3/s0HU1Ls1+fEeu0AF5DpOIHb7v795EgHbN8KS0G2UBk2ZVA3Af0e3SSQeYqCLF csW2ywMGXbNb7xx1Kcf7W6OVBtvmnHyDlStEPnFoTZFsE6d4uPx1+nBDQ3AEV34kaLdH ROYyTKuXHTmz75Vt09WUYp8QOQEQQNEeft/vIWj3qXm10afa/Ii7OmC2pKYjXXLLaRp+ qXTZM9O2ODXi23+fVcbv4kmVRiIN+bDr7kUn2U1RYZnV+7BjzKvu24ed0CAJ6jgEoqXG W34g== X-Gm-Message-State: ALoCoQlln/aQC7gDsoQbpaHLfA+z8wFR/tpscoyw1o0WoneLiufZrUVLr9kGDg7L1GfTcBhReNk/ X-Received: by 10.58.218.40 with SMTP id pd8mr4595938vec.39.1391183908462; Fri, 31 Jan 2014 07:58:28 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.47.9 with SMTP id l9ls1015306qga.13.gmail; Fri, 31 Jan 2014 07:58:28 -0800 (PST) X-Received: by 10.52.246.133 with SMTP id xw5mr4912724vdc.32.1391183908371; Fri, 31 Jan 2014 07:58:28 -0800 (PST) Received: from mail-vb0-f51.google.com (mail-vb0-f51.google.com [209.85.212.51]) by mx.google.com with ESMTPS id vc3si3658734vdc.5.2014.01.31.07.58.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Jan 2014 07:58:28 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.51 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.51; Received: by mail-vb0-f51.google.com with SMTP id 11so3019024vbe.38 for ; Fri, 31 Jan 2014 07:58:28 -0800 (PST) X-Received: by 10.220.124.65 with SMTP id t1mr2051811vcr.26.1391183908293; Fri, 31 Jan 2014 07:58:28 -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 u4csp106484vcz; Fri, 31 Jan 2014 07:58:27 -0800 (PST) X-Received: by 10.180.12.146 with SMTP id y18mr14463140wib.37.1391183907416; Fri, 31 Jan 2014 07:58:27 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id rz17si5403382wjb.88.2014.01.31.07.58.25 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 31 Jan 2014 07:58:27 -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 1W9GHo-00081l-Ro; Fri, 31 Jan 2014 15:45:44 +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 27/35] target-arm: Implement AArch64 SCTLR_EL1 Date: Fri, 31 Jan 2014 15:45:35 +0000 Message-Id: <1391183143-30724-28-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.212.51 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 system control register SCTLR_EL1. 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 a08c02b..1fb9675 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -169,7 +169,7 @@ typedef struct CPUARMState { struct { uint32_t c0_cpuid; uint64_t c0_cssel; /* Cache size selection. */ - uint32_t c1_sys; /* System control register. */ + uint64_t c1_sys; /* System control register. */ uint32_t c1_coproc; /* Coprocessor access register. */ uint32_t c1_xscaleauxcr; /* XScale auxiliary control register. */ uint32_t c1_scr; /* secure config register. */ diff --git a/target-arm/helper.c b/target-arm/helper.c index 32bface..7f466d6 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -1973,7 +1973,8 @@ void register_cp_regs_for_features(ARMCPU *cpu) /* Generic registers whose values depend on the implementation */ { ARMCPRegInfo sctlr = { - .name = "SCTLR", .cp = 15, .crn = 1, .crm = 0, .opc1 = 0, .opc2 = 0, + .name = "SCTLR", .state = ARM_CP_STATE_BOTH, + .opc0 = 3, .crn = 1, .crm = 0, .opc1 = 0, .opc2 = 0, .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.c1_sys), .writefn = sctlr_write, .resetvalue = cpu->reset_sctlr, .raw_writefn = raw_write,