xref: /illumos-gate/usr/src/uts/common/xen/sys/xenbus_comms.h (revision 012e6ce759c490003aed29439cc47d3d73a99ad3)
1 /*
2  * Private include for xenbus communications.
3  *
4  * Copyright (C) 2005 Rusty Russell, IBM Corporation
5  *
6  * This file may be distributed separately from the Linux kernel, or
7  * incorporated into other software packages, subject to the following license:
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining a copy
10  * of this source file (the "Software"), to deal in the Software without
11  * restriction, including without limitation the rights to use, copy, modify,
12  * merge, publish, distribute, sublicense, and/or sell copies of the Software,
13  * and to permit persons to whom the Software is furnished to do so, subject to
14  * the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be included in
17  * all copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
25  * IN THE SOFTWARE.
26  */
27 
28 /*
29  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
30  * Use is subject to license terms.
31  */
32 
33 #ifndef	_SYS_XENBUS_COMMS_H
34 #define	_SYS_XENBUS_COMMS_H
35 
36 #include <sys/sunddi.h>
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 /* xenbus interface interrupt */
43 #define	IPL_XENBUS	0x01
44 
45 void xs_early_init(void);
46 void xs_domu_init(void);
47 void xs_dom0_init(void);
48 void xb_suspend(void);
49 void xb_init(void);
50 void xb_setup_intr(void);
51 
52 /* Low level routines. */
53 int xb_write(const void *data, unsigned len);
54 int xb_read(void *data, unsigned len);
55 
56 ddi_umem_cookie_t xb_xenstore_cookie(void);
57 
58 #ifdef __cplusplus
59 }
60 #endif
61 
62 #endif /* _SYS_XENBUS_COMMS_H */
63