From patchwork Sun May 25 01:08:37 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: 352198 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 66AA4140085 for ; Sun, 25 May 2014 11:16:13 +1000 (EST) Received: from localhost ([::1]:49887 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoN2p-0003Vi-BD for incoming@patchwork.ozlabs.org; Sat, 24 May 2014 21:16:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoN1p-0002EO-7N for qemu-devel@nongnu.org; Sat, 24 May 2014 21:15:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WoN1j-0005b7-7W for qemu-devel@nongnu.org; Sat, 24 May 2014 21:15:09 -0400 Received: from mail-yk0-x231.google.com ([2607:f8b0:4002:c07::231]:55236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoN1j-0005aS-3V for qemu-devel@nongnu.org; Sat, 24 May 2014 21:15:03 -0400 Received: by mail-yk0-f177.google.com with SMTP id 19so5118658ykq.22 for ; Sat, 24 May 2014 18:15:02 -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=djTLD1P1RrDI/WrImNjap3DgjVn8of6URkJh32OtMU0=; b=GYIJzh5qYbsOtLSeAhdYmobzKOpetPmcjzzHu69YMC4qz0yWGI5KSl+xTWRH3xrj5X cNwFqiwMsvTb0BBRQEptLmrWAL/8/479dHwpn1ASlMDEG3NMqhuS2NFoYKQFn+zsOgt/ BkIT4rIFkVTbcK1WvPbAQZreTnx9F4PBU9XodzoNanHDUh8Ylj7CSsLM1O3GxopvYzbK v8ErKwNSjsOBDtZ7+6UJjMOuYkL0fCrAdH5vUTQz2Hy+w963ii8ibPTuT0hAWJPUO/Sd n3s4lQ4RXCHAu5VdP8jmQ4HbndJTXBuQ1I9pQnRVG74uzox+FM8Yg54w9/sPYRe5L59g AaZw== X-Received: by 10.236.112.37 with SMTP id x25mr23099366yhg.26.1400980502663; Sat, 24 May 2014 18:15:02 -0700 (PDT) Received: from localhost ([203.126.243.116]) by mx.google.com with ESMTPSA id w47sm11425139yhk.47.2014.05.24.18.14.56 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 24 May 2014 18:15:01 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Sun, 25 May 2014 11:08:37 +1000 Message-Id: <1400980132-25949-9-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1400980132-25949-1-git-send-email-edgar.iglesias@gmail.com> References: <1400980132-25949-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:4002:c07::231 Cc: rob.herring@linaro.org, peter.crosthwaite@xilinx.com, aggelerf@ethz.ch, agraf@suse.de, john.williams@xilinx.com, greg.bellows@linaro.org, alex.bennee@linaro.org, christoffer.dall@linaro.org, rth@twiddle.net Subject: [Qemu-devel] [PATCH v5 08/23] target-arm: c12_vbar -> vbar_el[] 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" No functional change. Preparation for adding EL2 and 3 versions of this reg. Reviewed-by: Peter Crosthwaite Signed-off-by: Edgar E. Iglesias --- target-arm/cpu.h | 2 +- target-arm/helper-a64.c | 2 +- target-arm/helper.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index a3cf375..62d85ff 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -198,7 +198,7 @@ typedef struct CPUARMState { uint32_t c9_pmuserenr; /* perf monitor user enable */ uint32_t c9_pminten; /* perf monitor interrupt enables */ uint64_t mair_el1; - uint64_t c12_vbar; /* vector base address register */ + uint64_t vbar_el[2]; /* vector base address register */ uint32_t c13_fcse; /* FCSE PID. */ uint64_t contextidr_el1; /* Context ID. */ uint64_t tpidr_el0; /* User RW Thread register. */ diff --git a/target-arm/helper-a64.c b/target-arm/helper-a64.c index 13c5865..b8e6d56 100644 --- a/target-arm/helper-a64.c +++ b/target-arm/helper-a64.c @@ -443,7 +443,7 @@ void aarch64_cpu_do_interrupt(CPUState *cs) { ARMCPU *cpu = ARM_CPU(cs); CPUARMState *env = &cpu->env; - target_ulong addr = env->cp15.c12_vbar; + target_ulong addr = env->cp15.vbar_el[1]; int i; if (arm_current_pl(env) == 0) { diff --git a/target-arm/helper.c b/target-arm/helper.c index 107cd5f..bba7297 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -657,7 +657,7 @@ static void vbar_write(CPUARMState *env, const ARMCPRegInfo *ri, * contexts. (ARMv8 would permit us to do no masking at all, but ARMv7 * requires the bottom five bits to be RAZ/WI because they're UNK/SBZP.) */ - env->cp15.c12_vbar = value & ~0x1FULL; + env->cp15.vbar_el[1] = value & ~0x1FULL; } static uint64_t ccsidr_read(CPUARMState *env, const ARMCPRegInfo *ri) @@ -766,7 +766,7 @@ static const ARMCPRegInfo v7_cp_reginfo[] = { { .name = "VBAR", .state = ARM_CP_STATE_BOTH, .opc0 = 3, .crn = 12, .crm = 0, .opc1 = 0, .opc2 = 0, .access = PL1_RW, .writefn = vbar_write, - .fieldoffset = offsetof(CPUARMState, cp15.c12_vbar), + .fieldoffset = offsetof(CPUARMState, cp15.vbar_el[1]), .resetvalue = 0 }, { .name = "SCR", .cp = 15, .crn = 1, .crm = 1, .opc1 = 0, .opc2 = 0, .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.c1_scr), @@ -3379,7 +3379,7 @@ void arm_cpu_do_interrupt(CPUState *cs) * and is never in monitor mode this feature is always active. * Note: only bits 31:5 are valid. */ - addr += env->cp15.c12_vbar; + addr += env->cp15.vbar_el[1]; } switch_mode (env, new_mode); env->spsr = cpsr_read(env);