18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * hvconsole.h
48c2ecf20Sopenharmony_ci * Copyright (C) 2004 Ryan S Arnold, IBM Corporation
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * LPAR console support.
78c2ecf20Sopenharmony_ci */
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#ifndef _PPC64_HVCONSOLE_H
108c2ecf20Sopenharmony_ci#define _PPC64_HVCONSOLE_H
118c2ecf20Sopenharmony_ci#ifdef __KERNEL__
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci/*
148c2ecf20Sopenharmony_ci * PSeries firmware will only send/recv up to 16 bytes of character data per
158c2ecf20Sopenharmony_ci * hcall.
168c2ecf20Sopenharmony_ci */
178c2ecf20Sopenharmony_ci#define MAX_VIO_PUT_CHARS	16
188c2ecf20Sopenharmony_ci#define SIZE_VIO_GET_CHARS	16
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci/*
218c2ecf20Sopenharmony_ci * Vio firmware always attempts to fetch MAX_VIO_GET_CHARS chars.  The 'count'
228c2ecf20Sopenharmony_ci * parm is included to conform to put_chars() function pointer template
238c2ecf20Sopenharmony_ci */
248c2ecf20Sopenharmony_ciextern int hvc_get_chars(uint32_t vtermno, char *buf, int count);
258c2ecf20Sopenharmony_ciextern int hvc_put_chars(uint32_t vtermno, const char *buf, int count);
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci#endif /* __KERNEL__ */
288c2ecf20Sopenharmony_ci#endif /* _PPC64_HVCONSOLE_H */
29