Start development on 386BSD 0.0
[unix-history] / .ref-BSD-4_3_Net_2 / usr / src / sys / vax / uba / tmscpreg.h
CommitLineData
af359dea
C
1/*-
2 * Copyright (c) 1991 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)tmscpreg.h 7.2 (Berkeley) 5/9/91
34 */
88ac9a6a
MK
35
36/* @(#)tmscpreg.h 1.1 11/2/84 84/09/25 */
37
66cf8c22
KD
38/****************************************************************
39 * *
40 * Licensed from Digital Equipment Corporation *
41 * Copyright (c) *
42 * Digital Equipment Corporation *
43 * Maynard, Massachusetts *
44 * 1985, 1986 *
45 * All rights reserved. *
46 * *
47 * The Information in this software is subject to change *
48 * without notice and should not be construed as a commitment *
49 * by Digital Equipment Corporation. Digital makes no *
50 * representations about the suitability of this software for *
51 * any purpose. It is supplied "As Is" without expressed or *
52 * implied warranty. *
53 * *
54 * If the Regents of the University of California or its *
55 * licensees modify the software in a manner creating *
56 * diriviative copyright rights, appropriate copyright *
57 * legends may be placed on the drivative work in addition *
58 * to that set forth above. *
59 * *
60 ****************************************************************/
88ac9a6a
MK
61/*
62 * TMSCP registers and structures
63 */
64
65struct tmscpdevice {
66 short tmscpip; /* initialization and polling */
67 short tmscpsa; /* status and address */
68};
69
70#define TMSCP_ERR 0100000 /* error bit */
71#define TMSCP_STEP4 0040000 /* step 4 has started */
72#define TMSCP_STEP3 0020000 /* step 3 has started */
73#define TMSCP_STEP2 0010000 /* step 2 has started */
74#define TMSCP_STEP1 0004000 /* step 1 has started */
75#define TMSCP_NV 0002000 /* no host settable interrupt vector */
76#define TMSCP_QB 0001000 /* controller supports Q22 bus */
77#define TMSCP_DI 0000400 /* controller implements diagnostics */
e21477ad 78#define TMSCP_OD 0000200 /* port allows odd host addr's in the buffer descriptor */
88ac9a6a
MK
79#define TMSCP_IE 0000200 /* interrupt enable */
80#define TMSCP_MP 0000100 /* port supports address mapping */
e21477ad
MK
81#define TMSCP_LF 0000002 /* host requests last fail response packet */
82#define TMSCP_PI 0000001 /* host requests adapter purge interrupts */
88ac9a6a
MK
83#define TMSCP_GO 0000001 /* start operation, after init */
84
85
86/*
87 * TMSCP Communications Area
88 */
89
90struct tmscpca {
91 short ca_xxx1; /* unused */
92 char ca_xxx2; /* unused */
93 char ca_bdp; /* BDP to purge */
94 short ca_cmdint; /* command queue transition interrupt flag */
95 short ca_rspint; /* response queue transition interrupt flag */
96 long ca_rspdsc[NRSP];/* response descriptors */
97 long ca_cmddsc[NCMD];/* command descriptors */
98};
99
100#define ca_ringbase ca_rspdsc[0]
101
102#define TMSCP_OWN 0x80000000 /* port owns this descriptor (else host
103 owns it) */
e21477ad 104#define TMSCP_INT 0x40000000 /* allow interrupt on ring transition */
88ac9a6a 105
e21477ad 106#define TMSCP_MAP 0x80000000 /* modifier for mapped buffer descriptors */
88ac9a6a
MK
107
108/*
109 * TMSCP packet info (same as MSCP)
110 */
111struct mscp_header {
112 short tmscp_msglen; /* length of MSCP packet */
113 char tmscp_credits; /* low 4 bits: credits, high 4 bits: msgtype */
114 char tmscp_vcid; /* virtual circuit id (connection id) */
115};