arm: correctly assign faulting IPA's to HPFAR_EL2
This patch corrects IPA reporting if the translation faults in a stage 2 lookup. Change-Id: I0b914527f8a9f98a5e980a131cf9d03e5584b4e9
This commit is contained in:
parent
4d5d47c173
commit
bce923c189
1 changed files with 11 additions and 1 deletions
|
@ -969,7 +969,17 @@ AbortFault<T>::invoke(ThreadContext *tc, const StaticInstPtr &inst)
|
|||
} else { // AArch64
|
||||
// Set the FAR register. Nothing else to do if we are in AArch64 state
|
||||
// because the syndrome register has already been set inside invoke64()
|
||||
tc->setMiscReg(AbortFault<T>::getFaultAddrReg64(), faultAddr);
|
||||
if (stage2) {
|
||||
// stage 2 fault, set HPFAR_EL2 to the faulting IPA
|
||||
// and FAR_EL2 to the Original VA
|
||||
tc->setMiscReg(AbortFault<T>::getFaultAddrReg64(), OVAddr);
|
||||
tc->setMiscReg(MISCREG_HPFAR_EL2, bits(faultAddr, 47, 12) << 4);
|
||||
|
||||
DPRINTF(Faults, "Abort Fault (Stage 2) VA: 0x%x IPA: 0x%x\n",
|
||||
OVAddr, faultAddr);
|
||||
} else {
|
||||
tc->setMiscReg(AbortFault<T>::getFaultAddrReg64(), faultAddr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue