Hello Ciro Santilli,

I'd like you to do a code review. Please visit

    https://gem5-review.googlesource.com/10809

to review the following change.


Change subject: arch-arm: Adjust breakpoint EC depending on source state
......................................................................

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 <[email protected]>
Reviewed-by: Ciro Santilli <[email protected]>
---
M src/arch/arm/faults.cc
M src/arch/arm/faults.hh
M src/arch/arm/types.hh
3 files changed, 8 insertions(+), 0 deletions(-)



diff --git a/src/arch/arm/faults.cc b/src/arch/arm/faults.cc
index bdb6f25..676559f 100644
--- a/src/arch/arm/faults.cc
+++ b/src/arch/arm/faults.cc
@@ -1543,6 +1543,12 @@
         (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");
diff --git a/src/arch/arm/faults.hh b/src/arch/arm/faults.hh
index 132c07c..90b5501 100644
--- a/src/arch/arm/faults.hh
+++ b/src/arch/arm/faults.hh
@@ -573,6 +573,7 @@
     SoftwareBreakpoint(ExtMachInst _mach_inst, uint32_t _iss);

     bool routeToHyp(ThreadContext *tc) const override;
+    ExceptionClass ec(ThreadContext *tc) const override;
 };

 // A fault that flushes the pipe, excluding the faulting instructions
diff --git a/src/arch/arm/types.hh b/src/arch/arm/types.hh
index d4e6ec0..84887a1 100644
--- a/src/arch/arm/types.hh
+++ b/src/arch/arm/types.hh
@@ -623,6 +623,7 @@
         EC_FP_EXCEPTION_64         = 0x2C,
         EC_SERROR                  = 0x2F,
         EC_SOFTWARE_BREAKPOINT     = 0x38,
+        EC_SOFTWARE_BREAKPOINT_64  = 0x3C,
     };

     /**

--
To view, visit https://gem5-review.googlesource.com/10809
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I99d87a04be6bf9ce3a69f6b19969fa006cfd63a4
Gerrit-Change-Number: 10809
Gerrit-PatchSet: 1
Gerrit-Owner: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Ciro Santilli <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to