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 /* 220d928757SGary Mills * Copyright (c) 2012 Gary Mills 230d928757SGary 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 39*b9a86732SToomas Soome #include <sys/bootinfo.h> 40*b9a86732SToomas Soome 41ae115bc7Smrj #define CONS_INVALID -1 42ae115bc7Smrj #define CONS_SCREEN_TEXT 0 430d928757SGary Mills #define CONS_TTY 1 440d928757SGary Mills #define CONS_XXX 2 /* Unused */ 45ae115bc7Smrj #define CONS_USBSER 3 46843e1988Sjohnlev #define CONS_HYPERVISOR 4 4767ce1dadSJan Setje-Eilers #define CONS_SCREEN_GRAPHICS 5 48843e1988Sjohnlev 49843e1988Sjohnlev #define CONS_MIN CONS_SCREEN_TEXT 5067ce1dadSJan Setje-Eilers #define CONS_MAX CONS_SCREEN_GRAPHICS 51ae115bc7Smrj 52ae115bc7Smrj #define CONS_COLOR 7 53ae115bc7Smrj 54ae115bc7Smrj extern void kb_init(void); 55ae115bc7Smrj extern int kb_getchar(void); 56ae115bc7Smrj extern int kb_ischar(void); 57ae115bc7Smrj 58*b9a86732SToomas Soome /* Read property from command line or environment. */ 59*b9a86732SToomas Soome extern const char *find_boot_prop(const char *); 60*b9a86732SToomas Soome 610d928757SGary Mills extern int boot_console_type(int *); 620d928757SGary Mills 63*b9a86732SToomas Soome extern void bcons_init(struct xboot_info *); 64ae115bc7Smrj extern void bcons_putchar(int); 65ae115bc7Smrj extern int bcons_getchar(void); 66ae115bc7Smrj extern int bcons_ischar(void); 67ae115bc7Smrj extern int bcons_gets(char *, int); 68ae115bc7Smrj 69843e1988Sjohnlev #if !defined(_BOOT) 70843e1988Sjohnlev extern void bcons_init2(char *, char *, char *); 71843e1988Sjohnlev extern boolean_t bcons_hypervisor_redirect(void); 72843e1988Sjohnlev extern void bcons_device_change(int); 73843e1988Sjohnlev #endif /* !_BOOT */ 74843e1988Sjohnlev 75ae115bc7Smrj #ifdef __cplusplus 76ae115bc7Smrj } 77ae115bc7Smrj #endif 78ae115bc7Smrj 79ae115bc7Smrj #endif /* _BOOT_CONSOLE_H */ 80