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/dev/eisa/eisareg.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*      $OpenBSD: eisareg.h,v 1.4 1996/05/05 12:42:24 deraadt Exp $     */
    2 /*      $NetBSD: eisareg.h,v 1.3 1996/04/09 22:46:13 cgd Exp $  */
    3 
    4 /*
    5  * Copyright (c) 1995, 1996 Christopher G. Demetriou
    6  * All rights reserved.
    7  *
    8  * Redistribution and use in source and binary forms, with or without
    9  * modification, are permitted provided that the following conditions
   10  * are met:
   11  * 1. Redistributions of source code must retain the above copyright
   12  *    notice, this list of conditions and the following disclaimer.
   13  * 2. Redistributions in binary form must reproduce the above copyright
   14  *    notice, this list of conditions and the following disclaimer in the
   15  *    documentation and/or other materials provided with the distribution.
   16  * 3. All advertising materials mentioning features or use of this software
   17  *    must display the following acknowledgement:
   18  *      This product includes software developed by Christopher G. Demetriou
   19  *      for the NetBSD Project.
   20  * 4. The name of the author may not be used to endorse or promote products
   21  *    derived from this software without specific prior written permission
   22  *
   23  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   24  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   25  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   26  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   27  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   28  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   29  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   30  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   31  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   32  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   33  */
   34 
   35 #ifndef __DEV_EISA_EISAREG_H__
   36 #define __DEV_EISA_EISAREG_H__
   37 
   38 /*
   39  * Register (etc.) descriptions for the EISA bus.
   40 
   41  * Mostly culled from EISA chipset descriptions in:
   42  *      Intel Peripheral Components Databook (1992)
   43  */
   44 
   45 /*
   46  * Slot I/O space size, and I/O address of a given slot.
   47  */
   48 #define EISA_SLOT_SIZE          0x1000
   49 #define EISA_SLOT_ADDR(s)       ((s) * EISA_SLOT_SIZE)
   50 
   51 /*
   52  * Slot offsets for important/standard registers.
   53  */
   54 #define EISA_SLOTOFF_VID        0xc80           /* offset of vendor id regs */
   55 #define EISA_NVIDREGS           2
   56 #define EISA_SLOTOFF_PID        0xc82           /* offset of product id regs */
   57 #define EISA_NPIDREGS           2
   58 
   59 #ifdef AHA284X_HACK
   60 /*
   61  * AHA-284x (VL bus) requires priming a register with the following values.
   62  */
   63 #define EISA_SLOTOFF_PRIMING    EISA_SLOTOFF_VID        /* offset */
   64 #define EISA_PRIMING_VID(index) (0x80 + (index))        /* value for vendor */
   65 #define EISA_PRIMING_PID(index) (0x82 + (index))        /* value for product */
   66 #endif
   67 
   68 /*
   69  * EISA ID functions, used to manipulate and decode EISA ID registers.
   70  * ``Somebody was let out without adult supervision.''
   71  */
   72 
   73 #define EISA_IDSTRINGLEN        8       /* length of ID string, incl. NUL */
   74 
   75 /*
   76  * Vendor ID: three characters, encoded in 16 bits.
   77  *
   78  * EISA_VENDID_NODEV returns true if there's no device in the slot.
   79  * EISA_VENDID_IDDELAY returns true if there's a device in the slot,
   80  *      but that device hasn't been configured by system firmware.
   81  * EISA_VENDID_n returns the "n"th character of the vendor ID.
   82  */
   83 #define EISA_VENDID_NODEV(vid)                                          \
   84             (((vid)[0] & 0x80) != 0)
   85 #define EISA_VENDID_IDDELAY(vid)                                        \
   86             (((vid)[0] & 0xf0) == 0x70)
   87 #define EISA_VENDID_0(vid)                                              \
   88             ((((vid)[0] & 0x7c) >> 2) + '@')
   89 #define EISA_VENDID_1(vid)                                              \
   90             (((((vid)[0] & 0x03) << 3) | (((vid)[1] & 0xe0) >> 5)) + '@')
   91 #define EISA_VENDID_2(vid)                                              \
   92             (((vid)[1] & 0x1f) + '@')
   93 
   94 /*
   95  * Product ID: four hex digits, encoded in 16 bits (normal, sort of).
   96  *
   97  * EISA_PRIDID_n returns the "n"th hex digit of the product ID.
   98  */
   99 #define __EISA_HEX_MAP  "0123456789ABCDEF"
  100 #define EISA_PRODID_0(pid)                                              \
  101             (__EISA_HEX_MAP[(((pid)[0] >> 4) & 0xf)])
  102 #define EISA_PRODID_1(pid)                                              \
  103             (__EISA_HEX_MAP[(((pid)[0] >> 0) & 0xf)])
  104 #define EISA_PRODID_2(pid)                                              \
  105             (__EISA_HEX_MAP[(((pid)[1] >> 4) & 0xf)])
  106 #define EISA_PRODID_3(pid)                                              \
  107             (__EISA_HEX_MAP[(((pid)[1] >> 0) & 0xf)])
  108 
  109 #endif /* !__DEV_EISA_EISAREG_H__ */

Cache object: 5de7291cec9ebf9380f28d9ca8a0f88b


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