From patchwork Tue Jun 17 08:45:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 360387 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C31E8140087 for ; Tue, 17 Jun 2014 18:52:39 +1000 (EST) Received: from localhost ([::1]:48186 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwp89-0001IJ-H7 for incoming@patchwork.ozlabs.org; Tue, 17 Jun 2014 04:52:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwp5a-0006Yi-Eg for qemu-devel@nongnu.org; Tue, 17 Jun 2014 04:50:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wwp5V-0004Fm-MV for qemu-devel@nongnu.org; Tue, 17 Jun 2014 04:49:58 -0400 Received: from mail-pd0-x233.google.com ([2607:f8b0:400e:c02::233]:51509) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwp5V-0004FO-GB for qemu-devel@nongnu.org; Tue, 17 Jun 2014 04:49:53 -0400 Received: by mail-pd0-f179.google.com with SMTP id w10so2750500pde.10 for ; Tue, 17 Jun 2014 01:49:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Pf9XmaVBvPgU9aK5ABfSGUQRdAOfL5NRD0u+RBSbDts=; b=a4VGpcMNOrNfLqIfa8mzjGRB4v0vLvbkSrdlfDx1ZfNLtFTvrPEiujaTyW5Wwlltc5 pRZZsQmUp0A4hNZk5vdDCA4daIHchg/8zzsXO1LiLdYul66y6FHIRRuB5sOmDGIozwQI jyIOEHSmclPX85srJTsz8xYC7bA5aXcGmuXR+8X9DRqLbX81sPfkR0Sdfvk+gOALo88P eVOAwRAfQ/JqlatndDP432TLQ6UcnpngpEztz7XX9ygRgeUfoLp8kExonfy7sdXNvNMq nL/hhFGjroAsdQ3FQVbAz9l/uzEglt8tSJ3KvWzFhxm155dFZKlZQpjjS/EeN/25mx14 ia8g== X-Received: by 10.66.189.169 with SMTP id gj9mr30369825pac.149.1402994992678; Tue, 17 Jun 2014 01:49:52 -0700 (PDT) Received: from localhost ([203.126.243.116]) by mx.google.com with ESMTPSA id zx1sm22820427pbc.60.2014.06.17.01.49.45 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 17 Jun 2014 01:49:51 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Tue, 17 Jun 2014 18:45:35 +1000 Message-Id: <1402994746-8328-6-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1402994746-8328-1-git-send-email-edgar.iglesias@gmail.com> References: <1402994746-8328-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c02::233 Cc: rob.herring@linaro.org, peter.crosthwaite@xilinx.com, aggelerf@ethz.ch, agraf@suse.de, blauwirbel@gmail.com, john.williams@xilinx.com, greg.bellows@linaro.org, pbonzini@redhat.com, alex.bennee@linaro.org, christoffer.dall@linaro.org, rth@twiddle.net Subject: [Qemu-devel] [PATCH v3 05/16] target-arm: Add ESR_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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: "Edgar E. Iglesias" Reviewed-by: Greg Bellows Signed-off-by: Edgar E. Iglesias --- target-arm/cpu.h | 2 +- target-arm/helper.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 6417507..d1d8c85 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -185,7 +185,7 @@ typedef struct CPUARMState { uint32_t pmsav5_data_ap; /* PMSAv5 MPU data access permissions */ uint32_t pmsav5_insn_ap; /* PMSAv5 MPU insn access permissions */ uint32_t ifsr_el2; /* Fault status registers. */ - uint64_t esr_el[2]; + uint64_t esr_el[4]; uint32_t c6_region[8]; /* MPU base/size registers. */ uint64_t far_el[2]; /* Fault address registers. */ uint64_t par_el1; /* Translation result. */ diff --git a/target-arm/helper.c b/target-arm/helper.c index 0b1f2c9..94a3b41 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -2116,6 +2116,10 @@ static const ARMCPRegInfo v8_el2_cp_reginfo[] = { .opc0 = 3, .opc1 = 4, .crn = 4, .crm = 0, .opc2 = 1, .access = PL2_RW, .fieldoffset = offsetof(CPUARMState, elr_el[2]) }, + { .name = "ESR_EL2", .state = ARM_CP_STATE_AA64, + .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 = "SPSR_EL2", .state = ARM_CP_STATE_AA64, .type = ARM_CP_NO_MIGRATE, .opc0 = 3, .opc1 = 4, .crn = 4, .crm = 0, .opc2 = 0, @@ -2134,6 +2138,10 @@ static const ARMCPRegInfo v8_el3_cp_reginfo[] = { .opc0 = 3, .opc1 = 6, .crn = 4, .crm = 0, .opc2 = 1, .access = PL3_RW, .fieldoffset = offsetof(CPUARMState, elr_el[3]) }, + { .name = "ESR_EL3", .state = ARM_CP_STATE_AA64, + .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 = "SPSR_EL3", .state = ARM_CP_STATE_AA64, .type = ARM_CP_NO_MIGRATE, .opc0 = 3, .opc1 = 6, .crn = 4, .crm = 0, .opc2 = 0,