xref: /netbsd-src/sys/arch/x86/include/nmi.h (revision 4b64c2cb3db825fbbda2129122439f0ffc5cfcb0)
1*4b64c2cbSyamt /*	$Id: nmi.h,v 1.1 2009/02/24 06:03:54 yamt Exp $	*/
2*4b64c2cbSyamt 
3*4b64c2cbSyamt /*-
4*4b64c2cbSyamt  * Copyright (c)2009 YAMAMOTO Takashi,
5*4b64c2cbSyamt  * All rights reserved.
6*4b64c2cbSyamt  *
7*4b64c2cbSyamt  * Redistribution and use in source and binary forms, with or without
8*4b64c2cbSyamt  * modification, are permitted provided that the following conditions
9*4b64c2cbSyamt  * are met:
10*4b64c2cbSyamt  * 1. Redistributions of source code must retain the above copyright
11*4b64c2cbSyamt  *    notice, this list of conditions and the following disclaimer.
12*4b64c2cbSyamt  * 2. Redistributions in binary form must reproduce the above copyright
13*4b64c2cbSyamt  *    notice, this list of conditions and the following disclaimer in the
14*4b64c2cbSyamt  *    documentation and/or other materials provided with the distribution.
15*4b64c2cbSyamt  *
16*4b64c2cbSyamt  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17*4b64c2cbSyamt  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18*4b64c2cbSyamt  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19*4b64c2cbSyamt  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20*4b64c2cbSyamt  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21*4b64c2cbSyamt  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22*4b64c2cbSyamt  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23*4b64c2cbSyamt  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24*4b64c2cbSyamt  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25*4b64c2cbSyamt  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26*4b64c2cbSyamt  * SUCH DAMAGE.
27*4b64c2cbSyamt  */
28*4b64c2cbSyamt 
29*4b64c2cbSyamt #ifndef _X86_NMI_H_
30*4b64c2cbSyamt #define	_X86_NMI_H_
31*4b64c2cbSyamt 
32*4b64c2cbSyamt typedef struct nmi_handler nmi_handler_t;
33*4b64c2cbSyamt struct trapframe;
34*4b64c2cbSyamt 
35*4b64c2cbSyamt nmi_handler_t *nmi_establish(int (*)(const struct trapframe *, void *), void *);
36*4b64c2cbSyamt void nmi_disestablish(nmi_handler_t *);
37*4b64c2cbSyamt int nmi_dispatch(const struct trapframe *);
38*4b64c2cbSyamt void nmi_init(void);
39*4b64c2cbSyamt 
40*4b64c2cbSyamt #endif /* _X86_NMI_H_ */
41