1: /*
   2:  * Copyright (c) 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:  *	@(#)hkreg.h	1.1 (2.10BSD Berkeley) 12/1/86
   7:  */
   8: 
   9: struct hkdevice
  10: {
  11:     short   hkcs1;      /* control status reg 1 */
  12:     short   hkwc;       /* word count */
  13:     caddr_t hkba;       /* bus address */
  14:     short   hkda;       /* disk address */
  15:     short   hkcs2;      /* control status reg 2 */
  16:     short   hkds;       /* drive status */
  17:     short   hker;       /* driver error register */
  18:     short   hkatt;      /* attention status/offset register */
  19:     short   hkcyl;      /* current cylinder register */
  20:     short   hkxmem;         /* extended memory address register */
  21:     short   hkdb;       /* data buffer register */
  22:     short   hkmr1;      /* maint reg 1 */
  23:     short   hkecps;     /* burst error bit position */
  24:     short   hkecpt;     /* burst error bit pattern */
  25:     short   hkmr2;      /* maint reg 2 */
  26:     short   hkmr3;      /* maint reg 3 */
  27: };
  28: 
  29: /* hkcs1 */
  30: #define HK_CCLR     0100000     /* controller clear (also error) */
  31: #define HK_CERR     HK_CCLR
  32: #define HK_DI       0040000     /* drive interrupt */
  33: #define HK_DTCPAR   0020000     /* drive to controller parity */
  34: #define HK_CFMT     0010000     /* 18 bit word format */
  35: #define HK_CTO      0004000     /* controller timeout */
  36: #define HK_CDT      0002000     /* drive type (rk07/rk06) */
  37: /* bits 9 and 8 are the extended bus address */
  38: #define HK_CRDY     0000200     /* controller ready */
  39: #define HK_IE       0000100     /* interrupt enable */
  40: /* bit 5 is unused */
  41: /* bits 4-1 are the function code */
  42: #define HK_GO       0000001
  43: #define HK_BITS     \
  44: "\10\20CCLR\17DI\16DTCPAR\15CFMT\14CTO\13CDT\10CRDY\7IE\1GO"
  45: 
  46: /* commands */
  47: #define HK_SELECT   000     /* select drive */
  48: #define HK_PACK     002     /* pack acknowledge */
  49: #define HK_DCLR     004     /* drive clear */
  50: #define HK_UNLOAD   006     /* unload */
  51: #define HK_START    010     /* start spindle */
  52: #define HK_RECAL    012     /* recalibrate */
  53: #define HK_OFFSET   014     /* offset */
  54: #define HK_SEEK     016     /* seek */
  55: #define HK_READ     020     /* read data */
  56: #define HK_WRITE    022     /* write data */
  57: #define HK_RHDR     026     /* read header */
  58: #define HK_WHDR     030     /* write header */
  59: 
  60: /* hkcs2 */
  61: #define HKCS2_DLT   0100000     /* data late */
  62: #define HKCS2_WCE   0040000     /* write check */
  63: #define HKCS2_UPE   0020000     /* UNIBUS parity */
  64: #define HKCS2_NED   0010000     /* non-existent drive */
  65: #define HKCS2_NEM   0004000     /* non-existent memory */
  66: #define HKCS2_PGE   0002000     /* programming error */
  67: #define HKCS2_MDS   0001000     /* multiple drive select */
  68: #define HKCS2_UFE   0000400     /* unit field error */
  69: #define HKCS2_OR    0000200     /* output ready */
  70: #define HKCS2_IR    0000100     /* input ready */
  71: #define HKCS2_SCLR  0000040     /* subsystem clear */
  72: #define HKCS2_BAI   0000020     /* bus address increment inhibit */
  73: #define HKCS2_RLS   0000010     /* release */
  74: /* bits 2-0 are drive select */
  75: 
  76: #define HKCS2_BITS \
  77: "\10\20DLT\17WCE\16UPE\15NED\14NEM\13PGE\12MDS\11UFE\
  78: \10OR\7IR\6SCLR\5BAI\4RLS"
  79: 
  80: #define HKCS2_HARD      (HKCS2_NED|HKCS2_PGE)
  81: 
  82: /* hkds */
  83: #define HKDS_SVAL   0100000     /* status valid */
  84: #define HKDS_CDA    0040000     /* current drive attention */
  85: #define HKDS_PIP    0020000     /* positioning in progress */
  86: /* bit 12 is unused */
  87: #define HKDS_WRL    0004000     /* write lock */
  88: /* bits 10-9 are unused */
  89: #define HKDS_DDT    0000400     /* disk drive type */
  90: #define HKDS_DRDY   0000200     /* drive ready */
  91: #define HKDS_VV     0000100     /* volume valid */
  92: #define HKDS_DROT   0000040     /* drive off track */
  93: #define HKDS_SPLS   0000020     /* speed loss */
  94: #define HKDS_ACLO   0000010     /* ac low */
  95: #define HKDS_OFF    0000004     /* offset mode */
  96: /* bit 1 is unused */
  97: #define HKDS_DRA    0000001     /* drive available */
  98: 
  99: #define HKDS_DREADY (HKDS_DRA|HKDS_VV|HKDS_DRDY)
 100: #define HKDS_BITS \
 101: "\10\20SVAL\17CDA\16PIP\14WRL\11DDT\10DRDY\7VV\6DROT\5SPLS\4ACLO\3OFF\1DRA"
 102: #define HKDS_HARD   (HKDS_ACLO|HKDS_SPLS)
 103: 
 104: /* hker */
 105: #define HKER_DCK    0100000     /* data check */
 106: #define HKER_UNS    0040000     /* drive unsafe */
 107: #define HKER_OPI    0020000     /* operation incomplete */
 108: #define HKER_DTE    0010000     /* drive timing error */
 109: #define HKER_WLE    0004000     /* write lock error */
 110: #define HKER_IDAE   0002000     /* invalid disk address error */
 111: #define HKER_COE    0001000     /* cylinder overflow error */
 112: #define HKER_HRVC   0000400     /* header vertical redundancy check */
 113: #define HKER_BSE    0000200     /* bad sector error */
 114: #define HKER_ECH    0000100     /* hard ecc error */
 115: #define HKER_DTYE   0000040     /* drive type error */
 116: #define HKER_FMTE   0000020     /* format error */
 117: #define HKER_DRPAR  0000010     /* control-to-drive parity error */
 118: #define HKER_NXF    0000004     /* non-executable function */
 119: #define HKER_SKI    0000002     /* seek incomplete */
 120: #define HKER_ILF    0000001     /* illegal function */
 121: 
 122: #define HKER_BITS \
 123: "\10\20DCK\17UNS\16OPI\15DTE\14WLE\13IDAE\12COE\11HRVC\
 124: \10BSE\7ECH\6DTYE\5FMTE\4DRPAR\3NXF\2SKI\1ILF"
 125: #define HKER_HARD   \
 126:     (HKER_WLE|HKER_IDAE|HKER_COE|HKER_DTYE|HKER_FMTE|HKER_ILF)
 127: 
 128: /* offset bits in hkas */
 129: #define HKAS_P400   0020        /*  +400 RK06,  +200 RK07 */
 130: #define HKAS_M400   0220        /*  -400 RK06,  -200 RK07 */
 131: #define HKAS_P800   0040        /*  +800 RK06,  +400 RK07 */
 132: #define HKAS_M800   0240        /*  -800 RK06,  -400 RK07 */
 133: #define HKAS_P1200  0060        /*  +800 RK06,  +400 RK07 */
 134: #define HKAS_M1200  0260        /* -1200 RK06, -1200 RK07 */

