From patchwork Mon Jun 9 15:04:17 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: 357518 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 59DA3140079 for ; Tue, 10 Jun 2014 01:09:41 +1000 (EST) Received: from localhost ([::1]:33722 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wu1Cd-0006BP-7P for incoming@patchwork.ozlabs.org; Mon, 09 Jun 2014 11:09:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wu1By-00058v-FH for qemu-devel@nongnu.org; Mon, 09 Jun 2014 11:09:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wu1Bo-0001R8-Bl for qemu-devel@nongnu.org; Mon, 09 Jun 2014 11:08:58 -0400 Received: from mail-qa0-x232.google.com ([2607:f8b0:400d:c00::232]:47930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wu1Bo-0001Qy-8G for qemu-devel@nongnu.org; Mon, 09 Jun 2014 11:08:48 -0400 Received: by mail-qa0-f50.google.com with SMTP id j15so8027831qaq.9 for ; Mon, 09 Jun 2014 08:08:48 -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=aZyV57zh5mtKPMM1ob8vKLAs4RCrYyzpMQWjQGwPTbk=; b=OJJF+wPLAhNjcfmlKm4UZDrKa3MUELPNXNJKZr3/BwQp2DHLUfLoy1lS3CoS4hViey 2SkTEeWk/RT7ogxxTqXHeXsL7yJFZIGCSd2GImkWgdCfeL1RZiNq6QzPjJCc521IBN3E ujfVxo4XryhK9wfLio30iC9nLWwcmzX0fpS/YNO37oLm67cG74PjZfplDvtCBBqSsPFA lYTxdRbIchohgbstsriIuuyGMxhuXXphzBtcs0o5jXBc/bxDI1IfHxDTKAXgpv8U3zfG PPpC4qYhSJdoVCIduTngtAHH6EBm7BTgeGPcxeWn5j09zOEjljip5+cUHQDdCyDw9Y+x j6zA== X-Received: by 10.224.121.72 with SMTP id g8mr33059437qar.79.1402326527917; Mon, 09 Jun 2014 08:08:47 -0700 (PDT) Received: from localhost ([203.126.243.116]) by mx.google.com with ESMTPSA id g77sm11826362qgd.43.2014.06.09.08.08.41 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 09 Jun 2014 08:08:47 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Tue, 10 Jun 2014 01:04:17 +1000 Message-Id: <1402326269-8573-6-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1402326269-8573-1-git-send-email-edgar.iglesias@gmail.com> References: <1402326269-8573-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:400d:c00::232 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 v2 05/17] 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" Signed-off-by: Edgar E. Iglesias Reviewed-by: Greg Bellows --- 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 dca4661..2ee3da2 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 2f29a85..6eb7815 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,