xencons.h revision 843e19887f64dde75055cf8842fc4db2171eff45
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_XENCONS_H
#define _SYS_XENCONS_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/dditypes.h>
/*
*
*/
#ifdef DEBUG
#else
#endif
/* enum value for sw and hw flow control action */
typedef enum {
/*
* Console instance data.
* Each of the fields in this structure is required to be protected by a
* mutex lock at the highest priority at which it can be altered.
*/
struct xencons {
int flags; /* random flags */
int unit; /* which port */
int polldix; /* polled data buffer index */
int polllen; /* polled data buffer length */
int console_irq; /* dom0 console interrupt */
int evtchn; /* console event channel */
};
/*
* Asychronous protocol private data structure for ASY.
* Each of the fields in the structure is required to be protected by
* the lower priority lock except the fields that are set only at
* base level but cleared (with out lock) at interrupt level.
*/
struct asyncline {
int async_flags; /* random flags */
/*
* The following fields are protected by the excl_hi lock.
* Some, such as async_flowc, are set only at the base level and
* cleared (without the lock) only by the interrupt level.
*/
int async_ocnt; /* output count */
int async_inflow_source; /* input flow control type */
union {
struct {
} _a;
} async_uover;
short async_ext; /* modem status change count */
short async_work; /* work to do flag */
};
/* definitions for async_flags field */
/* needed to be sent */
/* because of transition of flow */
/* control from stop to start */
/* definitions for asy_flags field */
#define ASY_CONSOLE 0x00000080
/* definitions for async_inflow_source field in struct asyncline */
#define IN_FLOW_NULL 0x00000000
#define IN_FLOW_STREAMS 0x00000002
#define IN_FLOW_USER 0x00000004
#ifdef __cplusplus
}
#endif
#endif /* _SYS_XENCONS_H */