From 3ad7e84ef59f51f755ab72b5ce348da1af283305 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Thu, 9 Jul 2015 13:07:12 +0000 Subject: [PATCH] Add logging of synchronous exceptions. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation --- sys/arm64/arm64/trap.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c index 500dce3c971d..89c104f214a1 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -258,6 +258,10 @@ do_el1h_sync(struct trapframe *frame) (exception == EXCP_DATA_ABORT && ((esr & ISS_DATA_ISV) == 0)), ("Invalid instruction length in exception")); + CTR4(KTR_TRAP, + "do_el1_sync: curthread: %p, esr %lx, elr: %lx, frame: %p", + curthread, esr, frame->tf_elr, frame); + switch(exception) { case EXCP_FP_SIMD: case EXCP_TRAP_FP: @@ -301,6 +305,10 @@ do_el0_sync(struct trapframe *frame) esr = READ_SPECIALREG(esr_el1); exception = ESR_ELx_EXCEPTION(esr); + CTR4(KTR_TRAP, + "do_el0_sync: curthread: %p, esr %lx, elr: %lx, frame: %p", + curthread, esr, frame->tf_elr, frame); + switch(exception) { case EXCP_FP_SIMD: case EXCP_TRAP_FP: