xref: /original-bsd/sys/i386/i386/cons.h (revision ba762ddc)
1 /*
2  * Copyright (c) 1988 University of Utah.
3  * Copyright (c) 1990 The Regents of the University of California.
4  * All rights reserved.
5  *
6  * This code is derived from software contributed to Berkeley by
7  * the Systems Programming Group of the University of Utah Computer
8  * Science Department.
9  *
10  * Redistribution and use in source and binary forms are permitted provided
11  * that: (1) source distributions retain this entire copyright notice and
12  * comment, and (2) distributions including binaries display the following
13  * acknowledgement:  ``This product includes software developed by the
14  * University of California, Berkeley and its contributors'' in the
15  * documentation or other materials provided with the distribution and in
16  * all advertising materials mentioning features or use of this software.
17  * Neither the name of the University nor the names of its contributors may
18  * be used to endorse or promote products derived from this software without
19  * specific prior written permission.
20  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
21  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
22  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
23  *
24  * from: Utah $Hdr: cons.h 1.1 90/07/09$
25  *
26  *	@(#)cons.h	7.3 (Berkeley) 11/2/90
27  */
28 
29 struct consdev {
30 	int	(*cn_probe)();	/* probe hardware and fill in consdev info */
31 	int	(*cn_init)();	/* turn on as console */
32 	int	(*cn_getc)();	/* kernel getchar interface */
33 	int	(*cn_putc)();	/* kernel putchar interface */
34 	struct	tty *cn_tp;	/* tty structure for console device */
35 	dev_t	cn_dev;		/* major/minor of device */
36 	short	cn_pri;		/* pecking order; the higher the better */
37 };
38 
39 /* values for cn_pri - reflect our policy for console selection */
40 #define	CN_DEAD		0	/* device doesn't exist */
41 #define CN_NORMAL	1	/* device exists but is nothing special */
42 #define CN_INTERNAL	2	/* "internal" bit-mapped display */
43 #define CN_REMOTE	3	/* serial interface with remote bit set */
44 
45 /* XXX */
46 #define	CONSMAJOR	0
47 
48 #ifdef KERNEL
49 extern	struct consdev constab[];
50 extern	struct consdev *cn_tab;
51 extern	struct tty *cn_tty;
52 #endif
53