Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/x86/cpu_machdep.c
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
#include "opt_ddb.h" | #include "opt_ddb.h" | ||||
#include "opt_inet.h" | #include "opt_inet.h" | ||||
#include "opt_isa.h" | #include "opt_isa.h" | ||||
#include "opt_kdb.h" | #include "opt_kdb.h" | ||||
#include "opt_kstack_pages.h" | #include "opt_kstack_pages.h" | ||||
#include "opt_maxmem.h" | #include "opt_maxmem.h" | ||||
#include "opt_mp_watchdog.h" | #include "opt_mp_watchdog.h" | ||||
#include "opt_platform.h" | #include "opt_platform.h" | ||||
#include "opt_watchdog.h" | |||||
#ifdef __i386__ | #ifdef __i386__ | ||||
#include "opt_apic.h" | #include "opt_apic.h" | ||||
#endif | #endif | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/bus.h> | #include <sys/bus.h> | ||||
#include <sys/cpu.h> | #include <sys/cpu.h> | ||||
#include <sys/kdb.h> | #include <sys/kdb.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/ktr.h> | #include <sys/ktr.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/mutex.h> | #include <sys/mutex.h> | ||||
#include <sys/pcpu.h> | #include <sys/pcpu.h> | ||||
#include <sys/rwlock.h> | #include <sys/rwlock.h> | ||||
#include <sys/sched.h> | #include <sys/sched.h> | ||||
#include <sys/smp.h> | #include <sys/smp.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#ifdef NMI_WATCHDOG | |||||
#include <sys/watchdog.h> | |||||
#endif | |||||
#include <machine/clock.h> | #include <machine/clock.h> | ||||
#include <machine/cpu.h> | #include <machine/cpu.h> | ||||
#include <machine/cputypes.h> | #include <machine/cputypes.h> | ||||
#include <machine/specialreg.h> | #include <machine/specialreg.h> | ||||
#include <machine/md_var.h> | #include <machine/md_var.h> | ||||
#include <machine/mp_watchdog.h> | #include <machine/mp_watchdog.h> | ||||
#include <machine/tss.h> | #include <machine/tss.h> | ||||
▲ Show 20 Lines • Show All 655 Lines • ▼ Show 20 Lines | SYSCTL_INT(_machdep, OID_AUTO, kdb_on_nmi, CTLFLAG_RWTUN, | ||||
"Go to KDB on NMI with unknown source"); | "Go to KDB on NMI with unknown source"); | ||||
#endif | #endif | ||||
void | void | ||||
nmi_call_kdb(u_int cpu, u_int type, struct trapframe *frame) | nmi_call_kdb(u_int cpu, u_int type, struct trapframe *frame) | ||||
{ | { | ||||
bool claimed = false; | bool claimed = false; | ||||
#ifdef NMI_WATCHDOG | |||||
if (nmi_watchdog_check()) { | |||||
claimed = true; | |||||
panic("NMI watchdog"); | |||||
} | |||||
#endif /* NMI_WATCHDOG */ | |||||
#ifdef DEV_ISA | #ifdef DEV_ISA | ||||
/* machine/parity/power fail/"kitchen sink" faults */ | /* machine/parity/power fail/"kitchen sink" faults */ | ||||
if (isa_nmi(frame->tf_err)) { | if (isa_nmi(frame->tf_err)) { | ||||
claimed = true; | claimed = true; | ||||
if (panic_on_nmi) | if (panic_on_nmi) | ||||
panic("NMI indicates hardware failure"); | panic("NMI indicates hardware failure"); | ||||
} | } | ||||
#endif /* DEV_ISA */ | #endif /* DEV_ISA */ | ||||
▲ Show 20 Lines • Show All 202 Lines • Show Last 20 Lines |