1 0 stevel /* 2 0 stevel * CDDL HEADER START 3 0 stevel * 4 0 stevel * The contents of this file are subject to the terms of the 5 1253 lq150181 * Common Development and Distribution License (the "License"). 6 1253 lq150181 * You may not use this file except in compliance with the License. 7 0 stevel * 8 0 stevel * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 0 stevel * or http://www.opensolaris.org/os/licensing. 10 0 stevel * See the License for the specific language governing permissions 11 0 stevel * and limitations under the License. 12 0 stevel * 13 0 stevel * When distributing Covered Code, include this CDDL HEADER in each 14 0 stevel * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 0 stevel * If applicable, add the following below this CDDL HEADER, with the 16 0 stevel * fields enclosed by brackets "[]" replaced with your own identifying 17 0 stevel * information: Portions Copyright [yyyy] [name of copyright owner] 18 0 stevel * 19 0 stevel * CDDL HEADER END 20 0 stevel */ 21 1253 lq150181 22 0 stevel /* 23 10783 Vincent * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24 0 stevel * Use is subject to license terms. 25 0 stevel */ 26 0 stevel 27 0 stevel #ifndef _SYS_CONSCONFIG_DACF_H 28 0 stevel #define _SYS_CONSCONFIG_DACF_H 29 0 stevel 30 0 stevel #ifdef __cplusplus 31 0 stevel extern "C" { 32 0 stevel #endif 33 0 stevel 34 0 stevel #define CONS_MS 1 35 0 stevel #define CONS_KBD 2 36 0 stevel 37 0 stevel /* 38 0 stevel * This structure contains information about keyboard 39 0 stevel * and mouse used for auto-configuration. 40 0 stevel */ 41 0 stevel typedef struct cons_prop { 42 0 stevel struct cons_prop *cp_next; 43 0 stevel int cp_type; 44 0 stevel dev_t cp_dev; 45 0 stevel int cp_muxid; 46 0 stevel char *cp_pushmod; 47 0 stevel } cons_prop_t; 48 0 stevel 49 0 stevel /* 50 0 stevel * This structure contains information about the console 51 0 stevel */ 52 0 stevel typedef struct cons_state { 53 0 stevel char *cons_keyboard_path; /* Keyboard path */ 54 0 stevel char *cons_mouse_path; /* Mouse path */ 55 0 stevel char *cons_stdin_path; /* Standard input path */ 56 0 stevel char *cons_stdout_path; /* Standard output path */ 57 0 stevel 58 0 stevel char *cons_fb_path; /* Frame Buffer path */ 59 0 stevel 60 0 stevel int cons_input_type; /* Type of console input (See below) */ 61 0 stevel int cons_keyboard_problem; /* problem with console keyboard */ 62 0 stevel 63 0 stevel ldi_ident_t cons_li; 64 0 stevel vnode_t *cons_wc_vp; 65 0 stevel 66 0 stevel ldi_handle_t conskbd_lh; 67 0 stevel int conskbd_muxid; 68 0 stevel 69 0 stevel ldi_handle_t consms_lh; 70 0 stevel dev_t consms_dev; 71 0 stevel 72 0 stevel kmutex_t cons_lock; 73 0 stevel 74 0 stevel cons_prop_t *cons_km_prop; 75 5974 jm22469 int cons_tem_supported; 76 5974 jm22469 int cons_stdin_is_kbd; 77 5974 jm22469 int cons_stdout_is_fb; 78 10783 Vincent boolean_t cons_initialized; 79 0 stevel } cons_state_t; 80 0 stevel 81 0 stevel /* 82 0 stevel * Types of console input 83 0 stevel */ 84 0 stevel #define CONSOLE_LOCAL 0x1 /* keyboard */ 85 0 stevel #define CONSOLE_TIP 0x2 /* serial line */ 86 0 stevel #define CONSOLE_SERIAL_KEYBOARD 0x4 /* serial kbd */ 87 0 stevel 88 0 stevel /* 89 0 stevel * These macros indicate the state of the system while 90 0 stevel * the console configuration is running. 91 0 stevel * CONSCONFIG_BOOTING implies that the driver loading 92 0 stevel * is in process during boot. CONSCONFIG_DRIVERS_LOADED 93 0 stevel * means that the driver loading during boot has completed. 94 0 stevel * 95 0 stevel * During driver loading while the boot is happening, the 96 0 stevel * keyboard and mouse minor nodes that are hooked into the console 97 0 stevel * stream must match those defined by the firmware. After boot 98 0 stevel * minor nodes are hooked according to a first come first serve 99 0 stevel * basis. 100 0 stevel */ 101 0 stevel #define CONSCONFIG_BOOTING 1 102 0 stevel #define CONSCONFIG_DRIVERS_LOADED 0 103 0 stevel 104 0 stevel /* 105 0 stevel * Debug information 106 0 stevel * Severity levels for printing 107 0 stevel */ 108 0 stevel #define DPRINT_L0 0 /* print every message */ 109 0 stevel #define DPRINT_L1 1 /* debug */ 110 0 stevel #define DPRINT_L2 2 /* minor errors */ 111 0 stevel #define DPRINT_L3 3 /* major errors */ 112 0 stevel #define DPRINT_L4 4 /* catastrophic errors */ 113 0 stevel 114 0 stevel #define DPRINTF consconfig_dprintf 115 0 stevel 116 0 stevel extern void kadb_uses_kernel(void); 117 0 stevel 118 0 stevel #ifdef __cplusplus 119 0 stevel } 120 0 stevel #endif 121 0 stevel 122 0 stevel #endif /* _SYS_CONSCONFIG_DACF_H */ 123