The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/sqt/bdp.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* 
    2  * Mach Operating System
    3  * Copyright (c) 1991 Carnegie Mellon University
    4  * Copyright (c) 1991 Sequent Computer Systems
    5  * All Rights Reserved.
    6  * 
    7  * Permission to use, copy, modify and distribute this software and its
    8  * documentation is hereby granted, provided that both the copyright
    9  * notice and this permission notice appear in all copies of the
   10  * software, derivative works or modified versions, and any portions
   11  * thereof, and that both notices appear in supporting documentation.
   12  * 
   13  * CARNEGIE MELLON AND SEQUENT COMPUTER SYSTEMS ALLOW FREE USE OF
   14  * THIS SOFTWARE IN ITS "AS IS" CONDITION.  CARNEGIE MELLON AND
   15  * SEQUENT COMPUTER SYSTEMS DISCLAIM ANY LIABILITY OF ANY KIND FOR
   16  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   17  * 
   18  * Carnegie Mellon requests users of this software to return to
   19  * 
   20  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   21  *  School of Computer Science
   22  *  Carnegie Mellon University
   23  *  Pittsburgh PA 15213-3890
   24  * 
   25  * any improvements or extensions that they make and grant Carnegie Mellon 
   26  * the rights to redistribute these changes.
   27  */
   28 
   29 /*
   30  * HISTORY
   31  * $Log:        bdp.h,v $
   32  * Revision 2.3  91/07/31  17:59:34  dbg
   33  *      Changed copyright.
   34  *      [91/07/31            dbg]
   35  * 
   36  * Revision 2.2  91/05/08  12:52:42  dbg
   37  *      Added from Sequent SYMMETRY sources.
   38  *      [91/04/26  14:48:02  dbg]
   39  * 
   40  */
   41 
   42 /*
   43  * $Header: bdp.h,v 2.3 91/07/31 17:59:34 dbg Exp $
   44  *
   45  * Buffered Data Path (BDP) sub-registers and bits.
   46  */
   47 
   48 /*
   49  * Revision 1.1  89/07/19  14:48:50  kak
   50  * Initial revision
   51  * 
   52  */
   53 
   54 #ifndef _SQT_BDP_H_
   55 #define _SQT_BDP_H_
   56 
   57 /*
   58  * BDP ID Register: Read Only.
   59  */
   60 
   61 #define BDP_ID          0x00
   62 #define     BDPI_VAL            0x02    /* what the BDP says it is */
   63 
   64 /*
   65  * BDP Revision register: Read only
   66  */
   67 #define BDP_VERSION     0x01            /* version and revision number */
   68 #define     BDPV_VER_MASK       0xF0    /* version number mask */
   69 #define     BDPV_REV_MASK       0x0F    /* revision number mask */
   70 
   71 #define     BDPV_REVISION(x)    ((x) & BDPV_REV_MASK)
   72 #define     BDPV_VERSION(x)     (((x) & BDPV_VER_MASK) >> 4)
   73 
   74 /*
   75  * BDP Command Register:  Write Only.
   76  */
   77 
   78 #define BDP_CMD         0x02            /* command latch */
   79 #define     BDPC_MASK           0x03    /* useful bits */
   80 #define     BDPC_EXECDIAG       0x02    /* execute diag latch contents */
   81 #define     BDPC_RESET          0x01    /* reset BDP */
   82 
   83 /*
   84  * BDP Config Register:  Write Only.
   85  */
   86 
   87 #define BDP_CONF        0x03            /* configuration latch register */
   88 #define     BDPCF_MASK          0xFF    /* useful bits */
   89 #define     BDPCF_INH_ETC       0x80    /* inhibit ETC counting */
   90 #define     BDPCF_ENAB_PAR      0x40    /* enable data parity checking */
   91 #define     BDPCF_HIGH          0x20    /* BDP connected to bytes 7-4 */
   92 #define     BDPCF_MEM           0x10    /* special SGS mem behavior */
   93 #define     BDPCF_DISAB_DIAG    0x08    /* disable diagnostic mode */
   94 #define     BDPCF_TSIZ          0x07    /* transfer size select ... */
   95 #define         BDPCF_TSIZ_W32  0x00    /* wide 32 bytes */
   96 #define         BDPCF_TSIZ_W16  0x03    /* wide 16 bytes */
   97 #define         BDPCF_TSIZ_N16  0x04    /* narrow 16 bytes */
   98 #define         BDPCF_TSIZ_4    0x06    /* 4 bytes */
   99 #define         BDPCF_TSIZ_N8   0x07    /* narrow 8 bytes */
  100 
  101 /*
  102  * BDP Throttle Latch: Write Only.
  103  */
  104 
  105 #define BDP_THROTTLE    0x04
  106 
  107 /*
  108  * BDP Diagnostic Latches:  Write Only.
  109  */
  110 
  111 #define BDP_DIAG1       0x05
  112 #define     BDPD1_MASK          0x7F    /* useful bits */
  113 #define     BDPD1_DDEST         0x60    /* data destination selection... */
  114 #define         BDPD1_DDEST_OUTQ0       0x00    /* OUTQ0 */
  115 #define         BDPD1_DDEST_OUTQ1       0x20    /* OUTQ1 */
  116 #define         BDPD1_DDEST_ETC         0x40    /* ETC */
  117 #define         BDPD1_DDEST_NONE        0x60    /* none */
  118 #define     BDPD1_SEL           0x10            /* BDP select */
  119 #define     BDPD1_DSRC          0x0C            /* data source selection... */
  120 #define         BDPD1_DSRC_INQ2 0x00            /* INQ2 */
  121 #define         BDPD1_DSRC_INQ3 0x04            /* INQ3 */
  122 #define         BDPD1_DSRC_ETC  0x08            /* elapsed time counter */
  123 #define         BDPD1_DSRC_NONE 0x0C            /* none */
  124 #define     BDPD1_BASE_LD       0x02
  125 #define     BDPD1_MASK_LD       0x01
  126 
  127 #define BDP_DIAG2       0x06
  128 #define     BDPD2_MASK          0xFF    /* useful bits */
  129 #define     BDPD2_INQ0_RD       0x80    /* increment INQ0 read pointer */
  130 #define     BDPD2_INQ1_RD       0x40    /* increment INQ1 read pointer */
  131 #define     BDPD2_LADR_LD       0x20    /* diag lock address strobe */
  132 #define     BDPD2_WADR_LD       0x10    /* diag write address strobe */
  133 #define     BDPD2_RADR_LD       0x08    /* diag read address strobe */
  134 #define     BDPD2_ASRC          0x07    /* address source selection... */
  135 #define         BDPD2_ASRC_INQ0         0x00    /* INQ0 */
  136 #define         BDPD2_ASRC_INQ1         0x01    /* INQ1 */
  137 #define         BDPD2_ASRC_AR           0x02    /* addr reg */
  138 #define         BDPD2_ASRC_ARINC        0x03    /* addr reg (incr) */
  139 #define         BDPD2_ASRC_SLIC         0x05    /* SLIC data latch */
  140 #define         BDPD2_ASRC_ETC          0x06    /* PROC: ETC (init) */
  141 #define         BDPD2_ASRC_RAR          0x06    /* MEM: RAR; bit 4 inverted */
  142 #define         BDPD2_ASRC_ETC_REF      0x07    /* ETC (refresh) */
  143 
  144 #define BDP_DIAG3       0x07
  145 #define     BDPD3_MASK          0xFF
  146 #define     BDPD3_INQ0_LD       0x80
  147 #define     BDPD3_INQ1_LD       0x40
  148 #define     BDPD3_INQ2_WR       0x20
  149 #define     BDPD3_INQ3_WR       0x10
  150 #define     BDPD3_GO            0x08
  151 #define     BDPD3_GOSEL         0x07    /* which output is on bus drivers */
  152 #define         BDPD3_GOSEL_WAR         0x00    /* write address register */
  153 #define         BDPD3_GOSEL_OUTQ1       0x01    /* OUTQ1 */
  154 #define         BDPD3_GOSEL_RAR         0x02    /* read address register */
  155 #define         BDPD3_GOSEL_LAR         0x03    /* lock address register */
  156 #define         BDPD3_GOSEL_OUTQ0       0x04    /* OUTQ0 */
  157 
  158 /*
  159  * Data Parity Latch: Read/Write.
  160  */
  161 
  162 #define BDP_DATAPAR     0x08
  163 #define     BDPDP_MASK  0xFF            /* useful bits */
  164 #define     BDPDP_DPAR  0xF0            /* data parity error */
  165 #define     BDPDP_FORCE 0x0F            /* data parity error to force */
  166 
  167 /*
  168  * System Parity Latch: Read/Write.
  169  */
  170 
  171 #define BDP_SYSPAR      0x09
  172 #define     BDPSP_MASK  0xFF            /* useful bits */
  173 #define     BDPSP_SPAR  0xF0            /* system parity error */
  174 #define     BDPSP_FORCE 0x0F            /* system parity error to force */
  175 
  176 /*
  177  * System Address Parity Latch: Read/Write.
  178  */
  179 
  180 #define BDP_SYSPARAD    0x0A
  181 #define     BDPSPA_MASK         0xC7    /* useful bits */
  182 #define     BDPSPA_SAPAR        0x80    /* sysad parity error */
  183 #define     BDPSPA_FORCE        0x40    /* sysad parity error to force */
  184 #define     BDPSPA_LHIT         0x04    /* lock hit r/w */
  185 #define     BDPSPA_RHIT         0x02    /* read hit r/w */
  186 #define     BDPSPA_AHIT         0x01    /* address hit r/w */
  187 
  188 /*
  189  * Read Bytes: Read Only.
  190  * Used in combination with the Read Byte Groups
  191  * and to get to the diagnostic data latches.
  192  */
  193 
  194 #define BDP_BYTE4       0x0B
  195 #define     BDP_CYCTYPE_HI      0xF0    /* cycle type (6:3) */
  196 #define     BDP_BM      0x0F            /* byte marks */
  197 #define BDP_BYTE3       0x0C
  198 #define BDP_BYTE2       0x0D
  199 #define BDP_BYTE1       0x0E
  200 #define BDP_BYTE0       0x0F
  201 #define     BDP_BYTE0_ADDR      0xFC    /* address bits 7-2 */
  202 #define     BDP_CYCTYPE_LO      0x03    /* cycle type (2:1) */
  203 
  204 #define BDP_NBYTES      (BDP_BYTE0 - BDP_BYTE4 + 1)     /* no. of read bytes */
  205 
  206 /*
  207  * Read Byte Groups: Read Only.
  208  *
  209  * Each of the registers below defines
  210  * the group of BDP registers used to
  211  * read the specified quantities.
  212  * For example,
  213  *      rdSubslave(slic, PROC_BDP_LO, BDP_INQ_DATA | BDP_BYTE3)
  214  * reads byte three from the BDP
  215  * Input Queue Data Mux.
  216  *
  217  * Macros should be provided to handle
  218  * the usual cases for reading these groups.
  219  */
  220 
  221 #define BDP_INQ_DATA    0x10            /* input queue data mux */
  222 #define BDP_INQ_ADDR    0x20            /* input queue address mux */
  223 #define BDP_WAR         0x30            /* write address register (for ECC) */
  224 #define BDP_BASE_ADDR   0x40            /* base address latch */
  225 #define BDP_MASK_ADDR   0x50            /* mask address latch */
  226 #define BDP_QUEUE_PTRS  0x60            /* queue pointers */
  227 #define BDP_GOSEL_MUX   0x70            /* go select MUX */
  228 
  229 /*
  230  * Generic masks for bit manipulations
  231  */
  232 #define BITS72          0xFC            /* 7:2 bits of a byte */
  233 
  234 /*
  235  * Input queue address mux byte mark macro
  236  */
  237 #define BDP_IQA_BM(bm)          ((bm) & BM_MASK)
  238 
  239 /*
  240  * Input queue zero flag (4:0) macros
  241  */
  242 #define BDP_IQZ_WR(flg)         (CYCLE3(flg))
  243 #define BDP_IQZ_INV(flg)        (~(CYCLE6(flg) ^ CYCLE3(flg)))
  244 
  245 /*
  246  * BDP_IQZ_SZ:
  247  * Size bit combinations (5:4:1 for bits 2:0) are: 
  248  *                              32Bw    001
  249  *                              16Bw    011
  250  *                              16Bn    100
  251  *                              4Bn     110
  252  *                              8Bn     111
  253  */
  254 #define BDP_IQZ_SZ(flg) ( (CYCLE5(flg)|CYCLE4(flg)) >>3 | (CYCLE1(flg)>>1) )
  255 
  256 /*
  257  * Extract queue pointers from a BDP.
  258  */
  259 #define BDPQP_INQ1_WR(slic, slave) \
  260         (((rdSubslave((slic), (slave), BDP_QUEUE_PTRS + 0xE) & 1) << 2) \
  261          | ((rdSubslave((slic), (slave), BDP_QUEUE_PTRS + 0xF) >> 6) & 0x3))
  262 
  263 #define BDPQP_INQ1_RD(slic, slave) \
  264         ((rdSubslave((slic), (slave), BDP_QUEUE_PTRS + 0xE) >> 1) & 0x7)
  265 
  266 /*
  267  * Gosel byte mark macro
  268  */
  269 #define BDP_GS_BM(bm)           (((bm) & 0x0F) << 4)
  270 
  271 /*
  272  * Base address and mask address byte mark macros
  273  */
  274 #define BDP_BAMA_BM(bm)         ((bm) & 0x0F)
  275 
  276 /*
  277  * BDP data byte latch macros
  278  */
  279 
  280 /* Queue input          NOTE: addr is type (u_int)      */
  281 #define BDP_BYTE4Q(ct, bm)      ((u_char)((CYCLE63(ct) << 1) | (bm & 0x0F)))
  282 #define BDP_BYTE3Q(addr)        (((u_char *)&(addr)) [3])       /* get byte 3 */
  283 #define BDP_BYTE2Q(addr)        (((u_char *)&(addr)) [2])       /* get byte 2 */
  284 #define BDP_BYTE1Q(addr)        (((u_char *)&(addr)) [1])       /* get byte 1 */
  285 #define BDP_BYTE0Q(addr, ct)    ((((u_char *)&(addr)) [0] & BITS72)|(CYCLE21(ct) >> 1))
  286 
  287 /* Address Mux          NOTE: addr is type (u_int)      */
  288 #define BDP_BYTE4A(bm)          ((u_char)(bm & 0x0F))
  289 #define BDP_BYTE3A(addr)        (((u_char *)&(addr)) [3])       /* get byte 3 */
  290 #define BDP_BYTE2A(addr)        (((u_char *)&(addr)) [2])       /* get byte 2 */
  291 #define BDP_BYTE1A(addr)        (((u_char *)&(addr)) [1])       /* get byte 1 */
  292 #define BDP_BYTE0A(addr)        (((u_char *)&(addr)) [0] & BITS72)
  293 
  294 /* Data Mux             NOTE: data is type (u_int)      */
  295 #define BDP_BYTE4D(rr)          ((u_char)((rr) & RR_BITS31))
  296 #define BDP_BYTE3D(data)        (((u_char *)&(data)) [3])       /* get byte 3 */
  297 #define BDP_BYTE2D(data)        (((u_char *)&(data)) [2])       /* get byte 2 */
  298 #define BDP_BYTE1D(data)        (((u_char *)&(data)) [1])       /* get byte 1 */
  299 #define BDP_BYTE0D(data)        (((u_char *)&(data)) [0])       /* get byte 0 */
  300 
  301 
  302 /*
  303  * Bits used after BDPD2_ASRC_ARINC
  304  */
  305 #define BDPB0_COUNTER   0x03            /* counter in byte 0 */
  306 
  307 /*
  308  * Gather the cycle type bits together from
  309  * bytes 4 and 0 of a group.
  310  */
  311 
  312 #define BDP_CYCTYPE(byte4,byte0) \
  313         ( (((byte4) & BDP_CYCTYPE_HI) >> 2) | ((byte0) & BDP_CYCTYPE_LO) )
  314 
  315 #endif  /* _SQT_BDP_H_ */

Cache object: 9ee40684620d0dd7751bc0b4010e9fe0


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.