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/sqtconf/conf_zd.c

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:        conf_zd.c,v $
   32  * Revision 2.3  91/07/31  18:05:48  dbg
   33  *      Changed copyright.
   34  *      [91/07/31            dbg]
   35  * 
   36  * Revision 2.2  91/05/08  13:03:34  dbg
   37  *      Adapted for pure Mach kernel.
   38  *      [90/10/05            dbg]
   39  * 
   40  */
   41 
   42 #ifndef lint
   43 static  char    rcsid[] = "$Header: conf_zd.c,v 2.3 91/07/31 18:05:48 dbg Exp $";
   44 #endif
   45 
   46 /*
   47  * configuration of disks on the ZDC
   48  *
   49  * WARNING: If the tables are partially filled in unpredictable results
   50  *          *WILL* occur.
   51  */
   52 
   53 /*
   54  * Revision 1.1  89/07/05  13:17:43  kak
   55  * Initial revision
   56  * 
   57  * Revision 1.8  89/01/12  14:22:51  djg
   58  * zdccmdtime is now of type unsigned.
   59  * 
   60  * Revision 1.7  88/03/23  18:27:49  neal
   61  * Added m2382k (swallow 5) support to ZDC.
   62  * 
   63  */
   64 #include <device/buf.h>
   65 
   66 #include <sqt/mutex.h>
   67 #include <sqtzdc/zdc.h>
   68 
   69 /*
   70  *      Part A. Partition tables.
   71  *
   72  * On all drives, the first cylinder is reserved for disk description data
   73  * and the last two cylinders are reserved for diagnostics. No partition
   74  * which will contain a filesystem should include any of these cylinders.
   75  *
   76  * N.B.: The stand-alone driver knows these offsets.
   77  *
   78  * The zdparts table is indexed by drive type.
   79  * Note that this list is order dependent. New entries *must*
   80  * correspond with the drive type.
   81  *
   82  * NOTE: The newfs utility ASSUMES that the 'c' partition starts at the
   83  *       beginning of the disk when writing the bootstrap program.
   84  *       The bootstrap program is written when a root filesystem is created.
   85  *       The newfs utility ASSUMES that the 'a' partition is the root
   86  *       filesystem. However, by writing the bootstrap to partition 'c' the
   87  *       'a' partition may be moved to the middle of the disk to reduce
   88  *       seek latency.
   89  *       If the 'c' partition is changed so that it does not include the
   90  *       start of the disk, then be sure to use the "-n" option to newfs
   91  *       and use /stand/installboot to write the bootstrap program (at least
   92  *       1 partition must start at the beginning of the disk).
   93  */
   94 
   95 struct zdsize m2333k[NUMPARTS] = {      /* Fujitsu M2333K (swallow) */
   96          25*66*10,      335,    /* A=cyl 335 thru 359 */
   97         102*66*10,      360,    /* B=cyl 360 thru 461 */
   98         820*66*10,        1,    /* C=cyl   1 thru 820 */
   99         410*66*10,        1,    /* D=cyl   1 thru 410 */
  100         410*66*10,      411,    /* E=cyl 411 thru 820 */
  101         359*66*10,        1,    /* F=cyl   1 thru 359 */
  102         359*66*10,      462,    /* G=cyl 462 thru 820 */
  103         334*66*10,        1,    /* H=cyl   1 thru 334 */
  104 };
  105 
  106 struct zdsize m2351a[NUMPARTS] = {      /* Fujitsu M2351A (Eagle) */
  107          18*46*20,      366,    /* A=cyl 366 thru 383 */
  108          73*46*20,      384,    /* B=cyl 384 thru 456 */
  109         839*46*20,        1,    /* C=cyl   1 thru 839 */
  110         419*46*20,        1,    /* D=cyl   1 thru 419 */
  111         419*46*20,      420,    /* E=cyl 420 thru 838 */
  112         383*46*20,        1,    /* F=cyl   1 thru 383 */
  113         383*46*20,      457,    /* G=cyl 457 thru 839 */
  114         365*46*20,        1,    /* H=cyl   1 thru 365 */
  115 };
  116 
  117 struct zdsize m2344k[NUMPARTS] = {      /* Fujitsu M2344K (swallow 4) */
  118          10*66*27,      282,    /* A=cyl 282 thru 291 */
  119          38*66*27,      292,    /* B=cyl 292 thru 329 */
  120         621*66*27,        1,    /* C=cyl   1 thru 621 */
  121         310*66*27,        1,    /* D=cyl   1 thru 310 */
  122         311*66*27,      311,    /* E=cyl 311 thru 621 */
  123         291*66*27,        1,    /* F=cyl   1 thru 291 */
  124         292*66*27,      330,    /* G=cyl 330 thru 621 */
  125         281*66*27,        1,    /* H=cyl   1 thru 281 */
  126 };
  127 
  128 struct zdsize m2382k[NUMPARTS] = {      /* Fujitsu M2382K (swallow 5) */
  129          8*81*27,       348,    /* A=cyl 348 thru 355 */
  130          32*81*27,      356,    /* B=cyl 356 thru 387 */
  131         742*81*27,        1,    /* C=cyl   1 thru 742 */
  132         371*81*27,        1,    /* D=cyl   1 thru 371 */
  133         371*81*27,      372,    /* E=cyl 372 thru 742 */
  134         355*81*27,        1,    /* F=cyl   1 thru 355 */
  135         355*81*27,      388,    /* G=cyl 388 thru 742 */
  136         347*81*27,        1,    /* H=cyl   1 thru 347 */
  137 };
  138 
  139 struct zdsize cdc9715_340[NUMPARTS] = { /* CDC 9715-340 (FSD) */
  140          21*34*24,      292,    /* A=cyl 292 thru 312 */
  141          83*34*24,      313,    /* B=cyl 313 thru 395 */
  142         708*34*24,        1,    /* C=cyl   1 thru 708 */
  143         354*34*24,        1,    /* D=cyl   1 thru 354 */
  144         354*34*24,      355,    /* E=cyl 355 thru 708 */
  145         312*34*24,        1,    /* F=cyl   1 thru 312 */
  146         313*34*24,      396,    /* G=cyl 396 thru 708 */
  147         291*34*24,        1,    /* H=cyl   1 thru 291 */
  148 };
  149 
  150 struct zdsize cdc9771_800[NUMPARTS] = { /* CDC 9771-800 (XMD) */
  151          12*85*16,      474,    /* A=cyl 474 thru 485 */
  152          50*85*16,      486,    /* B=cyl 486 thru 535 */
  153         1021*85*16,       1,    /* C=cyl   1 thru 1021 */
  154         511*85*16,        1,    /* D=cyl   1 thru 511 */
  155         510*85*16,      512,    /* E=cyl 512 thru 1021 */
  156         485*85*16,        1,    /* F=cyl   1 thru 485 */
  157         486*85*16,      536,    /* G=cyl 536 thru 1021 */
  158         473*85*16,        1,    /* H=cyl   1 thru 473 */
  159 };
  160 
  161 /*
  162  * A null zdsize array for Reserved drive types
  163  * Done this way since driver already checks for a partition
  164  * length of zero.  Otherwise additonal code to check
  165  * for NULL pointer in zdparts[] would be required.
  166  */
  167 struct zdsize zd_nulltype[NUMPARTS] = { /* Used for reserved types */
  168         0,      0,
  169         0,      0,
  170         0,      0,
  171         0,      0,
  172         0,      0,
  173         0,      0,
  174         0,      0,
  175         0,      0,
  176 };
  177 
  178 struct zdsize *zdparts[] = {
  179         m2333k,                 /* 0 - Fujitsu M2333K (swallow) */
  180         m2351a,                 /* 1 - Fujitsu M2351A (Eagle) */
  181         m2344k,                 /* 2 - Fujitsu M2344K (swallow 4) */
  182         m2382k,                 /* 3 - Fujitsu M2382K (swallow 5) */
  183         zd_nulltype,            /* 4 - Reserved */
  184         zd_nulltype,            /* 5 - Reserved */
  185         zd_nulltype,            /* 6 - Reserved */
  186         zd_nulltype,            /* 7 - Reserved */
  187         zd_nulltype,            /* 8 - Reserved */
  188         zd_nulltype,            /* 9 - Reserved */
  189         zd_nulltype,            /* 10 - Reserved */
  190         zd_nulltype,            /* 11 - Reserved */
  191         zd_nulltype,            /* 12 - Reserved */
  192         zd_nulltype,            /* 13 - Reserved */
  193         zd_nulltype,            /* 14 - Reserved */
  194         zd_nulltype,            /* 15 - Reserved */
  195         cdc9715_340,            /* 16 - CDC 9715-340 MB (FSD) */
  196         cdc9771_800,            /* 17 - CDC 9771-800 MB (XMD) */
  197 };
  198 int     zdntypes        = sizeof (zdparts) / sizeof(struct zdsize *);
  199 
  200 /*
  201  *      Part B. Global Information.
  202  */
  203 
  204 /*
  205  * If the number of zdc_iovpercb is 0 then the driver will automatically
  206  * allocate enough iovecs to handle max_RAW_IO (see physio()).
  207  * If the number of zdc_iovpercb is non-zero, then the value specified
  208  * is allocated if it is less than max_RAW_IO. If the specified value is
  209  * greater than max_RAW_IO the number is reduced to handle max_RAW_IO.
  210  */
  211 int     zdc_iovpercb    = 0;                    /* no of iovecs per cb */
  212 
  213 int     zdc_err_bin     = 7;                    /* Error interrupt bin */
  214 int     zdc_cb_bin      = 5;                    /* CB interrupt bin */
  215 gate_t  zdcgate         = 62;                   /* gate for zdc locks/semas */
  216 /*
  217  * polled command timeout, should be approx. 30 secs.
  218  */
  219 unsigned int    zdccmdtime      = 30000000;
  220 /*
  221  * controller ready timeout, should be >= 60 secs.
  222  */
  223 unsigned int    zdcinitime      = 2400000;
  224 short   zdcretry        = 10;                   /* retry count */
  225 int     zdc_AB_throttle = 2;                    /* Channel A&B DMA throttle */
  226 int     zdc_C_throttle  = 2;                    /* Channel C DMA throttle */
  227 u_char  zdctrl = ZDC_DUMPONPANIC;               /* ZDC_INIT control bits */

Cache object: ef4e51d5d159cc098920ccc099712152


[ 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.