Defined struct's

hkdevice defined in line 9; used 32 times

Defined macros

HKAS_M1200 defined in line 134; used 2 times
HKAS_M400 defined in line 130; used 2 times
HKAS_M800 defined in line 132; used 2 times
HKAS_P1200 defined in line 133; used 2 times
HKAS_P400 defined in line 129; used 2 times
HKAS_P800 defined in line 131; used 2 times
HKCS2_BAI defined in line 72; never used
HKCS2_BITS defined in line 76; used 1 times
HKCS2_DLT defined in line 61; never used
HKCS2_HARD defined in line 80; used 1 times
HKCS2_IR defined in line 70; never used
HKCS2_MDS defined in line 67; used 1 times
HKCS2_NED defined in line 64; used 2 times
HKCS2_NEM defined in line 65; used 1 times
HKCS2_OR defined in line 69; never used
HKCS2_PGE defined in line 66; used 1 times
  • in line 80
HKCS2_RLS defined in line 73; never used
HKCS2_SCLR defined in line 71; used 2 times
HKCS2_UFE defined in line 68; never used
HKCS2_UPE defined in line 63; never used
HKCS2_WCE defined in line 62; never used
HKDS_ACLO defined in line 94; used 1 times
HKDS_BITS defined in line 100; used 1 times
HKDS_CDA defined in line 84; never used
HKDS_DDT defined in line 89; never used
HKDS_DRA defined in line 97; used 1 times
  • in line 99
