1 /* 2 * CDDL HEADER START 3 * 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. 7 * 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. 12 * 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] 18 * 19 * CDDL HEADER END 20 */ 21 22 /* 23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _SYS_CONSCONFIG_DACF_H 28 #define _SYS_CONSCONFIG_DACF_H 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 #define CONS_MS 1 35 #define CONS_KBD 2 36 37 /* 38 * This structure contains information about keyboard 39 * and mouse used for auto-configuration. 40 */ 41 typedef struct cons_prop { 42 struct cons_prop *cp_next; 43 int cp_type; 44 dev_t cp_dev; 45 int cp_muxid; 46 char *cp_pushmod; 47 } cons_prop_t; 48 49 /* 50 * This structure contains information about the console 51 */ 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 58 char *cons_fb_path; /* Frame Buffer path */ 59 60 int cons_input_type; /* Type of console input (See below) */ 61 int cons_keyboard_problem; /* problem with console keyboard */ 62 63 ldi_ident_t cons_li; 64 vnode_t *cons_wc_vp; 65 66 ldi_handle_t conskbd_lh; 67 int conskbd_muxid; 68 69 ldi_handle_t consms_lh; 70 dev_t consms_dev; 71 72 kmutex_t cons_lock; 73 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 } cons_state_t; 79 80 /* 81 * Types of console input 82 */ 83 #define CONSOLE_LOCAL 0x1 /* keyboard */ 84 #define CONSOLE_TIP 0x2 /* serial line */ 85 #define CONSOLE_SERIAL_KEYBOARD 0x4 /* serial kbd */ 86 87 /* 88 * These macros indicate the state of the system while 89 * the console configuration is running. 90 * CONSCONFIG_BOOTING implies that the driver loading 91 * is in process during boot. CONSCONFIG_DRIVERS_LOADED 92 * means that the driver loading during boot has completed. 93 * 94 * During driver loading while the boot is happening, the 95 * keyboard and mouse minor nodes that are hooked into the console 96 * stream must match those defined by the firmware. After boot 97 * minor nodes are hooked according to a first come first serve 98 * basis. 99 */ 100 #define CONSCONFIG_BOOTING 1 101 #define CONSCONFIG_DRIVERS_LOADED 0 102 103 /* 104 * Debug information 105 * Severity levels for printing 106 */ 107 #define DPRINT_L0 0 /* print every message */ 108 #define DPRINT_L1 1 /* debug */ 109 #define DPRINT_L2 2 /* minor errors */ 110 #define DPRINT_L3 3 /* major errors */ 111 #define DPRINT_L4 4 /* catastrophic errors */ 112 113 #define DPRINTF consconfig_dprintf 114 115 extern void kadb_uses_kernel(void); 116 117 #ifdef __cplusplus 118 } 119 #endif 120 121 #endif /* _SYS_CONSCONFIG_DACF_H */ 122