aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/kdb.h
diff options
context:
space:
mode:
authorEric van Gyzen <vangyzen@FreeBSD.org>2020-04-26 00:41:29 +0000
committerEric van Gyzen <vangyzen@FreeBSD.org>2020-04-26 00:41:29 +0000
commitba0ced82eab1bd9664aa7304a7daeb6f1d20ab78 (patch)
treeecf27d0771231e90ccd444791ba09e6e2a1a1e3c /sys/sys/kdb.h
parentcb761bb2fb40a9b318b5583110791b4d9669b1c0 (diff)
downloadsrc-ba0ced82eab1bd9664aa7304a7daeb6f1d20ab78.tar.gz
src-ba0ced82eab1bd9664aa7304a7daeb6f1d20ab78.zip
Fix handling of NMIs from unknown sources (BMC, hypervisor)
Release kernels have no KDB backends enabled, so they discard an NMI if it is not due to a hardware failure. This includes NMIs from IPMI BMCs and hypervisors. Furthermore, the interaction of panic_on_nmi, kdb_on_nmi, and debugger_on_panic is confusing. Respond to all NMIs according to panic_on_nmi and debugger_on_panic. Remove kdb_on_nmi. Expand the meaning of panic_on_nmi by making it a bitfield. There are currently two bits: one for NMIs due to hardware failure, and one for all others. Leave room for more. If panic_on_nmi and debugger_on_panic are both true, don't actually panic, but directly enter the debugger, to allow someone to leave the debugger and [hopefully] resume normal execution. Reviewed by: kib MFC after: 2 weeks Relnotes: yes: machdep.kdb_on_nmi is gone; machdep.panic_on_nmi changed Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D24558
Notes
Notes: svn path=/head/; revision=360328
Diffstat (limited to 'sys/sys/kdb.h')
-rw-r--r--sys/sys/kdb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/kdb.h b/sys/sys/kdb.h
index a70e88627718..5ace60740bb6 100644
--- a/sys/sys/kdb.h
+++ b/sys/sys/kdb.h
@@ -65,6 +65,7 @@ struct kdb_dbbe {
SET_DECLARE(kdb_dbbe_set, struct kdb_dbbe);
extern u_char kdb_active; /* Non-zero while in debugger. */
+extern int debugger_on_panic; /* enter the debugger on panic. */
extern int debugger_on_trap; /* enter the debugger on trap. */
extern struct kdb_dbbe *kdb_dbbe; /* Default debugger backend or NULL. */
extern struct trapframe *kdb_frame; /* Frame to kdb_trap(). */