1*8ac98aedSDavid Woodhouse /* SPDX-License-Identifier: MIT */ 2a3434a2dSAnthony PERARD /****************************************************************************** 3a3434a2dSAnthony PERARD * console.h 4a3434a2dSAnthony PERARD * 5a3434a2dSAnthony PERARD * Console I/O interface for Xen guest OSes. 6a3434a2dSAnthony PERARD * 7a3434a2dSAnthony PERARD * Copyright (c) 2005, Keir Fraser 8a3434a2dSAnthony PERARD */ 9a3434a2dSAnthony PERARD 10a3434a2dSAnthony PERARD #ifndef __XEN_PUBLIC_IO_CONSOLE_H__ 11a3434a2dSAnthony PERARD #define __XEN_PUBLIC_IO_CONSOLE_H__ 12a3434a2dSAnthony PERARD 13a3434a2dSAnthony PERARD typedef uint32_t XENCONS_RING_IDX; 14a3434a2dSAnthony PERARD 15a3434a2dSAnthony PERARD #define MASK_XENCONS_IDX(idx, ring) ((idx) & (sizeof(ring)-1)) 16a3434a2dSAnthony PERARD 17a3434a2dSAnthony PERARD struct xencons_interface { 18a3434a2dSAnthony PERARD char in[1024]; 19a3434a2dSAnthony PERARD char out[2048]; 20a3434a2dSAnthony PERARD XENCONS_RING_IDX in_cons, in_prod; 21a3434a2dSAnthony PERARD XENCONS_RING_IDX out_cons, out_prod; 22a3434a2dSAnthony PERARD }; 23a3434a2dSAnthony PERARD 24a3434a2dSAnthony PERARD #ifdef XEN_WANT_FLEX_CONSOLE_RING 25a3434a2dSAnthony PERARD #include "ring.h" 26a3434a2dSAnthony PERARD DEFINE_XEN_FLEX_RING(xencons); 27a3434a2dSAnthony PERARD #endif 28a3434a2dSAnthony PERARD 29a3434a2dSAnthony PERARD #endif /* __XEN_PUBLIC_IO_CONSOLE_H__ */ 3050c88402SJoao Martins 3150c88402SJoao Martins /* 3250c88402SJoao Martins * Local variables: 3350c88402SJoao Martins * mode: C 3450c88402SJoao Martins * c-file-style: "BSD" 3550c88402SJoao Martins * c-basic-offset: 4 3650c88402SJoao Martins * tab-width: 4 3750c88402SJoao Martins * indent-tabs-mode: nil 3850c88402SJoao Martins * End: 3950c88402SJoao Martins */ 40