xref: /netbsd-src/sys/arch/vax/vax/gencons.h (revision ee918b29e1ca494b866845d941c9d30ab6dca848)
1 /*	$NetBSD: gencons.h,v 1.11 2017/05/22 16:46:15 ragge Exp $ */
2 
3 /*
4  * Copyright (c) 1994 Ludd, University of Lule}, Sweden.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  *
27  */
28 
29  /* All bugs are subject to removal without further notice */
30 
31 /*
32  * Some definitions for generic console interface (PR 32-35)
33  */
34 
35 /* PR_TXCS */
36 #define	GC_RDY	0x80	/* Console ready to xmit chr */
37 #define	GC_TIE	0x40	/* xmit interrupt enable */
38 #define	GC_LT	0x80000	/* VAX8600: Enable logical terminal */
39 #define	GC_WRT	0x8000	/* VAX8600: Allow mtpr's to console */
40 
41 /* PR_RXCS */
42 #define	GC_DON	0x80	/* character received */
43 #define	GC_RIE	0x40	/* recv interrupt enable */
44 
45 /* PR_RXDB */
46 #define	GC_ERR	0x8000	/* received character error */
47 #define	GC_CON	0xf00	/* mfpr($PR_RXDB)&GC_CON==0 then console chr */
48 
49 /* PR_TXDB */
50 #define	GC_CONS	0xf00	/* Console software !8600 */
51 #define	GC_BTFL	0x2	/* boot machine */
52 #define	GC_CWFL	0x3	/* clear warm start flag */
53 #define	GC_CCFL	0x4	/* clear cold start flag */
54 
55 /* Interrupt vectors used */
56 #define	SCB_G0R	0xf8
57 #define	SCB_G0T	0xfc
58 #define	SCB_G1R	0xc8
59 #define	SCB_G1T	0xcc
60 #define	SCB_G2R	0xd0
61 #define	SCB_G2T	0xd4
62 #define	SCB_G3R	0xd8
63 #define	SCB_G3T	0xdc
64 
65 /* Prototypes */
66 void	gencnputc(dev_t, int);
67 void	gencnstarttx(void);
68