feat(mte): add error log for sync tag fault in EL2
Update exception handler for synchronous data aborts within EL2
to check the Data Fault Status Code in order to report synchronous
tag check faults when MTE is enabled.
Signed-off-by: Kathleen Capella <kathleen.capella@arm.com>
Change-Id: I4c2a74b8cd45e8d631a6d7fe9ce9562418e85666
diff --git a/src/arch/aarch64/hypervisor/handler.c b/src/arch/aarch64/hypervisor/handler.c
index 88da943..97d9c7e 100644
--- a/src/arch/aarch64/hypervisor/handler.c
+++ b/src/arch/aarch64/hypervisor/handler.c
@@ -243,7 +243,6 @@
{
uintreg_t esr = read_msr(esr_el2);
uintreg_t ec = GET_ESR_EC(esr);
-
(void)spsr;
switch (ec) {
@@ -281,6 +280,16 @@
}
}
+#if ENABLE_MTE
+ if (dfsc == DFSC_SYNC_TAG_CHECK_FAULT) {
+ dlog_error(
+ "Data abort due to synchronous tag check "
+ "fault: pc=%#lx, esr=%#lx, ec=%#lx, "
+ "far=%#lx, dfsc = %#lx\n",
+ elr, esr, ec, far, dfsc);
+ }
+ break;
+#endif
if (!GET_ESR_FNV(esr)) {
dlog_error(
"Data abort: pc=%#lx, esr=%#lx, ec=%#lx, "