1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:17:44 +00:00

Kernel/aarch64: Add Fault Address Register (FAR_EL1)

And use it for printing the virtual address when an exception has
happened that set the register, such as data aborts and instruction
aborts.
This commit is contained in:
Timon Kruiper 2022-12-20 19:03:10 +01:00 committed by Sam Atkins
parent 344ffda8cb
commit 0226390b21
2 changed files with 39 additions and 0 deletions

View file

@ -52,6 +52,8 @@ extern "C" void exception_common(Kernel::TrapFrame const* const trap_frame)
auto esr_el1 = Kernel::Aarch64::ESR_EL1::read();
dbgln("esr_el1: EC({:#b}) IL({:#b}) ISS({:#b}) ISS2({:#b})", esr_el1.EC, esr_el1.IL, esr_el1.ISS, esr_el1.ISS2);
dbgln("Exception Class: {}", Aarch64::exception_class_to_string(esr_el1.EC));
if (Aarch64::exception_class_has_set_far(esr_el1.EC))
dbgln("Faulting Virtual Address: 0x{:x}", Aarch64::FAR_EL1::read().virtual_address);
dump_backtrace_from_base_pointer(regs->x[29]);
}