From a9b78bcee79a9228d0590091c5f6dfc265e59300 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Tue, 22 May 2018 11:58:28 +0100 Subject: arch-arm: Adjust breakpoint EC depending on source state The software breakpoint exception class needs to be adjusted depending on the source EL's execution state. This change fixes an incorrect exception class when taking a breakpoint from aarch64. Change-Id: I99d87a04be6bf9ce3a69f6b19969fa006cfd63a4 Signed-off-by: Andreas Sandberg Reviewed-by: Ciro Santilli Reviewed-on: https://gem5-review.googlesource.com/10809 Reviewed-by: Giacomo Travaglini Maintainer: Giacomo Travaglini --- src/arch/arm/faults.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/arch/arm/faults.cc') diff --git a/src/arch/arm/faults.cc b/src/arch/arm/faults.cc index bdb6f2545..676559f61 100644 --- a/src/arch/arm/faults.cc +++ b/src/arch/arm/faults.cc @@ -1543,6 +1543,12 @@ SoftwareBreakpoint::routeToHyp(ThreadContext *tc) const (hcr.tge || mdcr.tde); } +ExceptionClass +SoftwareBreakpoint::ec(ThreadContext *tc) const +{ + return from64 ? EC_SOFTWARE_BREAKPOINT_64 : vals.ec; +} + void ArmSev::invoke(ThreadContext *tc, const StaticInstPtr &inst) { DPRINTF(Faults, "Invoking ArmSev Fault\n"); -- cgit v1.2.3