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 */
57 char *cons_diag_path
; /* Diag device path */
59 char *cons_fb_path
; /* Frame Buffer path */
61 int cons_input_type
; /* Type of console input (See below) */
62 int cons_keyboard_problem
; /* problem with console keyboard */
67 ldi_handle_t conskbd_lh
;
70 ldi_handle_t consms_lh
;
75 cons_prop_t
*cons_km_prop
;
76 int cons_tem_supported
;
77 int cons_stdin_is_kbd
;
78 int cons_stdout_is_fb
;
79 boolean_t cons_initialized
;
83 * Types of console input
85 #define CONSOLE_LOCAL 0x1 /* keyboard */
86 #define CONSOLE_TIP 0x2 /* serial line */
87 #define CONSOLE_SERIAL_KEYBOARD 0x4 /* serial kbd */
90 * These macros indicate the state of the system while
91 * the console configuration is running.
92 * CONSCONFIG_BOOTING implies that the driver loading
93 * is in process during boot. CONSCONFIG_DRIVERS_LOADED
94 * means that the driver loading during boot has completed.
96 * During driver loading while the boot is happening, the
97 * keyboard and mouse minor nodes that are hooked into the console
98 * stream must match those defined by the firmware. After boot
99 * minor nodes are hooked according to a first come first serve
102 #define CONSCONFIG_BOOTING 1
103 #define CONSCONFIG_DRIVERS_LOADED 0
107 * Severity levels for printing
109 #define DPRINT_L0 0 /* print every message */
110 #define DPRINT_L1 1 /* debug */
111 #define DPRINT_L2 2 /* minor errors */
112 #define DPRINT_L3 3 /* major errors */
113 #define DPRINT_L4 4 /* catastrophic errors */
115 #define DPRINTF consconfig_dprintf
117 extern void kadb_uses_kernel(void);
123 #endif /* _SYS_CONSCONFIG_DACF_H */