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/i386ps2/conf.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) 1993-1989 Carnegie Mellon University
    4  * Copyright (c) 1991 IBM Corporation 
    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  * and that the name IBM not be used in advertising or publicity 
   13  * pertaining to distribution of the software without specific, written
   14  * prior permission.
   15  * 
   16  * CARNEGIE MELLON AND IBM ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   17  * CONDITION.  CARNEGIE MELLON AND IBM DISCLAIM ANY LIABILITY OF ANY KIND FOR
   18  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   19  * 
   20  * Carnegie Mellon requests users of this software to return to
   21  * 
   22  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   23  *  School of Computer Science
   24  *  Carnegie Mellon University
   25  *  Pittsburgh PA 15213-3890
   26  * 
   27  * any improvements or extensions that they make and grant Carnegie Mellon
   28  * the rights to redistribute these changes.
   29  */
   30 
   31 /*
   32  * COMPONENT_NAME: (CONSOLE) Console driver
   33  *
   34  * FUNCTIONS: 
   35  *
   36  * ORIGINS: 6, 27
   37  */
   38 
   39 /* 
   40  * HISTORY
   41  * $Log:        conf.c,v $
   42  * Revision 2.4  93/05/18  11:20:08  rvb
   43  *      Lint: <>map is now a vm_offset_t
   44  * 
   45  * Revision 2.3  93/02/05  08:20:24  danner
   46  *      Fix includes.
   47  * 
   48  * 
   49  * Revision 2.2  93/02/04  07:59:07  danner
   50  *      Integrate PS2 code from IBM.
   51  *      [93/01/18            prithvi]
   52  * 
   53  * Revision 2.5  91/01/08  17:32:42  rpd
   54  *      Support for get/set status on hd and fd.
   55  *      Also fd has 64 minor devices per unit.
   56  *      Switch wd8003 -> ns8390
   57  *      [91/01/04  12:17:15  rvb]
   58  * 
   59  * Revision 2.4  90/10/01  14:23:02  jeffreyh
   60  *      added wd8003 ethernet driver
   61  *      [90/09/27  18:23:53  jeffreyh]
   62  * 
   63  * Revision 2.3  90/05/21  13:26:53  dbg
   64  *      Add mouse, keyboard, IOPL devices.
   65  *      [90/05/17            dbg]
   66  * 
   67  * Revision 2.2  90/05/03  15:41:34  dbg
   68  *      Add 3c501 under name 'et'.
   69  *      [90/04/27            dbg]
   70  * 
   71  *      Created.
   72  *      [90/02/20            dbg]
   73  * 
   74  */
   75 
   76 /*
   77  * Device switch for i386 AT bus.
   78  */
   79 
   80 #include <mach/machine/vm_types.h>
   81 #include <device/conf.h>
   82 
   83 extern vm_offset_t block_io_mmap();
   84 
   85 extern int      timeopen(), timeclose();
   86 extern vm_offset_t timemmap();
   87 #define timename                "time"
   88 
   89 #include <hd.h>
   90 #if     NHD > 0
   91 extern int      hdopen(), hdclose(), hdread(), hdwrite();
   92 extern int      hdgetstat(), hdsetstat();
   93 #define hdname                  "hd"
   94 #endif  NHD > 0
   95 
   96 #include <fd.h>
   97 #if     NFD > 0
   98 extern int      fdopen(), fdclose(), fdread(), fdwrite();
   99 extern int      fdgetstat(), fdsetstat();
  100 #define fdname                  "fd"
  101 #endif  NFD > 0
  102 
  103 #include <wt.h>
  104 #if     NWT > 0
  105 extern int      wtopen(), wtread(), wtwrite(), wtclose();
  106 #define wtname                  "wt"
  107 #endif  NWT > 0
  108 
  109 #include <pc586.h>
  110 #if     NPC586 > 0
  111 extern int      pc586open(), pc586output(), pc586getstat(), pc586setstat(),
  112                 pc586setinput();
  113 #define pc586name               "pc"
  114 #endif NPC586 > 0
  115 
  116 #include <ns8390.h>
  117 #if     NNS8390 > 0
  118 extern int      ns8390open(), ns8390output(), ns8390getstat(), ns8390setstat(),
  119                 ns8390setinput();
  120 #define ns8390wdname            "wd"
  121 #define ns8390elname            "el"
  122 #endif NNS8390 > 0
  123 
  124 #include <at3c501.h>
  125 #if     NAT3C501 > 0
  126 extern int      at3c501open(), at3c501output(),
  127                 at3c501getstat(), at3c501setstat(),
  128                 at3c501setinput();
  129 #define at3c501name             "et"
  130 #endif NAT3C501 > 0
  131 
  132 #include <un.h>
  133 #if     NUN > 0
  134 extern int      unopen(), unoutput(), ungetstat(), unsetstat(),
  135                 unsetinput();
  136 #define unname          "un"
  137 #endif NUN > 0
  138 
  139 #include <tr.h>
  140 #if     NTR > 0
  141 extern int      tropen(), troutput(), trgetstat(), trsetstat(),
  142                 trsetinput();
  143 #define trname          "tr"
  144 #endif  NTR > 0
  145 
  146 #include <ibm_console.h>
  147 #if IBM_CONSOLE > 0
  148 extern int      cnopen(), cnclose(), cnread(), cnwrite();
  149 extern int      cngetstat(), cnsetstat(), cnportdeath();
  150 extern vm_offset_t cnmmap();
  151 #define cnname                  "cn"
  152 #else IBM_CONSOLE > 0
  153 extern int      kdopen(), kdclose(), kdread(), kdwrite();
  154 extern int      kdgetstat(), kdsetstat(), kdportdeath();
  155 extern vm_offset_t kdmmap();
  156 #define kdname                  "kd"
  157 #endif IBM_CONSOLE > 0
  158 
  159 #include <com.h>
  160 #if     NCOM > 0
  161 extern int      comopen(), comclose(), comread(), comwrite();
  162 extern int      comgetstat(), comsetstat(), comportdeath();
  163 #define comname                 "com"
  164 #endif  NCOM > 0
  165 
  166 #include <qd.h>
  167 #if     NQD > 0
  168 extern int      qdopen(), qdclose(), qdread(), qdwrite(), qdioctl();
  169 #define qdname                  "qd"
  170 #endif  NQD > 0
  171 
  172 #include <blit.h>
  173 #if NBLIT > 0
  174 extern int      blitopen(), blitclose(), blit_get_stat();
  175 extern vm_offset_t blitmmap();
  176 #define blitname                "blit"
  177 #endif
  178 
  179 extern int      kbdopen(), kbdclose(), kbdread();
  180 extern int      kbdgetstat(), kbdsetstat();
  181 #define kbdname                 "kbd"
  182 
  183 #include <mouse.h>
  184 #if NMOUSE > 0
  185 extern int      mouseinit(), mouseopen(), mouseclose();
  186 extern int      mousegetstat(), mousesetstat(), mouseread();
  187 #define mousename               "mouse"
  188 #endif
  189 
  190 extern int      ioplopen(), ioplclose();
  191 extern vm_offset_t ioplmmap();
  192 #define ioplname                "iopl"
  193 
  194 
  195 /*
  196  * List of devices - console must be at slot 0
  197  */
  198 struct dev_ops  dev_name_list[] =
  199 {
  200         /*name,         open,           close,          read,
  201           write,        getstat,        setstat,        mmap,
  202           async_in,     reset,          port_death,     subdev,
  203           dev_info */
  204 
  205 #if IBM_CONSOLE > 0
  206         { cnname,       cnopen,         cnclose,        cnread,
  207           cnwrite,      cngetstat,      cnsetstat,      cnmmap,
  208           nodev,        nulldev,        cnportdeat,     0,
  209           nodev },
  210 #else IBM_CONSOLE > 0
  211         { kdname,       kdopen,         kdclose,        kdread,
  212           kdwrite,      kdgetstat,      kdsetstat,      kdmmap,
  213           nodev,        nulldev,        kdportdeath,    0,
  214           nodev },
  215 #endif IBM_CONSOLE > 0
  216 
  217         { timename,     timeopen,       timeclose,      nulldev,
  218           nulldev,      nulldev,        nulldev,        timemmap,
  219           nodev,        nulldev,        nulldev,        0,
  220           nodev },
  221 
  222 #if     NHD > 0
  223         { hdname,       hdopen,         hdclose,        hdread,
  224           hdwrite,      hdgetstat,      hdsetstat,      nomap,
  225           nodev,        nulldev,        nulldev,        16,
  226           nodev },
  227 #endif  NHD > 0
  228 
  229 #if     NFD > 0
  230         { fdname,       fdopen,         fdclose,        fdread,
  231           fdwrite,      fdgetstat,      fdsetstat,      nomap,
  232           nodev,        nulldev,        nulldev,        64,
  233           nodev },
  234 #endif  NFD > 0
  235 
  236 #if     NWT > 0
  237         { wtname,       wtopen,         wtclose,        wtread,
  238           wtwrite,      nulldev,        nulldev,        nomap,
  239           nodev,        nulldev,        nulldev,        0,
  240           nodev },
  241 #endif  NWT > 0
  242 
  243 #if     NPC586 > 0
  244         { pc586name,    pc586open,      nulldev,        nulldev,
  245           pc586output,  pc586getstat,   pc586setstat,   nomap,
  246           pc586setinput,nulldev,        nulldev,        0,
  247           nodev },
  248 #endif
  249 
  250 #if     NAT3C501 > 0
  251         { at3c501name,  at3c501open,    nulldev,        nulldev,
  252           at3c501output,at3c501getstat, at3c501setstat, nomap,
  253           at3c501setinput, nulldev,     nulldev,        0,
  254           nodev },
  255 #endif
  256 
  257 #if     NNS8390 > 0
  258         { ns8390wdname, ns8390open,     nulldev,        nulldev,
  259           ns8390output, ns8390getstat,  ns8390setstat,  nomap,
  260           ns8390setinput, nulldev,      nulldev,        0,
  261           nodev },
  262 
  263         { ns8390elname, ns8390open,     nulldev,        nulldev,
  264           ns8390output, ns8390getstat,  ns8390setstat,  nomap,
  265           ns8390setinput, nulldev,      nulldev,        0,
  266           nodev },
  267 #endif
  268 
  269 #if     NUN > 0
  270         { unname,       unopen, nulldev,        nulldev,
  271           unoutput,     ungetstat,      unsetstat,      nomap,
  272           unsetinput,   nulldev,        nulldev,        0,
  273           nodev },
  274 #endif
  275 
  276 #if     NTR > 0
  277         { trname,       tropen, nulldev,        nulldev,
  278           troutput,     trgetstat,      trsetstat,      nomap,
  279           trsetinput,   nulldev,        nulldev,        0,
  280           nodev },
  281 #endif
  282 
  283 #if     NBLIT > 0
  284         { blitname,     blitopen,       blitclose,      nodev,
  285           nodev,        blit_get_stat,  nodev,          blitmmap,
  286           nodev,        nodev,          nodev,  0,
  287           nodev },
  288 #endif
  289 
  290 #if     NMOUSE > 0
  291         { mousename,    mouseopen,      mouseclose,     mouseread,
  292           nodev,        mousegetstat,   mousesetstat,   nomap,
  293           nodev,        nulldev,        nulldev,        0,
  294           nodev },
  295 #endif
  296 
  297         { kbdname,      kbdopen,        kbdclose,       kbdread,
  298           nodev,        kbdgetstat,     kbdsetstat,     nomap,
  299           nodev,        nulldev,        nulldev,        0,
  300           nodev },
  301 
  302         { ioplname,     ioplopen,       ioplclose,      nodev,
  303           nodev,        nodev,          nodev,          ioplmmap,
  304           nodev,        nulldev,        nulldev,        0,
  305           nodev },
  306 };
  307 int     dev_name_count = sizeof(dev_name_list)/sizeof(dev_name_list[0]);
  308 
  309 /*
  310  * Indirect list.
  311  */
  312 struct dev_indirect dev_indirect_list[] = {
  313 
  314         /* console */
  315         { "console",    &dev_name_list[0],      0 }
  316 };
  317 int     dev_indirect_count = sizeof(dev_indirect_list)
  318                                 / sizeof(dev_indirect_list[0]);

Cache object: d70d43adb14c810f50eeb328b79530c7


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