This commit fixes the target exception Level EL2 for alignmemt fault, it
is based on HCR_EL2.tge bit.
Change-Id: Ief78b2aa0c86f1c3d9a5d3ca00121d163a9d6a86
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24303
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
SPAlignmentFault::SPAlignmentFault()
{}
+bool
+SPAlignmentFault::routeToHyp(ThreadContext *tc) const
+{
+ assert(from64);
+ HCR hcr = tc->readMiscRegNoEffect(MISCREG_HCR_EL2);
+ return EL2Enabled(tc) && hcr.tge==1;
+}
+
SystemError::SystemError()
{}
{
public:
SPAlignmentFault();
+ bool routeToHyp(ThreadContext *tc) const override;
};
/// System error (AArch64 only)