xref: /titanic_41/usr/src/uts/i86pc/sys/boot_console.h (revision 0d928757379972073af9fb22bdc827b74e8ba6ac)
1ae115bc7Smrj /*
2ae115bc7Smrj  * CDDL HEADER START
3ae115bc7Smrj  *
4ae115bc7Smrj  * The contents of this file are subject to the terms of the
5ae115bc7Smrj  * Common Development and Distribution License (the "License").
6ae115bc7Smrj  * You may not use this file except in compliance with the License.
7ae115bc7Smrj  *
8ae115bc7Smrj  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9ae115bc7Smrj  * or http://www.opensolaris.org/os/licensing.
10ae115bc7Smrj  * See the License for the specific language governing permissions
11ae115bc7Smrj  * and limitations under the License.
12ae115bc7Smrj  *
13ae115bc7Smrj  * When distributing Covered Code, include this CDDL HEADER in each
14ae115bc7Smrj  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15ae115bc7Smrj  * If applicable, add the following below this CDDL HEADER, with the
16ae115bc7Smrj  * fields enclosed by brackets "[]" replaced with your own identifying
17ae115bc7Smrj  * information: Portions Copyright [yyyy] [name of copyright owner]
18ae115bc7Smrj  *
19ae115bc7Smrj  * CDDL HEADER END
20ae115bc7Smrj  */
21ae115bc7Smrj /*
22*0d928757SGary Mills  * Copyright (c) 2012 Gary Mills
23*0d928757SGary Mills  *
2467ce1dadSJan Setje-Eilers  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
25ae115bc7Smrj  * Use is subject to license terms.
26ae115bc7Smrj  */
27ae115bc7Smrj 
28ae115bc7Smrj /*
29ae115bc7Smrj  * This file is shared between dboot and the kernel.
30ae115bc7Smrj  */
31ae115bc7Smrj 
32ae115bc7Smrj #ifndef _BOOT_CONSOLE_H
33ae115bc7Smrj #define	_BOOT_CONSOLE_H
34ae115bc7Smrj 
35ae115bc7Smrj #ifdef __cplusplus
36ae115bc7Smrj extern "C" {
37ae115bc7Smrj #endif
38ae115bc7Smrj 
39ae115bc7Smrj #define	CONS_INVALID		-1
40ae115bc7Smrj #define	CONS_SCREEN_TEXT	0
41*0d928757SGary Mills #define	CONS_TTY		1
42*0d928757SGary Mills #define	CONS_XXX		2	/* Unused */
43ae115bc7Smrj #define	CONS_USBSER		3
44843e1988Sjohnlev #define	CONS_HYPERVISOR		4
4567ce1dadSJan Setje-Eilers #define	CONS_SCREEN_GRAPHICS	5
46843e1988Sjohnlev 
47843e1988Sjohnlev #define	CONS_MIN	CONS_SCREEN_TEXT
4867ce1dadSJan Setje-Eilers #define	CONS_MAX	CONS_SCREEN_GRAPHICS
49ae115bc7Smrj 
50ae115bc7Smrj #define	CONS_COLOR	7
51ae115bc7Smrj 
52ae115bc7Smrj extern void kb_init(void);
53ae115bc7Smrj extern int kb_getchar(void);
54ae115bc7Smrj extern int kb_ischar(void);
55ae115bc7Smrj 
56*0d928757SGary Mills extern int boot_console_type(int *);
57*0d928757SGary Mills 
58ae115bc7Smrj extern void bcons_init(char *);
59ae115bc7Smrj extern void bcons_putchar(int);
60ae115bc7Smrj extern int bcons_getchar(void);
61ae115bc7Smrj extern int bcons_ischar(void);
62ae115bc7Smrj extern int bcons_gets(char *, int);
63ae115bc7Smrj 
64843e1988Sjohnlev #if !defined(_BOOT)
65843e1988Sjohnlev extern void bcons_init2(char *, char *, char *);
66843e1988Sjohnlev extern boolean_t bcons_hypervisor_redirect(void);
67843e1988Sjohnlev extern void bcons_device_change(int);
68843e1988Sjohnlev #endif /* !_BOOT */
69843e1988Sjohnlev 
70ae115bc7Smrj #ifdef __cplusplus
71ae115bc7Smrj }
72ae115bc7Smrj #endif
73ae115bc7Smrj 
74ae115bc7Smrj #endif /* _BOOT_CONSOLE_H */
75