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