1 
2 #ifndef ASM_NMI_H
3 #define ASM_NMI_H
4 
5 #include <public/nmi.h>
6 
7 struct cpu_user_regs;
8 
9 /* Watchdog boolean from the command line */
10 extern bool opt_watchdog;
11 
12 /* Watchdog force parameter from the command line */
13 extern bool watchdog_force;
14 
15 /* CPU to handle platform NMI */
16 extern const unsigned int nmi_cpu;
17 
18 typedef int nmi_callback_t(const struct cpu_user_regs *regs, int cpu);
19 
20 /**
21  * set_nmi_callback
22  *
23  * Set a handler for an NMI. Only one handler may be
24  * set. Return the old nmi callback handler.
25  */
26 nmi_callback_t *set_nmi_callback(nmi_callback_t *callback);
27 
28 /**
29  * unset_nmi_callback
30  *
31  * Remove the handler previously set.
32  */
33 void unset_nmi_callback(void);
34 
35 DECLARE_PER_CPU(unsigned int, nmi_count);
36 
37 #endif /* ASM_NMI_H */
38