4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_CONSCONFIG_DACF_H
28 #define _SYS_CONSCONFIG_DACF_H
38 * This structure contains information about keyboard
39 * and mouse used for auto-configuration.
41 typedef struct cons_prop
{
42 struct cons_prop
*cp_next
;
50 * This structure contains information about the console
52 typedef struct cons_state
{
53 char *cons_keyboard_path
; /* Keyboard path */
54 char *cons_mouse_path
; /* Mouse path */
55 char *cons_stdin_path
; /* Standard input path */
56 char *cons_stdout_path
; /* Standard output path */
58 char *cons_fb_path
; /* Frame Buffer path */
60 int cons_input_type
; /* Type of console input (See below) */
61 int cons_keyboard_problem
; /* problem with console keyboard */
66 ldi_handle_t conskbd_lh
;
69 ldi_handle_t consms_lh
;
74 cons_prop_t
*cons_km_prop
;
75 int cons_tem_supported
;
76 int cons_stdin_is_kbd
;
77 int cons_stdout_is_fb
;
78 boolean_t cons_initialized
;
82 * Types of console input
84 #define CONSOLE_LOCAL 0x1 /* keyboard */
85 #define CONSOLE_TIP 0x2 /* serial line */
86 #define CONSOLE_SERIAL_KEYBOARD 0x4 /* serial kbd */
89 * These macros indicate the state of the system while
90 * the console configuration is running.
91 * CONSCONFIG_BOOTING implies that the driver loading
92 * is in process during boot. CONSCONFIG_DRIVERS_LOADED
93 * means that the driver loading during boot has completed.
95 * During driver loading while the boot is happening, the
96 * keyboard and mouse minor nodes that are hooked into the console
97 * stream must match those defined by the firmware. After boot
98 * minor nodes are hooked according to a first come first serve
101 #define CONSCONFIG_BOOTING 1
102 #define CONSCONFIG_DRIVERS_LOADED 0
106 * Severity levels for printing
108 #define DPRINT_L0 0 /* print every message */
109 #define DPRINT_L1 1 /* debug */
110 #define DPRINT_L2 2 /* minor errors */
111 #define DPRINT_L3 3 /* major errors */
112 #define DPRINT_L4 4 /* catastrophic errors */
114 #define DPRINTF consconfig_dprintf
116 extern void kadb_uses_kernel(void);
122 #endif /* _SYS_CONSCONFIG_DACF_H */