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

Defined struct's

mba_drv defined in line 22; used 10 times
mba_regs defined in line 13; used 42 times

Defined macros

MBDS_DPR defined in line 100; used 2 times
MBDS_DREADY defined in line 103; used 2 times
MBDS_DRY defined in line 101; used 1 times
MBDS_ERR defined in line 98; never used
MBDS_MOL defined in line 99; used 1 times
MBDT_7CH defined in line 111; never used
MBDT_DRQ defined in line 112; never used
MBDT_MASK defined in line 116; never used
MBDT_ML11B defined in line 128; used 2 times
MBDT_MOH defined in line 110; used 2 times
MBDT_NSA defined in line 108; used 1 times
MBDT_RM02 defined in line 123; used 2 times
MBDT_RM03 defined in line 124; used 2 times
MBDT_RM05 defined in line 125; used 2 times
MBDT_RP04 defined in line 119; used 2 times
MBDT_RP07 defined in line 122; used 2 times
MBDT_SPR defined in line 113; never used
MBDT_TE16 defined in line 132; used 2 times
MBDT_TM03 defined in line 131; used 2 times
MBDT_TU45 defined in line 133; used 2 times
MBDT_TU77 defined in line 134; used 2 times
MBDT_TU78 defined in line 135; used 2 times
MBSR_ATTN defined in line 58; used 1 times
  • in line 82
MBSR_BITS defined in line 75; used 1 times
MBSR_CBHUNG defined in line 54; used 1 times
MBSR_CRD defined in line 53; used 1 times
  • in line 82
MBSR_DLT defined in line 62; never used
MBSR_DTABT defined in line 61; used 3 times
MBSR_DTBUSY defined in line 51; used 3 times
MBSR_DTCMP defined in line 60; used 1 times
  • in line 82
MBSR_EBITS defined in line 82; used 6 times
MBSR_ERRCONF defined in line 70; used 1 times
  • in line 80
MBSR_HARD defined in line 80; used 1 times
MBSR_INVMAP defined in line 69; never used
MBSR_ISTIMO defined in line 72; used 1 times
  • in line 80
MBSR_MAPPE defined in line 68; never used
MBSR_MBEXC defined in line 66; used 3 times
MBSR_MCPE defined in line 57; never used
MBSR_MDPE defined in line 67; never used
MBSR_MXF defined in line 65; never used
MBSR_NED defined in line 56; used 2 times
MBSR_NRCONF defined in line 52; never used
MBSR_PGE defined in line 55; used 1 times
  • in line 80
MBSR_RDS defined in line 71; never used
MBSR_RDTIMO defined in line 73; used 1 times
  • in line 80
MBSR_SPE defined in line 59; never used
MBSR_WCKLWR defined in line 64; used 1 times
MBSR_WCKUP defined in line 63; used 1 times
MB_GO defined in line 93; used 4 times
MB_RCOM defined in line 92; used 2 times
MB_WCOM defined in line 91; used 2 times
mbd_ck defined in line 32; never used
mbd_fc defined in line 29; never used
mbd_tc defined in line 35; used 1 times

Usage of this include

Last modified: 1986-06-05
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1732
Valid CSS Valid XHTML 1.0 Strict