150276Speter/******************************************************************************
2178866Srafan * console.h
350276Speter *
450276Speter * Console I/O interface for Xen guest OSes.
550276Speter *
650276Speter * Permission is hereby granted, free of charge, to any person obtaining a copy
750276Speter * of this software and associated documentation files (the "Software"), to
850276Speter * deal in the Software without restriction, including without limitation the
950276Speter * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
1050276Speter * sell copies of the Software, and to permit persons to whom the Software is
1150276Speter * furnished to do so, subject to the following conditions:
1250276Speter *
1350276Speter * The above copyright notice and this permission notice shall be included in
1450276Speter * all copies or substantial portions of the Software.
1550276Speter *
1650276Speter * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1750276Speter * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1850276Speter * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1950276Speter * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2050276Speter * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2150276Speter * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2250276Speter * DEALINGS IN THE SOFTWARE.
2350276Speter *
2450276Speter * Copyright (c) 2005, Keir Fraser
2550276Speter */
2650276Speter
2750276Speter#ifndef __XEN_PUBLIC_IO_CONSOLE_H__
2850276Speter#define __XEN_PUBLIC_IO_CONSOLE_H__
2950276Speter
3050276Spetertypedef uint32_t XENCONS_RING_IDX;
3150276Speter
32184989Srafan#define MASK_XENCONS_IDX(idx, ring) ((idx) & (sizeof(ring)-1))
3350276Speter
3450276Speterstruct xencons_interface {
3550276Speter    char in[1024];
3650276Speter    char out[2048];
3750276Speter    XENCONS_RING_IDX in_cons, in_prod;
3850276Speter    XENCONS_RING_IDX out_cons, out_prod;
3950276Speter};
4050276Speter
4150276Speter#endif /* __XEN_PUBLIC_IO_CONSOLE_H__ */
42184989Srafan
4350276Speter/*
4450276Speter * Local variables:
4550276Speter * mode: C
4662449Speter * c-set-style: "BSD"
4750276Speter * c-basic-offset: 4
48184989Srafan * tab-width: 4
49184989Srafan * indent-tabs-mode: nil
5062449Speter * End:
5162449Speter */
5262449Speter