xref: /original-bsd/sys/vax/if/if_acpreg.h (revision 1d767c41)
1 /*-
2  *	@(#)if_acpreg.h	7.2 (Berkeley) 12/02/90
3  */
4 
5 /*************************************************************************/
6 /*                                                                       */
7 /*                                                                       */
8 /*       ________________________________________________________        */
9 /*      /                                                        \       */
10 /*     |          AAA          CCCCCCCCCCCCCC    CCCCCCCCCCCCCC   |      */
11 /*     |         AAAAA        CCCCCCCCCCCCCCCC  CCCCCCCCCCCCCCCC  |      */
12 /*     |        AAAAAAA       CCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCC |      */
13 /*     |       AAAA AAAA      CCCC              CCCC              |      */
14 /*     |      AAAA   AAAA     CCCC              CCCC              |      */
15 /*     |     AAAA     AAAA    CCCC              CCCC              |      */
16 /*     |    AAAA       AAAA   CCCC              CCCC              |      */
17 /*     |   AAAA  AAAAAAAAAAA  CCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCC |      */
18 /*     |  AAAA    AAAAAAAAAAA CCCCCCCCCCCCCCCC  CCCCCCCCCCCCCCCC  |      */
19 /*     | AAAA      AAAAAAAAA   CCCCCCCCCCCCCC    CCCCCCCCCCCCCC   |      */
20 /*      \________________________________________________________/       */
21 /*                                                                       */
22 /*  	Copyright (c) 1986 by Advanced Computer Communications           */
23 /*  	720 Santa Barbara Street, Santa Barbara, California  93101       */
24 /*  	(805) 963-9431                                                   */
25 /*                                                                       */
26 /*                                                                       */
27 /*  File:		if_acpreg.h                                      */
28 /*                                                                       */
29 /*  Author:		Arthur Berggreen                                 */
30 /*                                                                       */
31 /*  Project:		ACP6100 (UPB with HDLC firmware)                 */
32 /*          		ACP5100 (QPB with HDLC firmware)                 */
33 /*                                                                       */
34 /*  Revision History:                                                    */
35 /*                                                                       */
36 /*    21-NOV-1985  Clare Russ:  add fileheader and comments              */
37 /*         Add definitions for implementatin of new Command Interface    */
38 /*         (CIF) and Access Path Allocation Protocol (APAP).             */
39 /*                                                                       */
40 /*************************************************************************/
41 
42 
43 /* device registers */
44 struct acpregs {
45 	u_short	csr;			/* control and status register */
46 					/* I/O request mailbox */
47 	u_short req_chan;		/*   FDX channel number */
48 	u_char	req_adx;		/*   address bits 17-16 */
49 	u_char	req_flags;		/*   mailbox flags */
50 	u_short req_addr;		/*   address bits 15-00 */
51 	u_short req_cnt;		/*   byte count */
52 	u_char	req_fcn;		/*   I/O function */
53 	u_char	req_sbf;		/*   I/O subfunction */
54 					/* I/O completion mailbox */
55 	u_short cmp_chan;		/*   FDX channel number */
56 	u_char	cmp_unused;		/*   address bits 17-16 */
57 	u_char	cmp_flags;		/*   mailbox flags */
58 	u_short cmp_cnt;		/*   byte count */
59 	u_char	cmp_stat;		/*   I/O status */
60 	u_char	cmp_sbst;		/*   I/O substatus */
61 					/* Transfer request mailbox */
62 	u_short xfr_chan;		/*   FDX channel number */
63 	u_char	xfr_adx;		/*   address bits 17-16 */
64 	u_char	xfr_flags;		/*   mailbox flags */
65 	u_short xfr_addr;		/*   address bits 15-00 */
66 	u_short xfr_cnt;		/*   byte count */
67 					/* System status mailbox */
68 	u_char	sys_vers;		/*   system version number */
69 	u_char	sys_id;			/*   system identification */
70 	u_char	sys_vect;		/*   interrupt vector base */
71 	u_char  sys_stat;		/*   system status */
72 };
73 
74 
75 /* defines for CSR */
76 
77 #define	CSR_BIT15	0x8000
78 #define	CSR_BIT14	0x4000
79 #define	CSR_MAINT	0x2000
80 #define	CSR_HALT	0x1000
81 #define	CSR_IBPEND	0x0800
82 #define	CSR_IAPEND	0x0400
83 #define	CSR_IBREQ	0x0200
84 #define	CSR_IAREQ	0x0100
85 #define	CSR_BIT7	0x0080
86 #define	CSR_BIT6	0x0040
87 #define	CSR_INTRB	0x0020		/* ACP CPU Interrupt A Request */
88 #define	CSR_INTRA	0x0010		/* ACP CPU Interrupt B Request */
89 #define	CSR_IENB	0x0008		/* enable UNIBUS interrupt b   */
90 #define	CSR_IENA	0x0004		/* enable UNIBUS interrupt a   */
91 #define	CSR_DMAEN	0x0002
92 #define	CSR_RESET	0x0001
93 
94 /* mailbox handshake flags */
95 
96 #define FLAGS_RDY	0x80
97 #define FLAGS_DON	0x40
98 #define FLAGS_DIR	0x20
99 
100 /* I/O request function code definitions */
101 
102 #define ACPRED		0x01		/* read from ACP */
103 #define ACPWRT		0x02		/* write to ACP */
104 #define ACPSTR		0x10		/* stream flag */
105 #define ACPEOS		(0x20|ACPSTR)	/* end of stream flag */
106 #define ACPABT		0x04		/* abort flag */
107 #define ACPXFR		0x40		/* tranfer req/grant flag */
108 
109 #define FCN_MASK	0x07
110