Add panic_hwtf() for kernel faults
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 18 Jul 2018 02:12:00 +0000 (22:12 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 18 Jul 2018 02:28:57 +0000 (22:28 -0400)
commitbf9a9ba0d6af68ec3f4a63bf9c5559050f1552cc
tree1507273d173bfed0b0e9b23cef9945de4732adaf
parent17f7a3c8a7ac87d7517603ebfcd2bc66e5d4bbf3
Add panic_hwtf() for kernel faults

When the kernel faults, we would print the HWTF and maybe a backtrace,
and then panic.  These prints were not serialized like other panic
prints.  The new panic() would also print a backtrace of whoever called
panic, which isn't useful for faults (the stack frame was just the
handler).

panic_hwtf() will take a trapframe and print + backtrace that hw_tf
instead of backtracing the calling context.  This output will be
serialized, so the debug output from concurrent faults across multiple
cores won't be interleaved.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/x86/trap.c
kern/include/assert.h
kern/include/init.h
kern/src/init.c