From 4a6bb821233e376e0ef9b2779243e968ce494dda Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Fri, 27 May 2016 15:02:01 +0100 Subject: [PATCH] arm: Use the target EL state when determining fault format We currently check the current state instead of the state of the target EL when determining how we report a fault. This breaks interprocessing since EL0 in aarch32 would report its fault status using the aarch32 registers even if EL1 is in aarch64. Fix this to report the fault using the format of the target EL. Change-Id: Ic080267ac210783d1e01c722a4ddaa687dce280e Signed-off-by: Andreas Sandberg Reviewed-by: Mitch Hayenga --- src/arch/arm/faults.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arch/arm/faults.cc b/src/arch/arm/faults.cc index a2b1120ec..1b54a3e24 100644 --- a/src/arch/arm/faults.cc +++ b/src/arch/arm/faults.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2012-2014 ARM Limited + * Copyright (c) 2010, 2012-2014, 2016 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -948,7 +948,7 @@ AbortFault::invoke(ThreadContext *tc, const StaticInstPtr &inst) // try to set hsr etc. and are based upon source! ArmFaultVals::invoke(tc, inst); - if (cpsr.width) { // AArch32 + if (!this->to64) { // AArch32 if (cpsr.mode == MODE_HYP) { tc->setMiscReg(T::HFarIndex, faultAddr); } else if (stage2) { -- 2.30.2