1 /* $NetBSD: nmi.h,v 1.1.1.1.38.1 2007/10/03 19:26:08 garbled Exp $ */
2 /******************************************************************************
5 * NMI callback registration and reason codes.
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to
9 * deal in the Software without restriction, including without limitation the
10 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
11 * sell copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 * DEALINGS IN THE SOFTWARE.
25 * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
28 #ifndef __XEN_PUBLIC_NMI_H__
29 #define __XEN_PUBLIC_NMI_H__
33 * Currently these are x86-specific, stored in arch_shared_info.nmi_reason.
35 /* I/O-check error reported via ISA port 0x61, bit 6. */
36 #define _XEN_NMIREASON_io_error 0
37 #define XEN_NMIREASON_io_error (1UL << _XEN_NMIREASON_io_error)
38 /* Parity error reported via ISA port 0x61, bit 7. */
39 #define _XEN_NMIREASON_parity_error 1
40 #define XEN_NMIREASON_parity_error (1UL << _XEN_NMIREASON_parity_error)
41 /* Unknown hardware-generated NMI. */
42 #define _XEN_NMIREASON_unknown 2
43 #define XEN_NMIREASON_unknown (1UL << _XEN_NMIREASON_unknown)
46 * long nmi_op(unsigned int cmd, void *arg)
47 * NB. All ops return zero on success, else a negative error code.
51 * Register NMI callback for this (calling) VCPU. Currently this only makes
52 * sense for domain 0, vcpu 0. All other callers will be returned EINVAL.
53 * arg == pointer to xennmi_callback structure.
55 #define XENNMI_register_callback 0
56 struct xennmi_callback
{
57 unsigned long handler_address
;
60 typedef struct xennmi_callback xennmi_callback_t
;
61 DEFINE_XEN_GUEST_HANDLE(xennmi_callback_t
);
64 * Deregister NMI callback for this (calling) VCPU.
67 #define XENNMI_unregister_callback 1
69 #endif /* __XEN_PUBLIC_NMI_H__ */
77 * indent-tabs-mode: nil