1*3a9fd824SRoger Pau Monné /****************************************************************************** 2*3a9fd824SRoger Pau Monné * console.h 3*3a9fd824SRoger Pau Monné * 4*3a9fd824SRoger Pau Monné * Console I/O interface for Xen guest OSes. 5*3a9fd824SRoger Pau Monné * 6*3a9fd824SRoger Pau Monné * Permission is hereby granted, free of charge, to any person obtaining a copy 7*3a9fd824SRoger Pau Monné * of this software and associated documentation files (the "Software"), to 8*3a9fd824SRoger Pau Monné * deal in the Software without restriction, including without limitation the 9*3a9fd824SRoger Pau Monné * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10*3a9fd824SRoger Pau Monné * sell copies of the Software, and to permit persons to whom the Software is 11*3a9fd824SRoger Pau Monné * furnished to do so, subject to the following conditions: 12*3a9fd824SRoger Pau Monné * 13*3a9fd824SRoger Pau Monné * The above copyright notice and this permission notice shall be included in 14*3a9fd824SRoger Pau Monné * all copies or substantial portions of the Software. 15*3a9fd824SRoger Pau Monné * 16*3a9fd824SRoger Pau Monné * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17*3a9fd824SRoger Pau Monné * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18*3a9fd824SRoger Pau Monné * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19*3a9fd824SRoger Pau Monné * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20*3a9fd824SRoger Pau Monné * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21*3a9fd824SRoger Pau Monné * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22*3a9fd824SRoger Pau Monné * DEALINGS IN THE SOFTWARE. 23*3a9fd824SRoger Pau Monné * 24*3a9fd824SRoger Pau Monné * Copyright (c) 2005, Keir Fraser 25*3a9fd824SRoger Pau Monné */ 26*3a9fd824SRoger Pau Monné 27*3a9fd824SRoger Pau Monné #ifndef __XEN_PUBLIC_IO_CONSOLE_H__ 28*3a9fd824SRoger Pau Monné #define __XEN_PUBLIC_IO_CONSOLE_H__ 29*3a9fd824SRoger Pau Monné 30*3a9fd824SRoger Pau Monné typedef uint32_t XENCONS_RING_IDX; 31*3a9fd824SRoger Pau Monné 32*3a9fd824SRoger Pau Monné #define MASK_XENCONS_IDX(idx, ring) ((idx) & (sizeof(ring)-1)) 33*3a9fd824SRoger Pau Monné 34*3a9fd824SRoger Pau Monné struct xencons_interface { 35*3a9fd824SRoger Pau Monné char in[1024]; 36*3a9fd824SRoger Pau Monné char out[2048]; 37*3a9fd824SRoger Pau Monné XENCONS_RING_IDX in_cons, in_prod; 38*3a9fd824SRoger Pau Monné XENCONS_RING_IDX out_cons, out_prod; 39*3a9fd824SRoger Pau Monné }; 40*3a9fd824SRoger Pau Monné 41*3a9fd824SRoger Pau Monné #ifdef XEN_WANT_FLEX_CONSOLE_RING 42*3a9fd824SRoger Pau Monné #include "ring.h" 43*3a9fd824SRoger Pau Monné DEFINE_XEN_FLEX_RING(xencons); 44*3a9fd824SRoger Pau Monné #endif 45*3a9fd824SRoger Pau Monné 46*3a9fd824SRoger Pau Monné #endif /* __XEN_PUBLIC_IO_CONSOLE_H__ */ 47*3a9fd824SRoger Pau Monné 48*3a9fd824SRoger Pau Monné /* 49*3a9fd824SRoger Pau Monné * Local variables: 50*3a9fd824SRoger Pau Monné * mode: C 51*3a9fd824SRoger Pau Monné * c-file-style: "BSD" 52*3a9fd824SRoger Pau Monné * c-basic-offset: 4 53*3a9fd824SRoger Pau Monné * tab-width: 4 54*3a9fd824SRoger Pau Monné * indent-tabs-mode: nil 55*3a9fd824SRoger Pau Monné * End: 56*3a9fd824SRoger Pau Monné */ 57