|
|
1.1 root 1: /*
2: * VAX MASSBUS adapter registers
3: */
4:
5: struct mba_regs
6: {
7: int mba_csr; /* configuration register */
8: int mba_cr; /* control register */
9: int mba_sr; /* status register */
10: int mba_var; /* virtual address register */
11: int mba_bcr; /* byte count register */
12: int mba_dr;
13: int mba_pad1[250];
14: struct mba_drv { /* per drive registers */
15: int mbd_cs1; /* control status */
16: int mbd_ds; /* drive status */
17: int mbd_er1; /* error register */
18: int mbd_mr1; /* maintenance register */
19: int mbd_as; /* attention status */
20: int mbd_da; /* desired address (disks) */
21: #define mbd_fc mbd_da /* frame count (tapes) */
22: int mbd_dt; /* drive type */
23: int mbd_la; /* look ahead (disks) */
24: #define mbd_ck mbd_la /* ??? (tapes) */
25: int mbd_sn; /* serial number */
26: int mbd_of; /* ??? */
27: #define mbd_tc mbd_of /* ??? */
28: int mbd_fill[22];
29: } mba_drv[8];
30: struct pte mba_map[256]; /* io space virtual map */
31: int mba_pad2[256*5]; /* to size of a nexus */
32: };
33:
34: /*
35: * Bits in mba_cr
36: */
37: #define MBCR_INIT 0x1 /* init mba */
38: #define MBCR_IE 0x4 /* enable mba interrupts */
39:
40: /*
41: * Bits in mba_sr
42: */
43: #define MBSR_DTBUSY 0x80000000 /* data transfer busy */
44: #define MBSR_NRCONF 0x40000000 /* no response confirmation */
45: #define MBSR_CRD 0x20000000 /* corrected read data */
46: #define MBSR_CBHUNG 0x00800000 /* control bus hung */
47: #define MBSR_PGE 0x00080000 /* programming error */
48: #define MBSR_NED 0x00040000 /* non-existant drive */
49: #define MBSR_MCPE 0x00020000 /* massbus control parity error */
50: #define MBSR_ATTN 0x00010000 /* attention from massbus */
51: #define MBSR_SPE 0x00004000 /* silo parity error */
52: #define MBSR_DTCMP 0x00002000 /* data transfer completed */
53: #define MBSR_DTABT 0x00001000 /* data transfer aborted */
54: #define MBSR_DLT 0x00000800 /* data late */
55: #define MBSR_WCKUP 0x00000400 /* write check upper */
56: #define MBSR_WCKLWR 0x00000200 /* write check lower */
57: #define MBSR_MXF 0x00000100 /* miss transfer error */
58: #define MBSR_MBEXC 0x00000080 /* massbus exception */
59: #define MBSR_MDPE 0x00000040 /* massbus data parity error */
60: #define MBSR_MAPPE 0x00000020 /* page frame map parity error */
61: #define MBSR_INVMAP 0x00000010 /* invalid map */
62: #define MBSR_ERRCONF 0x00000008 /* error confirmation */
63: #define MBSR_RDS 0x00000004 /* read data substitute */
64: #define MBSR_ISTIMO 0x00000002 /* interface sequence timeout */
65: #define MBSR_RDTIMO 0x00000001 /* read data timeout */
66:
67: #define MBSR_BITS \
68: "\20\40DTBUSY\37NRCONF\36CRD\30CBHUNG\24PGE\23NED\22MCPE\21ATTN\
69: \17SPE\16DTCMP\15DTABT\14DLT\13WCKUP\12WCKLWR\11MXF\10MBEXC\7MDPE\
70: \6MAPPE\5INVMAP\4ERRCONF\3RDS\2ISTIMO\1RDTIMO"
71:
72: #define MBSR_HARD (MBSR_PGE|MBSR_ERRCONF|MBSR_ISTIMO|MBSR_RDTIMO)
73:
74: #define MBSR_EBITS (~(MBSR_DTBUSY|MBSR_CRD|MBSR_ATTN|MBSR_DTCMP))
75:
76: #ifdef KERNEL
77: extern char mbsr_bits[];
78: #endif
79:
80: /*
81: * Commands for mbd_cs1
82: */
83: #define MB_WCOM 0x30
84: #define MB_RCOM 0x38
85: #define MB_GO 0x1
86:
87: /*
88: * Bits in mbd_ds.
89: */
90: #define MBDS_ERR 0x00004000 /* error in drive */
91: #define MBDS_MOL 0x00001000 /* medium on line */
92: #define MBDS_DPR 0x00000100 /* drive present */
93: #define MBDS_DRY 0x00000080 /* drive ready */
94:
95: #define MBDS_DREADY (MBDS_MOL|MBDS_DPR|MBDS_DRY)
96:
97: /*
98: * Bits in mbd_dt
99: */
100: #define MBDT_NSA 0x8000 /* not sector addressible */
101: #define MBDT_TAP 0x4000 /* is a tape */
102: #define MBDT_MOH 0x2000 /* moving head */
103: #define MBDT_7CH 0x1000 /* 7 channel */
104: #define MBDT_DRQ 0x800 /* drive request required */
105: #define MBDT_SPR 0x400 /* slave present */
106:
107: #define MBDT_TYPE 0x1ff
108: #define MBDT_MASK (MBDT_NSA|MBDT_TAP|MBDT_TYPE)
109:
110: /* type codes for disk drives */
111: #define MBDT_RP04 020
112: #define MBDT_RP05 021
113: #define MBDT_RP06 022
114: #define MBDT_RP07 042
115: #define MBDT_RM03 024
116: #define MBDT_RM05 027
117: #define MBDT_RM80 026
118: #define MBDT_FUJI 0x15
119: #define MBDT_ML11A 0x48
120: #define MBDT_ML11B 0x49
121:
122: /* type codes for tape drives */
123: #define MBDT_TM03 050
124: #define MBDT_TE16 051
125: #define MBDT_TU45 052
126: #define MBDT_TU77 054
127: #define MBDT_TU78 0101
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.