da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER START
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The contents of this file are subject to the terms of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Common Development and Distribution License (the "License").
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You may not use this file except in compliance with the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * See the License for the specific language governing permissions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and limitations under the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * When distributing Covered Code, include this CDDL HEADER in each
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If applicable, add the following below this CDDL HEADER, with the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * fields enclosed by brackets "[]" replaced with your own identifying
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * information: Portions Copyright [yyyy] [name of copyright owner]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER END
575bd8a230f2c20b1878ebb473c30a12f0eb1b2emarks * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Use is subject to license terms.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#pragma ident "%Z%%M% %I% %E% SMI"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwextern "C" {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Console driver
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * There is no hardware serial port is provided. A standalone
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * co-processor SC acts as console device. The communication
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * between SC and a domain is via SRAM on the choosen I/O board.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This driver manipulates SRAM from domain Solaris side.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Logically there are two sets of interfaces defined here.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The first part describes IOSRAM structures and will be
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * exposed to all relevant clients, like SC, OBP.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The second part defines internal driver data structure
575bd8a230f2c20b1878ebb473c30a12f0eb1b2emarks * used by sgcn dirver.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IOSRAM structure
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Solaris and OBP use separate console buffers. But they share
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the same console buffer structure.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * +---------------+ <- console buffer base address (BASE)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * | header |
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * +---------------+ <- cnsram_in_begin + BASE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * | input |
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * | buffer | <- cnsram_in_rdptr + BASE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * | | <- cnsram_in_wrptr + BASE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * +---------------+ <- cnsram_in_end + BASE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * |///////////////|
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * |///////////////| <- reserved for future expansion
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * |///////////////|
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * +---------------+ <- cnsram_out_begin + BASE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * | output |
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * | buffer | <- cnsram_out_rdptr + BASE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * | | <- cnsram_out_wrptr + BASE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * +---------------+ <- cnsram_out_end + BASE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * |///////////////|
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * |///////////////| <- reserved for future expansion
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * |///////////////|
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * +---------------+ <- cnsram_size + BASE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Console IOSRAM header structure
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The header size is fixed, despite of 32-bit or 64-bit Solaris
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwtypedef struct {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the followings are all relative to beginning of console buffer
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sgcn driver's soft state structure
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw /* mutexes */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw /* these are required by sbbc driver */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw kmutex_t sgcn_sbbc_outspace_lock; /* output data lock */
extern void (*abort_seq_handler)();
#ifdef __cplusplus