Received: from eggs.gnu.org ([2001:4830:134:3::10]:37682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOZkG-0003oF-FZ for qemu-devel@nongnu.org; Wed, 27 Jan 2016 18:43:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOZkF-0006Sn-K7 for qemu-devel@nongnu.org; Wed, 27 Jan 2016 18:43:28 -0500 From: "Edgar E. Iglesias" Date: Thu, 28 Jan 2016 00:42:51 +0100 Message-Id: <1453938171-13665-2-git-send-email-edgar.iglesias@gmail.com> In-Reply-To: <1453938171-13665-1-git-send-email-edgar.iglesias@gmail.com> References: <1453938171-13665-1-git-send-email-edgar.iglesias@gmail.com> Subject: [Qemu-devel] [RFC 1/1] hw/arm: Setup EL1 and EL2 in AArch64 mode for 64bit Linux boots List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, peter.maydell@linaro.org Cc: edgar.iglesias@xilinx.com, qemu-arm@nongnu.org From: "Edgar E. Iglesias" When booting Linux on AArch64 enabled cores, setup EL1 and EL2 to use AArch64. Signed-off-by: Edgar E. Iglesias --- hw/arm/boot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 7742dd3..d05a998 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -488,7 +488,9 @@ static void do_cpu_reset(void *opaque) * adjust. */ if (env->aarch64) { + env->cp15.scr_el3 |= SCR_RW; if (arm_feature(env, ARM_FEATURE_EL2)) { + env->cp15.hcr_el2 |= HCR_RW; env->pstate = PSTATE_MODE_EL2h; } else { env->pstate = PSTATE_MODE_EL1h; -- 1.9.1