Annotation of 43BSDTahoe/sys/vaxuba/udareg.h, revision 1.1.1.1

1.1       root        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:  *     @(#)udareg.h    7.2 (Berkeley) 10/23/87
                      7:  */
                      8: 
                      9: /*
                     10:  * UDA50 registers and structures
                     11:  */
                     12: 
                     13: /*
                     14:  * Writing any value to udaip starts initialisation.  Reading from it
                     15:  * when the UDA is running makes the UDA look through the command ring
                     16:  * to find any new commands.  Reading udasa gives status; writing it
                     17:  * during initialisation sets things up.
                     18:  */
                     19: struct udadevice {
                     20:        u_short udaip;          /* initialisation and polling */
                     21:        u_short udasa;          /* status and address */
                     22: };
                     23: 
                     24: /*
                     25:  * Bits in UDA status register during initialisation
                     26:  */
                     27: #define        UDA_ERR         0x8000  /* error */
                     28: #define        UDA_STEP4       0x4000  /* step 4 has started */
                     29: #define        UDA_STEP3       0x2000  /* step 3 has started */
                     30: #define        UDA_STEP2       0x1000  /* step 2 has started */
                     31: #define        UDA_STEP1       0x0800  /* step 1 has started */
                     32: #define        UDA_NV          0x0400  /* no host settable interrupt vector */
                     33: #define        UDA_QB          0x0200  /* controller supports Q22 bus */
                     34: #define        UDA_DI          0x0100  /* controller implements diagnostics */
                     35: #define        UDA_IE          0x0080  /* interrupt enable */
                     36: #define        UDA_NCNRMASK    0x003f  /* in STEP1, bits 0-2=NCMDL2, 3-5=NRSPL2 */
                     37: #define        UDA_IVECMASK    0x007f  /* in STEP2, bits 0-6 are interruptvec / 4 */
                     38: #define        UDA_PI          0x0001  /* host requests adapter purge interrupts */
                     39: 
                     40: /*
                     41:  * Bits in UDA status register after initialisation
                     42:  */
                     43: #define        UDA_GO          0x0001  /* run */
                     44: 
                     45: #define        UDASR_BITS \
                     46: "\20\20ERR\17STEP4\16STEP3\15STEP2\14STEP1\13NV\12QB\11DI\10IE\1GO"
                     47: 
                     48: /*
                     49:  * UDA Communications Area.  Note that this structure definition
                     50:  * requires NRSP and NCMD to be defined already.
                     51:  */
                     52: struct udaca {
                     53:        short   ca_xxx1;        /* unused */
                     54:        char    ca_xxx2;        /* unused */
                     55:        char    ca_bdp;         /* BDP to purge */
                     56:        short   ca_cmdint;      /* command ring transition flag */
                     57:        short   ca_rspint;      /* response ring transition flag */
                     58:        long    ca_rspdsc[NRSP];/* response descriptors */
                     59:        long    ca_cmddsc[NCMD];/* command descriptors */
                     60: };
                     61: 
                     62: /*
                     63:  * Simplified routines (e.g., uddump) reprogram the UDA50 for one command
                     64:  * and one response at a time; uda1ca is like udaca except that it provides
                     65:  * exactly one command and response descriptor.
                     66:  */
                     67: struct uda1ca {
                     68:        short   ca_xxx1;
                     69:        char    ca_xxx2;
                     70:        char    ca_bdp;
                     71:        short   ca_cmdint;
                     72:        short   ca_rspint;
                     73:        long    ca_rspdsc;
                     74:        long    ca_cmddsc;
                     75: };

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.