From patchwork Mon Aug 4 13:53:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 34839 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 99B2221F5F for ; Mon, 4 Aug 2014 13:55:14 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id wn1sf38165226obc.10 for ; Mon, 04 Aug 2014 06:55:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version: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 :content-type:content-transfer-encoding; bh=X799uKRZ8F2FqTRGe+Tw95C/USIojkbUnAf7QTnmG28=; b=RXlTACCDhlPnH0aVdYI9+LxezTc16dmC3hNiyOGP9f+3eiXO8pCa4udOjxrWxOpCVe k83pF0M/Y/0MCY+Awty0Kjw3ihAng1CUhFOVOizlsqUiY+cVjFpGzPW3CzdNgQmoyEEN NellkTSvNbdD1d87ulv/Q32zpljo5/CsNv05rGDJM/Or+dNaaxWGHyh1KqlOtG+EzOpM st3xpmNOER/VFtCW6ejmH3/HZvBNw+PNjt5uWOjYX2vNYNmGHp9C4MvGZo7SGwGwlVMP Oyi9nC4V3c1xY62Mep+pyuDCxuu0Op6bSxGwyJwql9FF35FA0IdKflfP3pbJrQZB5UH8 gUWg== X-Gm-Message-State: ALoCoQkuT4zNzvDWnSW7LXO/Zyw6EypqC0Q777zwiTE6dlf69Gg80oCjCNZyukbJ+2MibKeu+JNU X-Received: by 10.182.130.169 with SMTP id of9mr9481076obb.27.1407160513956; Mon, 04 Aug 2014 06:55:13 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.46.52 with SMTP id j49ls700062qga.68.gmail; Mon, 04 Aug 2014 06:55:13 -0700 (PDT) X-Received: by 10.220.105.201 with SMTP id u9mr23571093vco.11.1407160513831; Mon, 04 Aug 2014 06:55:13 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id ol3si11968221vcb.30.2014.08.04.06.55.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Aug 2014 06:55:13 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id hq11so11090404vcb.30 for ; Mon, 04 Aug 2014 06:55:13 -0700 (PDT) X-Received: by 10.52.244.138 with SMTP id xg10mr19853850vdc.40.1407160513756; Mon, 04 Aug 2014 06:55:13 -0700 (PDT) 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.221.37.5 with SMTP id tc5csp306287vcb; Mon, 4 Aug 2014 06:55:13 -0700 (PDT) X-Received: by 10.224.11.212 with SMTP id u20mr19042801qau.82.1407160513268; Mon, 04 Aug 2014 06:55:13 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id u9si28664913qai.52.2014.08.04.06.55.13 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 04 Aug 2014 06:55:13 -0700 (PDT) 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]:52450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEIjI-0006QQ-Ju for patch@linaro.org; Mon, 04 Aug 2014 09:55:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEIiB-00055H-WD for qemu-devel@nongnu.org; Mon, 04 Aug 2014 09:54:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEIiA-0007eu-MK for qemu-devel@nongnu.org; Mon, 04 Aug 2014 09:54:03 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:48908) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEIiA-0006mN-CZ for qemu-devel@nongnu.org; Mon, 04 Aug 2014 09:54:02 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1XEIhd-0001B6-9C for qemu-devel@nongnu.org; Mon, 04 Aug 2014 14:53:29 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 4 Aug 2014 14:53:25 +0100 Message-Id: <1407160408-4467-10-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1407160408-4467-1-git-send-email-peter.maydell@linaro.org> References: <1407160408-4467-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 09/12] target-arm: Add FAR_EL2 and 3 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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) 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 From: "Edgar E. Iglesias" Reviewed-by: Greg Bellows Signed-off-by: Edgar E. Iglesias Reviewed-by: Alex Bennée Message-id: 1402994746-8328-7-git-send-email-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell --- target-arm/cpu.h | 2 +- target-arm/helper.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 3d9cf57..79205ba 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -187,7 +187,7 @@ typedef struct CPUARMState { uint32_t ifsr_el2; /* Fault status registers. */ uint64_t esr_el[4]; uint32_t c6_region[8]; /* MPU base/size registers. */ - uint64_t far_el[2]; /* Fault address registers. */ + uint64_t far_el[4]; /* Fault address registers. */ uint64_t par_el1; /* Translation result. */ uint32_t c9_insn; /* Cache lockdown registers. */ uint32_t c9_data; diff --git a/target-arm/helper.c b/target-arm/helper.c index f4845b0..a7f82f3 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -2131,6 +2131,9 @@ static const ARMCPRegInfo v8_el2_cp_reginfo[] = { .type = ARM_CP_NO_MIGRATE, .opc0 = 3, .opc1 = 4, .crn = 5, .crm = 2, .opc2 = 0, .access = PL2_RW, .fieldoffset = offsetof(CPUARMState, cp15.esr_el[2]) }, + { .name = "FAR_EL2", .state = ARM_CP_STATE_AA64, + .opc0 = 3, .opc1 = 4, .crn = 6, .crm = 0, .opc2 = 0, + .access = PL2_RW, .fieldoffset = offsetof(CPUARMState, cp15.far_el[2]) }, { .name = "SPSR_EL2", .state = ARM_CP_STATE_AA64, .type = ARM_CP_NO_MIGRATE, .opc0 = 3, .opc1 = 4, .crn = 4, .crm = 0, .opc2 = 0, @@ -2153,6 +2156,9 @@ static const ARMCPRegInfo v8_el3_cp_reginfo[] = { .type = ARM_CP_NO_MIGRATE, .opc0 = 3, .opc1 = 6, .crn = 5, .crm = 2, .opc2 = 0, .access = PL3_RW, .fieldoffset = offsetof(CPUARMState, cp15.esr_el[3]) }, + { .name = "FAR_EL3", .state = ARM_CP_STATE_AA64, + .opc0 = 3, .opc1 = 6, .crn = 6, .crm = 0, .opc2 = 0, + .access = PL3_RW, .fieldoffset = offsetof(CPUARMState, cp15.far_el[3]) }, { .name = "SPSR_EL3", .state = ARM_CP_STATE_AA64, .type = ARM_CP_NO_MIGRATE, .opc0 = 3, .opc1 = 6, .crn = 4, .crm = 0, .opc2 = 0,