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