HKDS_DRDY defined in line 90; used 1 times
  • in line 99
HKDS_DREADY defined in line 99; used 6 times
HKDS_DROT defined in line 92; used 1 times
HKDS_HARD defined in line 102; used 1 times
HKDS_OFF defined in line 95; never used
HKDS_PIP defined in line 85; used 1 times
HKDS_SPLS defined in line 93; used 1 times
HKDS_SVAL defined in line 83; used 2 times
HKDS_VV defined in line 91; used 4 times
HKDS_WRL defined in line 87; never used
HKER_BITS defined in line 122; used 1 times
HKER_BSE defined in line 113; used 1 times
HKER_COE defined in line 111; used 1 times
HKER_DCK defined in line 105; used 2 times
HKER_DRPAR defined in line 117; never used
HKER_DTE defined in line 108; never used
HKER_DTYE defined in line 115; used 3 times
HKER_ECH defined in line 114; used 1 times
HKER_FMTE defined in line 116; used 1 times
HKER_HARD defined in line 125; used 1 times
HKER_HRVC defined in line 112; never used
HKER_IDAE defined in line 110; used 1 times
HKER_ILF defined in line 120; used 1 times
HKER_NXF defined in line 118; never used
HKER_OPI defined in line 107; used 1 times
HKER_SKI defined in line 119; used 1 times
HKER_UNS defined in line 106; used 1 times
HKER_WLE defined in line 109; used 2 times
HK_BITS defined in line 43; never used
HK_CCLR defined in line 30; used 12 times
HK_CDT defined in line 36; used 3 times
HK_CERR defined in line 31; used 5 times
HK_CFMT defined in line 34; never used
HK_CRDY defined in line 38; used 7 times
HK_CTO defined in line 35; never used
HK_DCLR defined in line 49; used 8 times
HK_DI defined in line 32; never used
HK_DTCPAR defined in line 33; never used
HK_GO defined in line 42; used 21 times
HK_IE defined in line 39; used 9 times
HK_OFFSET defined in line 53; used 1 times
HK_PACK defined in line 48; used 3 times
HK_READ defined in line 55; used 3 times
HK_RECAL defined in line 52; used 1 times
HK_RHDR defined in line 57; never used
HK_SEEK defined in line 54; used 2 times
HK_SELECT defined in line 47; used 2 times
HK_START defined in line 51; never used
HK_UNLOAD defined in line 50; never used
HK_WHDR defined in line 58; never used
HK_WRITE defined in line 56; used 4 times

Usage of this include

Last modified: 1990-10-24
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1069
Valid CSS Valid XHTML 1.0 Strict