Received: from eggs.gnu.org ([2001:4830:134:3::10]:54890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkFOu-0007Db-PB for qemu-devel@nongnu.org; Tue, 13 May 2014 12:18:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkFOl-0005Y8-6W for qemu-devel@nongnu.org; Tue, 13 May 2014 12:17:56 -0400 Received: from edge20.ethz.ch ([82.130.99.26]:48950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkFOl-0005Wn-07 for qemu-devel@nongnu.org; Tue, 13 May 2014 12:17:47 -0400 From: Fabian Aggeler Date: Tue, 13 May 2014 18:16:00 +0200 Message-ID: <1399997768-32014-16-git-send-email-aggelerf@ethz.ch> In-Reply-To: <1399997768-32014-1-git-send-email-aggelerf@ethz.ch> References: <1399997768-32014-1-git-send-email-aggelerf@ethz.ch> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v2 15/23] target-arm: Restrict EL3 to Aarch32 state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: edgar.iglesias@gmail.com, Fabian Aggeler , peter.maydell@linaro.org This behaviour can be changed after all needed Aarch64 (_EL3) registers are implemented and respected at locations where behaviour is different when EL3 is in Aarch64 state. Signed-off-by: Fabian Aggeler --- target-arm/cpu.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 9e325ac..a4bb6bd 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -671,11 +671,15 @@ static inline bool arm_is_secure(CPUARMState *env) /* Return true if the specified exception level is running in AArch64 state. */ static inline bool arm_el_is_aa64(CPUARMState *env, int el) { - /* We don't currently support EL2 or EL3, and this isn't valid for EL0 + /* We don't currently support EL2, and this isn't valid for EL0 * (if we're in EL0, is_a64() is what you want, and if we're not in EL0 * then the state of EL0 isn't well defined.) */ - assert(el == 1); + assert(el == 1 || el == 3); + /* EL3 can only run in Aarch32 at the moment */ + if (el == 3) { + return false; + } /* AArch64-capable CPUs always run with EL1 in AArch64 mode. This * is a QEMU-imposed simplification which we may wish to change later. * If we in future support EL2 and/or EL3, then the state of lower @@ -755,7 +759,6 @@ static inline bool arm_el_is_aa64(CPUARMState *env, int el) } \ } while (0) - void arm_cpu_list(FILE *f, fprintf_function cpu_fprintf); /* Interface between CPU and Interrupt controller. */ -- 1.8.3.2