From 1461a7601d0e1d83c02bc1c32a6722fb70f8b3ac Mon Sep 17 00:00:00 2001 From: Timon Kruiper Date: Wed, 11 May 2022 09:59:47 +0200 Subject: [PATCH] Kernel: Report value of ESR_EL1 when exception happens on aarch64 --- Kernel/Arch/aarch64/init.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Kernel/Arch/aarch64/init.cpp b/Kernel/Arch/aarch64/init.cpp index b90a0998e53..5013b4e3b9f 100644 --- a/Kernel/Arch/aarch64/init.cpp +++ b/Kernel/Arch/aarch64/init.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -45,7 +46,12 @@ extern "C" void exception_common(TrapFrame const* const trap_frame) dbgln("elr_el1: {:x}", trap_frame->elr_el1); dbgln("tpidr_el1: {:x}", trap_frame->tpidr_el1); dbgln("sp_el0: {:x}", trap_frame->sp_el0); + + 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); } + + Kernel::Processor::halt(); } typedef void (*ctor_func_t)();