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:  *	@(#)rlreg.h	7.1 (Berkeley) 6/5/86
   7:  */
   8: 
   9: struct rldevice {
  10:     short   rlcs;       /* control status */
  11:     u_short rlba;       /* bus address */
  12:     union {         /* disk address */
  13:         u_short seek;       /* disk seek address */
  14:         u_short rw;     /* disk read/write address */
  15:         u_short getstat;    /* get disk status command */
  16:     } rlda;
  17:     union {         /* multi-purpose register */
  18:         u_short getstat;    /* get status */
  19:         u_short readhdr;    /* read header */
  20:         u_short rw;     /* read/write word count */
  21:     } rlmp;
  22: };
  23: 
  24: #define NRLCYLN     512 /* number of cylinders per disk */
  25: #define NRLTRKS     2   /* number of tracks per cylinder */
  26: #define NRLSECT     40  /* number of sectors per track */
  27: #define NRLBPSC     256 /* bytes per sector */
  28: 
  29: /* rlcs */
  30: /* commands */
  31: #define RL_NOOP     0000000     /* no-operation */
  32: #define RL_WCHECK   0000002     /* write check */
  33: #define RL_GETSTAT  0000004     /* get status */
  34: #define RL_SEEK     0000006     /* seek */
  35: #define RL_RHDR     0000010     /* read header */
  36: #define RL_WRITE    0000012     /* write data */
  37: #define RL_READ     0000014     /* read data */
  38: #define RL_RDNCK    0000016     /* read data without hdr check */
  39: 
  40: #define RL_DRDY     0000001     /* When set indicates drive ready */
  41: #define RL_BAE      0000060     /* UNIBUS address bits 16 & 17 */
  42: #define RL_IE       0000100     /* interrupt enable */
  43: #define RL_CRDY     0000200     /* controller ready */
  44: #define RL_DS0      0000400     /* drive select 0 */
  45: #define RL_DS1      0001000     /* drive select 1 */
  46: #define RL_OPI      0002000     /* operation incomplete */
  47: #define RL_DCRC     0004000     /* CRC error occurred */
  48: #define RL_DLT      0010000     /* data late or header not found */
  49: #define RL_NXM      0020000     /* non-existant memory */
  50: #define RL_DE       0040000     /* selected drive flagged an error */
  51: #define RL_ERR      0100000     /* composite error */
  52: 
  53: #define RL_DCRDY    (RL_DRDY | RL_CRDY)
  54: 
  55: #define RLCS_BITS \
  56: "\10\20ERR\17DE\16NXM\15DLT\14DCRC\13OPI\1DRDY"
  57: 
  58: /* da_seek */
  59: #define RLDA_LOW    0000001     /* lower cylinder seek */
  60: #define RLDA_HGH    0000005     /* higher cylinder seek */
  61: #define RLDA_HSU    0000000     /* upper head select */
  62: #define RLDA_HSL    0000020     /* lower head select */
  63: #define RLDA_CA     0177600     /* cylinder address */
  64: 
  65: /* da_rw */
  66: #define RLDA_SA     0000077     /* sector address */
  67: #define RLDA_HST    0000000     /* upper head select */
  68: #define RLDA_HSB    0000100     /* lower head select */
  69: 
  70: /* da_getstat */
  71: 
  72: #define RL_GSTAT    0000003     /* Get status */
  73: #define RL_RESET    0000013     /* get status with reset */
  74: 
  75: /* mp_getstat */
  76: #define RLMP_STA    0000001     /* drive state: load cartridge */
  77: #define RLMP_STB    0000002     /* drive state: brush cycle */
  78: #define RLMP_STC    0000004     /* drive state: seek */
  79: #define RLMP_BH     0000010     /* set when brushes are home */
  80: #define RLMP_HO     0000020     /* set when brushes over the disk */
  81: #define RLMP_CO     0000040     /* set when cover open */
  82: #define RLMP_HS     0000100     /* indicates selected head:
  83: 						0 upper head
  84: 						1 lower head */
  85: #define RLMP_DT     0000200     /* indicates drive type:
  86: 						0 RL01
  87: 						1 RL02 */
  88: #define RLMP_DSE    0000400     /* set on multiple drive selection */
  89: #define RLMP_VC     0001000     /* set on pack mounted and spining */
  90: #define RLMP_WGE    0002000     /* write gate error */
  91: #define RLMP_SPE    0004000     /* spin speed error */
  92: #define RLMP_SKTO   0010000     /*\* seek time out error */
  93: #define RLMP_WL     0020000     /* set on protected drive */
  94: #define RLMP_CHE    0040000     /* current head error */
  95: #define RLMP_WDE    0100000     /* write data error */
  96: 
  97: /* mp_rhc */
  98: #define RLMP_SA     0000077     /* sector address */
  99: #define RLMP_CA     0177600     /* cylinder address */
 100: 
 101: /* check these bits after a get status and reset */
 102: #define RLMP_STATUS (RLMP_WDE|RLMP_CHE|RLMP_SKTO|RLMP_SPE|RLMP_WGE \
 103:     |RLMP_VC|RLMP_DSE|RLMP_CO|RLMP_HO|RLMP_BH|RLMP_STC|RLMP_STB|RLMP_STA)
 104: 
 105: /* these are the bits that should be on in the above check */
 106: #define RLMP_STATOK (RLMP_HO|RLMP_BH|RLMP_STC|RLMP_STA)
 107: 
 108: /* mp_rw */
 109: #define RLMP_WC     0017777     /* word count 2's complement */
 110: 
 111: #define RLER_BITS \
 112: "\10\20WDE\17CHE\16WL\15SKTO\14SPE\13WGE\12VC\11DSE\
 113: \10DT\7HS\6CO\5HO\4BH\3STC\2STB\1STA"

