18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/******************************************************************************
38c2ecf20Sopenharmony_ci * console.h
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Console I/O interface for Xen guest OSes.
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * Copyright (c) 2005, Keir Fraser
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#ifndef __XEN_PUBLIC_IO_CONSOLE_H__
118c2ecf20Sopenharmony_ci#define __XEN_PUBLIC_IO_CONSOLE_H__
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_citypedef uint32_t XENCONS_RING_IDX;
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci#define MASK_XENCONS_IDX(idx, ring) ((idx) & (sizeof(ring)-1))
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_cistruct xencons_interface {
188c2ecf20Sopenharmony_ci    char in[1024];
198c2ecf20Sopenharmony_ci    char out[2048];
208c2ecf20Sopenharmony_ci    XENCONS_RING_IDX in_cons, in_prod;
218c2ecf20Sopenharmony_ci    XENCONS_RING_IDX out_cons, out_prod;
228c2ecf20Sopenharmony_ci};
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci#endif /* __XEN_PUBLIC_IO_CONSOLE_H__ */
25