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/bus.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,1990,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  * HISTORY
   33  * $Log:        bus.h,v $
   34  * Revision 2.3  93/03/11  14:08:48  danner
   35  *      u_long -> u_int
   36  *      [93/03/09            danner]
   37  * 
   38  *      [93/03/09            danner]
   39  * 
   40  * Revision 2.2  93/02/04  07:59:01  danner
   41  *      Integrate PS2 code from IBM.
   42  *      [93/01/18            prithvi]
   43  * 
   44  */
   45 /*
   46  * Copyright (c) 1982, 1986 Regents of the University of California.
   47  * All rights reserved.  The Berkeley software License Agreement
   48  * specifies the terms and conditions for redistribution.
   49  *
   50  *      @(#)ubavar.h    7.1 (Berkeley) 6/5/86
   51  */
   52 
   53 
   54 /*
   55  * per-controller & driver definitions
   56  */
   57 
   58 #ifndef ASSEMBLER
   59 #include <sys/types.h>
   60 
   61 #define i386_ctlr isa_ctlr      /* backwards compatibility */
   62 #define i386_dev isa_dev        /* backwards compatibility */
   63 #define i386_driver isa_driver  /* backwards compatibility */
   64 
   65 /*
   66  * Per-controller structure.
   67  * (E.g. one for each disk and tape controller, and other things
   68  * which have slave-style devices).
   69  *
   70  */
   71 struct isa_ctlr {
   72         struct  isa_driver *ctlr_driver;
   73         long    ctlr_ctlr;      /* controller index in driver */
   74         long    ctlr_alive;     /* controller exists */
   75         caddr_t ctlr_addr;      /* csr address */
   76         long    ctlr_spl;       /* spl level set upon interrupt */
   77         long    ctlr_pic;       /* pic line for controller */
   78         int     (**ctlr_intr)();/* interrupt handler */
   79         caddr_t ctlr_start;     /* start address in mem space */
   80         u_int   ctlr_len;       /* length of mem space used */
   81 };
   82 
   83 /*
   84  * Per ``device'' structure.
   85  * (Everything else is a ``device''.)
   86  *
   87  * If a controller has many drives attached, then there will
   88  * be several isa_dev structures associated
   89  *
   90  */
   91 struct isa_dev {
   92         struct  isa_driver *dev_driver;
   93         long    dev_unit;       /* unit number on the system */
   94         long    dev_ctlr;       /* ctlr number; -1 if none */
   95         long    dev_slave;      /* slave on controller */
   96         long    dev_alive;      /* Was it found at config time? */
   97         caddr_t dev_addr;       /* csr address */
   98         short   dev_spl;        /* spl level */
   99         long    dev_pic;        /* pic line for device */
  100         long    dev_dk;         /* if init 1 set to number for iostat */
  101         long    dev_flags;      /* parameter from system specification */
  102         int     (**dev_intr)(); /* interrupt handler(s) */
  103         caddr_t dev_start;      /* start address in mem space */
  104         u_int   dev_len;        /* length of mem space used */
  105         long    dev_type;       /* driver specific type information */
  106 /* this is the forward link in a list of devices on a controller */
  107         struct  isa_dev *dev_forw;
  108 /* if the device is connected to a controller, this is the controller */
  109         struct  isa_ctlr *dev_mi;
  110 };
  111 
  112 /*
  113  * Per-driver structure.
  114  *
  115  * Each driver defines entries for a set of routines for use
  116  * at boot time by the autoconfig routines.
  117  */
  118 struct isa_driver {
  119         int     (*driver_probe)();      /* see if a driver is really there */
  120         int     (*driver_slave)();      /* see if a slave is there */
  121         int     (*driver_attach)();     /* setup driver for a slave */
  122         char    *driver_dname;          /* name of a device */
  123         struct  isa_dev **driver_dinfo;/* backptrs to init structs */
  124         char    *driver_mname;          /* name of a controller */
  125         struct  isa_ctlr **driver_minfo;/* backpointers to init structs */
  126 };
  127 
  128 #define MAX_POS_SLOTS   8       /* max number of slots */
  129 #define MAX_POS_BYTES   8       /* max number of bytes */
  130 #define MAX_POS_INFO    6       /* max number of info bytes */
  131 
  132 #define POS_DISABLE_VGA 0x94
  133 #define POS_PORT        0x96
  134 #define POS_ENABLE(slot) (0x08+(slot))
  135 #define POS_DISABLE     0x00
  136 #define POS_GET_DATA(slot) inb(0x100+(slot))
  137 
  138 #define POS_ID_NONE     0xffff  /* no card present */
  139 
  140 struct pos_info {
  141         union {
  142                 u_short un_pos_id;              /* the ID as a short */
  143                 u_char  un_data[2];             /* first two bytes of data */
  144         } un;
  145         u_char  pos_info[MAX_POS_INFO];         /* the bytes from hardware */
  146 } slots[MAX_POS_SLOTS];
  147 
  148 #define pos_data un.un_data
  149 #define pos_id un.un_pos_id
  150 
  151 #endif

Cache object: c39d47662eaa1dfddfb30878d881a5f7


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