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