proxyutils.py: Support Apple impdef MSR trap decoding

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2021-05-12 21:21:09 +09:00
parent f56318abc9
commit 4d75ff90ff

View file

@ -149,10 +149,13 @@ class ProxyUtils(object):
self.disassemble_at(ctx.elr_phys - 4 * 4, 9 * 4, ctx.elr_phys) self.disassemble_at(ctx.elr_phys - 4 * 4, 9 * 4, ctx.elr_phys)
if code == EXC.SYNC: if code == EXC.SYNC:
if ctx.esr.EC == ESR_EC.MSR: if ctx.esr.EC == ESR_EC.MSR or ctx.esr.EC == ESR_EC.IMPDEF and ctx.esr.ISS == 0x20:
print() print()
print(" == MRS/MSR fault decoding ==") print(" == MRS/MSR fault decoding ==")
iss = ESR_ISS_MSR(ctx.esr.ISS) if ctx.esr.EC == ESR_EC.MSR:
iss = ESR_ISS_MSR(ctx.esr.ISS)
else:
iss = ESR_ISS_MSR(self.mrs(AFSR1_EL2))
enc = iss.Op0, iss.Op1, iss.CRn, iss.CRm, iss.Op2 enc = iss.Op0, iss.Op1, iss.CRn, iss.CRm, iss.Op2
if enc in sysreg_rev: if enc in sysreg_rev:
name = sysreg_rev[enc] name = sysreg_rev[enc]