HomeFreeBSD

arm64: add fault address to trapframe

Description

arm64: add fault address to trapframe

It was previously possible for the fault address register to get
clobbered before it was saved. This small window occurred when an
additional exception was encountered inside the exception handler,
overwriting the previous value.

Commit f29942229d24 ("Read the arm64 far early in el0 exceptions")
patched this issue, but avoided changing the trapframe since this could
be considered a KBI change in FreeBSD 13.

Revert the above fix and save the fault address in the trapframe
instead. This saves the fault address even earlier in the exception
handling process, and is a more robust and simple fix.

Reviewed by: andrew, jhb, jrtc27
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D38984

Details

Provenance
zachary.leaf_arm.comAuthored on Mar 2 2023, 2:15 PM
andrewCommitted on Mar 23 2023, 6:56 PM
Reviewer
andrew
Differential Revision
D38984: arm64: add fault address to trapframe
Parents
rG2ecbbcc7cabd: arm64: extend ESR/SPSR registers to 64b
Branches
Unknown
Tags
Unknown