1: /*
2: * Copyright (c) 1985, 1986 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: *
6: * @(#)dmzreg.h 7.1 (Berkeley) 6/5/86
7: */
8:
9: /*
10: * HISTORY
11: * 23-Apr-85 Joe Camaratta (jcc) at Siemens RTL
12: * Header file for DEC's DMZ32
13: */
14:
15: struct dmzdevice {
16: short dmz_config; /* configuration cntl and status register */
17: short dmz_diag; /* diagnostic control and status register */
18: struct {
19: short octet_csr; /* octet control and status */
20: short octet_lprm; /* line parameter */
21: union{
22: short octet_rb; /* receiver buffer */
23: short octet_rsp; /* receive silo parameter */
24: } octet_receive;
25: union{
26: u_short word; /* word */
27: u_char bytes[2]; /* bytes */
28: } octet_ir; /* indirect registers */
29: } octet[3];
30: short dmz_unused[2];
31: };
32:
33: #define octet_sato octet_rsp
34:
35: /* aliases for asynchronous indirect control registers */
36: #define IR_TBUF 000 /* transmit character */
37: #define IR_RMSTSC 000 /* receive modem status, transmit silo count */
38: #define IR_LCTMR 010 /* line control and transmit modem */
39: #define IR_TBA 020 /* transmit buffer address register */
40: #define IR_TCC 030 /* transmit character count (DMA) */
41:
42: #define octet_tbf octet_ir.bytes[0] /* transmit buffer */
43: #define octet_tbf2 octet_ir.word /* transmit buffer, 2 chars */
44: #define octet_rmstsc octet_ir.word /* rcv modem status, xmit silo count */
45: #define octet_lctmr octet_ir.word /* line control, xmit modem */
46: #define octet_tba octet_ir.word /* transmit buffer address */
47: #define octet_tcc octet_ir.word /* transmit character count */
48:
49: /* bits in octet_csr */
50: #define DMZ_TRDY 0100000 /* transmit ready */
51: #define DMZ_TIE 0040000 /* transmit interrupt enable */
52: #define DMZ_NXM 0030000 /* non-existant memory */
53: #define DMZ_LIN 0003400 /* transmit line number */
54: #define DMZ_RRDY 0000200 /* receiver data available */
55: #define DMZ_RIE 0000100 /* receiver interrupt enable */
56: #define DMZ_RESET 0000040 /* master reset */
57: #define DMZ_IAD 0000037 /* indirect address register */
58:
59: #define DMZ_IE (DMZ_TIE | DMZ_RIE) /* enable transmit and receive */
60:
61: /* bits in octet_lprm (taken from dmfreg.h) */
62: #define DMZ_6BT 0010 /* 6 bits per character */
63: #define DMZ_7BT 0020 /* 7 bits per character */
64: #define DMZ_8BT 0030 /* 8 bits per character */
65: #define DMZ_PEN 0040 /* parity enable */
66: #define DMZ_EPR 0100 /* even parity */
67: #define DMZ_SCD 0200 /* stop code */
68: #define DMZ_XTE 0170000 /* transmit rate */
69: #define DMZ_RRT 0007400 /* receive rate */
70: #define DMZ_LSL 0000007 /* line select */
71:
72: /* baud rates */
73: #define BR_50 000
74: #define BR_75 001
75: #define BR_110 002
76: #define BR_134_5 003
77: #define BR_150 004
78: #define BR_300 005
79: #define BR_600 006
80: #define BR_1200 007
81: #define BR_1800 010
82: #define BR_2000 011
83: #define BR_2400 012
84: #define BR_3600 013
85: #define BR_4800 014
86: #define BR_7200 015
87: #define BR_9600 016
88: #define BR_19200 017
89:
90: /* bits in octet_rb (taken from dmfreg.h) */
91: #define DMZ_DSC 0004000 /* data set change */
92: #define DMZ_PE 0010000 /* parity error */
93: #define DMZ_FE 0020000 /* framing error */
94: #define DMZ_DO 0040000 /* data overrun */
95: #define DMZ_DV 0100000 /* data valid */
96: #define DMZ_RL 0003400 /* line */
97: #define DMZ_RD 0000377 /* data */
98: #define DMZ_AT 0000377 /* alarm timeout */
99:
100: /* bits in dmz_rmstsc */
101: #define DMZ_TSC 0x00ff /* transmit silo count */
102: #define DMZ_USRR 0x0400 /* user modem signal (pin 25) */
103: #define DMF_SR 0x0800 /* secondary receive */
104: #define DMZ_CTS 0x1000 /* clear to send */
105: #define DMZ_CAR 0x2000 /* carrier detect */
106: #define DMZ_RNG 0x4000 /* ring */
107: #define DMZ_DSR 0x8000 /* data set ready */
108:
109: /* bits in dmz_lctmr (tms half) */
110: #define DMZ_USRW 0x0100 /* user modem signal (pin 18) */
111: #define DMZ_DTR 0x0200 /* data terminal ready */
112: #define DMZ_RATE 0x0400 /* data signal rate select */
113: #define DMF_ST 0x0800 /* secondary transmit */
114: #define DMZ_RTS 0x1000 /* request to send */
115: #define DMZ_PREEMPT 0x8000 /* preempt output */
116:
117: /* bits in octet_lctmr (lc half) */
118: #define DMZ_MIE 0040 /* modem interrupt enable */
119: #define DMZ_FLS 0020 /* flush transmit silo */
120: #define DMZ_BRK 0010 /* send break bit */
121: #define DMZ_RE 0004 /* receive enable */
122: #define DMZ_AUT 0002 /* auto XON/XOFF */
123: #define DMZ_TE 0001 /* transmit enable */
124: #define DMZ_CF 0300 /* control function */
125:
126: #define DMZ_LCE (DMZ_MIE|DMZ_RE|DMZ_TE)
127: #define DMZ_ON (DMZ_DTR|DMZ_RTS|DMZ_LCE)
128: #define DMZ_OFF DMZ_LCE
129:
130:
131: /* bits in octet_tcc */
132: #define DMZ_HA 0140000 /* high address bits */
133:
134: /* bits added to dm lsr for DMGET/DMSET */
135: #define DML_USR 0001000 /* usr modem sig, not a real DM bit */
136: #define DML_DSR 0000400 /* data set ready, not a real DM bit */
137:
138: #define DMZ_SIZ 32 /* size of DMZ output silo (per line) */
139:
140: #define DMZ(a) (a/24)
141: #define OCTET(a) ((a%24)/8)
142: #define LINE(a) ((a%24)%8)
143:
144: #define DMZ_NOC_MASK 03
145: #define DMZ_INTERFACE 000
Defined struct's
dmzdevice
defined in line
15; used 38 times
- in /usr/src/sys/vaxuba/dmz.c line
121-124(4),
146(2),
163(2),
182(2),
248(2),
256(2),
314(2),
323(2),
406(2),
416(2),
489(2),
495(2),
532(2),
542(2),
643-647(4),
727(2),
733(2)
Defined macros
BR_50
defined in line
73;
never used
BR_75
defined in line
74;
never used
DMZ
defined in line
140; used 3 times
DMZ_IE
defined in line
59; used 12 times
- in /usr/src/sys/vaxuba/dmz.c line
204,
333,
424,
511,
558,
601,
618,
627,
651,
736-739(2),
759
LINE
defined in line
142;
never used
Usage of this include