17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5fea9cb91Slq150181 * Common Development and Distribution License (the "License"). 6fea9cb91Slq150181 * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 21fea9cb91Slq150181 227c478bd9Sstevel@tonic-gate /* 23*40482326SVincent Wang * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate * Use is subject to license terms. 257c478bd9Sstevel@tonic-gate */ 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate #ifndef _SYS_CONSCONFIG_DACF_H 287c478bd9Sstevel@tonic-gate #define _SYS_CONSCONFIG_DACF_H 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate #ifdef __cplusplus 317c478bd9Sstevel@tonic-gate extern "C" { 327c478bd9Sstevel@tonic-gate #endif 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gate #define CONS_MS 1 357c478bd9Sstevel@tonic-gate #define CONS_KBD 2 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gate /* 387c478bd9Sstevel@tonic-gate * This structure contains information about keyboard 397c478bd9Sstevel@tonic-gate * and mouse used for auto-configuration. 407c478bd9Sstevel@tonic-gate */ 417c478bd9Sstevel@tonic-gate typedef struct cons_prop { 427c478bd9Sstevel@tonic-gate struct cons_prop *cp_next; 437c478bd9Sstevel@tonic-gate int cp_type; 447c478bd9Sstevel@tonic-gate dev_t cp_dev; 457c478bd9Sstevel@tonic-gate int cp_muxid; 467c478bd9Sstevel@tonic-gate char *cp_pushmod; 477c478bd9Sstevel@tonic-gate } cons_prop_t; 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gate /* 507c478bd9Sstevel@tonic-gate * This structure contains information about the console 517c478bd9Sstevel@tonic-gate */ 527c478bd9Sstevel@tonic-gate typedef struct cons_state { 537c478bd9Sstevel@tonic-gate char *cons_keyboard_path; /* Keyboard path */ 547c478bd9Sstevel@tonic-gate char *cons_mouse_path; /* Mouse path */ 557c478bd9Sstevel@tonic-gate char *cons_stdin_path; /* Standard input path */ 567c478bd9Sstevel@tonic-gate char *cons_stdout_path; /* Standard output path */ 577c478bd9Sstevel@tonic-gate 587c478bd9Sstevel@tonic-gate char *cons_fb_path; /* Frame Buffer path */ 597c478bd9Sstevel@tonic-gate 607c478bd9Sstevel@tonic-gate int cons_input_type; /* Type of console input (See below) */ 617c478bd9Sstevel@tonic-gate int cons_keyboard_problem; /* problem with console keyboard */ 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gate ldi_ident_t cons_li; 647c478bd9Sstevel@tonic-gate vnode_t *cons_wc_vp; 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gate ldi_handle_t conskbd_lh; 677c478bd9Sstevel@tonic-gate int conskbd_muxid; 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gate ldi_handle_t consms_lh; 707c478bd9Sstevel@tonic-gate dev_t consms_dev; 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gate kmutex_t cons_lock; 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gate cons_prop_t *cons_km_prop; 751b83305cSjm22469 int cons_tem_supported; 761b83305cSjm22469 int cons_stdin_is_kbd; 771b83305cSjm22469 int cons_stdout_is_fb; 78*40482326SVincent Wang boolean_t cons_initialized; 797c478bd9Sstevel@tonic-gate } cons_state_t; 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gate /* 827c478bd9Sstevel@tonic-gate * Types of console input 837c478bd9Sstevel@tonic-gate */ 847c478bd9Sstevel@tonic-gate #define CONSOLE_LOCAL 0x1 /* keyboard */ 857c478bd9Sstevel@tonic-gate #define CONSOLE_TIP 0x2 /* serial line */ 867c478bd9Sstevel@tonic-gate #define CONSOLE_SERIAL_KEYBOARD 0x4 /* serial kbd */ 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gate /* 897c478bd9Sstevel@tonic-gate * These macros indicate the state of the system while 907c478bd9Sstevel@tonic-gate * the console configuration is running. 917c478bd9Sstevel@tonic-gate * CONSCONFIG_BOOTING implies that the driver loading 927c478bd9Sstevel@tonic-gate * is in process during boot. CONSCONFIG_DRIVERS_LOADED 937c478bd9Sstevel@tonic-gate * means that the driver loading during boot has completed. 947c478bd9Sstevel@tonic-gate * 957c478bd9Sstevel@tonic-gate * During driver loading while the boot is happening, the 967c478bd9Sstevel@tonic-gate * keyboard and mouse minor nodes that are hooked into the console 977c478bd9Sstevel@tonic-gate * stream must match those defined by the firmware. After boot 987c478bd9Sstevel@tonic-gate * minor nodes are hooked according to a first come first serve 997c478bd9Sstevel@tonic-gate * basis. 1007c478bd9Sstevel@tonic-gate */ 1017c478bd9Sstevel@tonic-gate #define CONSCONFIG_BOOTING 1 1027c478bd9Sstevel@tonic-gate #define CONSCONFIG_DRIVERS_LOADED 0 1037c478bd9Sstevel@tonic-gate 1047c478bd9Sstevel@tonic-gate /* 1057c478bd9Sstevel@tonic-gate * Debug information 1067c478bd9Sstevel@tonic-gate * Severity levels for printing 1077c478bd9Sstevel@tonic-gate */ 1087c478bd9Sstevel@tonic-gate #define DPRINT_L0 0 /* print every message */ 1097c478bd9Sstevel@tonic-gate #define DPRINT_L1 1 /* debug */ 1107c478bd9Sstevel@tonic-gate #define DPRINT_L2 2 /* minor errors */ 1117c478bd9Sstevel@tonic-gate #define DPRINT_L3 3 /* major errors */ 1127c478bd9Sstevel@tonic-gate #define DPRINT_L4 4 /* catastrophic errors */ 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gate #define DPRINTF consconfig_dprintf 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gate extern void kadb_uses_kernel(void); 1177c478bd9Sstevel@tonic-gate 1187c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1197c478bd9Sstevel@tonic-gate } 1207c478bd9Sstevel@tonic-gate #endif 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gate #endif /* _SYS_CONSCONFIG_DACF_H */ 123