11a59d1b8SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
2b8b572e1SStephen Rothwell /*
3b8b572e1SStephen Rothwell  * hvconsole.h
4b8b572e1SStephen Rothwell  * Copyright (C) 2004 Ryan S Arnold, IBM Corporation
5b8b572e1SStephen Rothwell  *
6b8b572e1SStephen Rothwell  * LPAR console support.
7b8b572e1SStephen Rothwell  */
8b8b572e1SStephen Rothwell 
9b8b572e1SStephen Rothwell #ifndef _PPC64_HVCONSOLE_H
10b8b572e1SStephen Rothwell #define _PPC64_HVCONSOLE_H
11b8b572e1SStephen Rothwell #ifdef __KERNEL__
12b8b572e1SStephen Rothwell 
13b8b572e1SStephen Rothwell /*
14b8b572e1SStephen Rothwell  * PSeries firmware will only send/recv up to 16 bytes of character data per
15b8b572e1SStephen Rothwell  * hcall.
16b8b572e1SStephen Rothwell  */
17b8b572e1SStephen Rothwell #define MAX_VIO_PUT_CHARS	16
18b8b572e1SStephen Rothwell #define SIZE_VIO_GET_CHARS	16
19b8b572e1SStephen Rothwell 
20b8b572e1SStephen Rothwell /*
21b8b572e1SStephen Rothwell  * Vio firmware always attempts to fetch MAX_VIO_GET_CHARS chars.  The 'count'
22b8b572e1SStephen Rothwell  * parm is included to conform to put_chars() function pointer template
23b8b572e1SStephen Rothwell  */
24b8b572e1SStephen Rothwell extern int hvc_get_chars(uint32_t vtermno, char *buf, int count);
25b8b572e1SStephen Rothwell extern int hvc_put_chars(uint32_t vtermno, const char *buf, int count);
26b8b572e1SStephen Rothwell 
27*13b8219bSLee Jones /* Provided by HVC VIO */
28*13b8219bSLee Jones void hvc_vio_init_early(void);
29*13b8219bSLee Jones 
30b8b572e1SStephen Rothwell #endif /* __KERNEL__ */
31b8b572e1SStephen Rothwell #endif /* _PPC64_HVCONSOLE_H */
32