Defined struct's

rldevice defined in line 9; used 46 times

Defined macros

NRLBPSC defined in line 27; used 4 times
NRLCYLN defined in line 24; never used
NRLSECT defined in line 26; used 2 times
NRLTRKS defined in line 25; used 1 times
RLCS_BITS defined in line 55; used 2 times
RLDA_CA defined in line 63; never used
RLDA_HGH defined in line 60; used 3 times
RLDA_HSB defined in line 68; never used
RLDA_HSL defined in line 62; never used
RLDA_HST defined in line 67; never used
RLDA_HSU defined in line 61; never used
RLDA_LOW defined in line 59; used 3 times
RLDA_SA defined in line 66; never used
RLER_BITS defined in line 111; used 2 times
RLMP_BH defined in line 79; used 2 times
RLMP_CA defined in line 99; never used
RLMP_CHE defined in line 94; used 1 times
RLMP_CO defined in line 81; used 1 times
RLMP_DSE defined in line 88; used 1 times
RLMP_DT defined in line 85; used 2 times
RLMP_HO defined in line 80; used 2 times
RLMP_HS defined in line 82; never used
RLMP_SA defined in line 98; never used
RLMP_SKTO defined in line 92; used 1 times
RLMP_SPE defined in line 91; used 1 times
RLMP_STA defined in line 76; used 2 times
RLMP_STATOK defined in line 106; used 1 times
RLMP_STATUS defined in line 102; used 1 times
RLMP_STB defined in line 77; used 1 times
RLMP_STC defined in line 78; used 2 times
RLMP_VC defined in line 89; used 1 times
RLMP_WC defined in line 109; never used
RLMP_WDE defined in line 95; used 1 times
RLMP_WGE defined in line 90; used 1 times
RLMP_WL defined in line 93; used 2 times
RL_BAE defined in line 41; used 3 times
RL_CRDY defined in line 43; used 5 times
RL_DCRC defined in line 47; never used
RL_DCRDY defined in line 53; used 4 times
RL_DE defined in line 50; used 3 times
RL_DLT defined in line 48; never used
RL_DRDY defined in line 40; used 1 times
  • in line 53
RL_DS0 defined in line 44; never used
RL_DS1 defined in line 45; never used
RL_ERR defined in line 51; used 3 times
RL_GETSTAT defined in line 33; used 8 times
RL_GSTAT defined in line 72; used 2 times
RL_IE defined in line 42; used 5 times
RL_NOOP defined in line 31; used 1 times
RL_NXM defined in line 49; never used
RL_OPI defined in line 46; never used
RL_RDNCK defined in line 38; never used
RL_READ defined in line 37; used 3 times
RL_RESET defined in line 73; used 5 times
RL_RHDR defined in line 35; used 5 times
RL_SEEK defined in line 34; used 3 times
RL_WCHECK defined in line 32; never used
RL_WRITE defined in line 36; used 3 times

Usage of this include

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