arch-arm: Fix EL2 target exception level for SP alignment fault.
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>
This commit is contained in:
@@ -1541,6 +1541,14 @@ PCAlignmentFault::routeToHyp(ThreadContext *tc) const
|
||||
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()
|
||||
{}
|
||||
|
||||
|
||||
@@ -571,6 +571,7 @@ class SPAlignmentFault : public ArmFaultVals<SPAlignmentFault>
|
||||
{
|
||||
public:
|
||||
SPAlignmentFault();
|
||||
bool routeToHyp(ThreadContext *tc) const override;
|
||||
};
|
||||
|
||||
/// System error (AArch64 only)
|
||||
|
||||
Reference in New Issue
Block a user