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