From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmJvy-00005J-8h for qemu-devel@nongnu.org; Mon, 19 May 2014 05:32:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WmJvr-0008Gp-SF for qemu-devel@nongnu.org; Mon, 19 May 2014 05:32:38 -0400 Received: from mail-wg0-x22c.google.com ([2a00:1450:400c:c00::22c]:49080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmJvr-0008Gj-Ej for qemu-devel@nongnu.org; Mon, 19 May 2014 05:32:31 -0400 Received: by mail-wg0-f44.google.com with SMTP id a1so7623989wgh.27 for ; Mon, 19 May 2014 02:32:30 -0700 (PDT) From: "Edgar E. Iglesias" Date: Mon, 19 May 2014 19:22:54 +1000 Message-Id: <1400491383-6725-14-git-send-email-edgar.iglesias@gmail.com> In-Reply-To: <1400491383-6725-1-git-send-email-edgar.iglesias@gmail.com> References: <1400491383-6725-1-git-send-email-edgar.iglesias@gmail.com> Subject: [Qemu-devel] [PATCH v3 13/22] target-arm: Register EL3 versions of ELR and SPSR List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, peter.maydell@linaro.org Cc: rob.herring@linaro.org, peter.crosthwaite@xilinx.com, aggelerf@ethz.ch, agraf@suse.de, john.williams@xilinx.com, alex.bennee@linaro.org, christoffer.dall@linaro.org, rth@twiddle.net From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/target-arm/helper.c b/target-arm/helper.c index 81de010..cb7c964a 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -2090,6 +2090,19 @@ static const ARMCPRegInfo v8_el2_cp_reginfo[] = { REGINFO_SENTINEL }; +static const ARMCPRegInfo v8_el3_cp_reginfo[] = { + { .name = "ELR_EL3", .state = ARM_CP_STATE_AA64, + .type = ARM_CP_NO_MIGRATE, + .opc0 = 3, .opc1 = 6, .crn = 4, .crm = 0, .opc2 = 1, + .access = PL3_RW, + .fieldoffset = offsetof(CPUARMState, elr_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, + .access = PL3_RW, .fieldoffset = offsetof(CPUARMState, banked_spsr[7]) }, + REGINFO_SENTINEL +}; + static void sctlr_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) { @@ -2344,6 +2357,9 @@ void register_cp_regs_for_features(ARMCPU *cpu) if (arm_feature(env, ARM_FEATURE_EL2)) { define_arm_cp_regs(cpu, v8_el2_cp_reginfo); } + if (arm_feature(env, ARM_FEATURE_EL3)) { + define_arm_cp_regs(cpu, v8_el3_cp_reginfo); + } if (arm_feature(env, ARM_FEATURE_MPU)) { /* These are the MPU registers prior to PMSAv6. Any new * PMSA core later than the ARM946 will require that we -- 1.8.3.2