10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 51253Slq150181 * Common Development and Distribution License (the "License"). 61253Slq150181 * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 211253Slq150181 220Sstevel@tonic-gate /* 23*10783SVincent.Wang@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 240Sstevel@tonic-gate * Use is subject to license terms. 250Sstevel@tonic-gate */ 260Sstevel@tonic-gate 270Sstevel@tonic-gate #ifndef _SYS_CONSCONFIG_DACF_H 280Sstevel@tonic-gate #define _SYS_CONSCONFIG_DACF_H 290Sstevel@tonic-gate 300Sstevel@tonic-gate #ifdef __cplusplus 310Sstevel@tonic-gate extern "C" { 320Sstevel@tonic-gate #endif 330Sstevel@tonic-gate 340Sstevel@tonic-gate #define CONS_MS 1 350Sstevel@tonic-gate #define CONS_KBD 2 360Sstevel@tonic-gate 370Sstevel@tonic-gate /* 380Sstevel@tonic-gate * This structure contains information about keyboard 390Sstevel@tonic-gate * and mouse used for auto-configuration. 400Sstevel@tonic-gate */ 410Sstevel@tonic-gate typedef struct cons_prop { 420Sstevel@tonic-gate struct cons_prop *cp_next; 430Sstevel@tonic-gate int cp_type; 440Sstevel@tonic-gate dev_t cp_dev; 450Sstevel@tonic-gate int cp_muxid; 460Sstevel@tonic-gate char *cp_pushmod; 470Sstevel@tonic-gate } cons_prop_t; 480Sstevel@tonic-gate 490Sstevel@tonic-gate /* 500Sstevel@tonic-gate * This structure contains information about the console 510Sstevel@tonic-gate */ 520Sstevel@tonic-gate typedef struct cons_state { 530Sstevel@tonic-gate char *cons_keyboard_path; /* Keyboard path */ 540Sstevel@tonic-gate char *cons_mouse_path; /* Mouse path */ 550Sstevel@tonic-gate char *cons_stdin_path; /* Standard input path */ 560Sstevel@tonic-gate char *cons_stdout_path; /* Standard output path */ 570Sstevel@tonic-gate 580Sstevel@tonic-gate char *cons_fb_path; /* Frame Buffer path */ 590Sstevel@tonic-gate 600Sstevel@tonic-gate int cons_input_type; /* Type of console input (See below) */ 610Sstevel@tonic-gate int cons_keyboard_problem; /* problem with console keyboard */ 620Sstevel@tonic-gate 630Sstevel@tonic-gate ldi_ident_t cons_li; 640Sstevel@tonic-gate vnode_t *cons_wc_vp; 650Sstevel@tonic-gate 660Sstevel@tonic-gate ldi_handle_t conskbd_lh; 670Sstevel@tonic-gate int conskbd_muxid; 680Sstevel@tonic-gate 690Sstevel@tonic-gate ldi_handle_t consms_lh; 700Sstevel@tonic-gate dev_t consms_dev; 710Sstevel@tonic-gate 720Sstevel@tonic-gate kmutex_t cons_lock; 730Sstevel@tonic-gate 740Sstevel@tonic-gate cons_prop_t *cons_km_prop; 755974Sjm22469 int cons_tem_supported; 765974Sjm22469 int cons_stdin_is_kbd; 775974Sjm22469 int cons_stdout_is_fb; 78*10783SVincent.Wang@Sun.COM boolean_t cons_initialized; 790Sstevel@tonic-gate } cons_state_t; 800Sstevel@tonic-gate 810Sstevel@tonic-gate /* 820Sstevel@tonic-gate * Types of console input 830Sstevel@tonic-gate */ 840Sstevel@tonic-gate #define CONSOLE_LOCAL 0x1 /* keyboard */ 850Sstevel@tonic-gate #define CONSOLE_TIP 0x2 /* serial line */ 860Sstevel@tonic-gate #define CONSOLE_SERIAL_KEYBOARD 0x4 /* serial kbd */ 870Sstevel@tonic-gate 880Sstevel@tonic-gate /* 890Sstevel@tonic-gate * These macros indicate the state of the system while 900Sstevel@tonic-gate * the console configuration is running. 910Sstevel@tonic-gate * CONSCONFIG_BOOTING implies that the driver loading 920Sstevel@tonic-gate * is in process during boot. CONSCONFIG_DRIVERS_LOADED 930Sstevel@tonic-gate * means that the driver loading during boot has completed. 940Sstevel@tonic-gate * 950Sstevel@tonic-gate * During driver loading while the boot is happening, the 960Sstevel@tonic-gate * keyboard and mouse minor nodes that are hooked into the console 970Sstevel@tonic-gate * stream must match those defined by the firmware. After boot 980Sstevel@tonic-gate * minor nodes are hooked according to a first come first serve 990Sstevel@tonic-gate * basis. 1000Sstevel@tonic-gate */ 1010Sstevel@tonic-gate #define CONSCONFIG_BOOTING 1 1020Sstevel@tonic-gate #define CONSCONFIG_DRIVERS_LOADED 0 1030Sstevel@tonic-gate 1040Sstevel@tonic-gate /* 1050Sstevel@tonic-gate * Debug information 1060Sstevel@tonic-gate * Severity levels for printing 1070Sstevel@tonic-gate */ 1080Sstevel@tonic-gate #define DPRINT_L0 0 /* print every message */ 1090Sstevel@tonic-gate #define DPRINT_L1 1 /* debug */ 1100Sstevel@tonic-gate #define DPRINT_L2 2 /* minor errors */ 1110Sstevel@tonic-gate #define DPRINT_L3 3 /* major errors */ 1120Sstevel@tonic-gate #define DPRINT_L4 4 /* catastrophic errors */ 1130Sstevel@tonic-gate 1140Sstevel@tonic-gate #define DPRINTF consconfig_dprintf 1150Sstevel@tonic-gate 1160Sstevel@tonic-gate extern void kadb_uses_kernel(void); 1170Sstevel@tonic-gate 1180Sstevel@tonic-gate #ifdef __cplusplus 1190Sstevel@tonic-gate } 1200Sstevel@tonic-gate #endif 1210Sstevel@tonic-gate 1220Sstevel@tonic-gate #endif /* _SYS_CONSCONFIG_DACF_H */ 123