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/i386at/if_wd8003.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  * All Rights Reserved.
    5  * 
    6  * Permission to use, copy, modify and distribute this software and its
    7  * documentation is hereby granted, provided that both the copyright
    8  * notice and this permission notice appear in all copies of the
    9  * software, derivative works or modified versions, and any portions
   10  * thereof, and that both notices appear in supporting documentation.
   11  * 
   12  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   13  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   14  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   15  * 
   16  * Carnegie Mellon requests users of this software to return to
   17  * 
   18  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   19  *  School of Computer Science
   20  *  Carnegie Mellon University
   21  *  Pittsburgh PA 15213-3890
   22  * 
   23  * any improvements or extensions that they make and grant Carnegie Mellon
   24  * the rights to redistribute these changes.
   25  */
   26 /* 
   27  * HISTORY
   28  * $Log:        if_wd8003.h,v $
   29  * Revision 2.9  93/11/17  16:49:16  dbg
   30  *      Removed local declaration of HZ.
   31  *      [93/01/29            dbg]
   32  * 
   33  * Revision 2.8  92/02/19  15:08:34  elf
   34  *      Made names consistent with wd example driver. Add those missing.
   35  *      Add IFWD_ prefix to defines.
   36  *      [92/01/20            kivinen]
   37  * 
   38  * Revision 2.7  91/08/24  11:58:47  af
   39  *      Removed embedded control character that made gcc unhappy.
   40  *      [91/07/29            danner]
   41  * 
   42  * Revision 2.6  91/05/14  16:26:08  mrt
   43  *      Correcting copyright
   44  * 
   45  * Revision 2.5  91/02/05  17:18:38  mrt
   46  *      Changed to new Mach copyright
   47  *      [91/02/01  17:44:51  mrt]
   48  * 
   49  * Revision 2.4  91/01/08  17:33:20  rpd
   50  *      Flush generic NS8390 defines to an NS8390 header file.
   51  *      [91/01/04  12:20:35  rvb]
   52  * 
   53  * Revision 2.1.1.3  90/11/27  13:43:32  rvb
   54  *      Synched 2.5 & 3.0 at I386q (r2.1.1.3) & XMK35 (r2.3)
   55  *      [90/11/15            rvb]
   56  * 
   57  * Revision 2.2  90/10/01  14:23:27  jeffreyh
   58  * Revision 2.1  90/09/26  10:33:25  jeffreyh
   59  * Created.
   60  *      [90/09/26  10:34:39  jeffreyh]
   61  *
   62  * Revision 2.1.1.2  90/07/27  11:25:45  rvb
   63  *      Add boardID definitions.                [rweiss]
   64  * 
   65  * Revision 2.1.1.1  90/07/10  11:45:00  rvb
   66  *      Added to system.
   67  *      [90/07/06            rvb]
   68  * 
   69  */
   70 /*
   71  * Western Digital Mach Ethernet driver
   72  * Copyright (c) 1990 OSF Research Institute 
   73  */
   74 /*
   75   Copyright 1990 by Open Software Foundation,
   76 Cambridge, MA.
   77 
   78                 All Rights Reserved
   79 
   80   Permission to use, copy, modify, and distribute this software and
   81 its documentation for any purpose and without fee is hereby granted,
   82 provided that the above copyright notice appears in all copies and
   83 that both the copyright notice and this permission notice appear in
   84 supporting documentation, and that the name of OSF or Open Software
   85 Foundation not be used in advertising or publicity pertaining to
   86 distribution of the software without specific, written prior
   87 permission.
   88 
   89   OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
   90 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
   91 IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
   92 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
   93 LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
   94 NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
   95 WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   96 */
   97 
   98 /***********************************************************/
   99 /*  Defines for the 583 chip.                              */
  100 /***********************************************************/
  101 
  102 /*--- 8390 Registers ---*/
  103 #define OFF_8390        0x10    /* offset of the 8390 chip */
  104 
  105 /* Register offsets */
  106 
  107 #define IFWD_REG_0      0x00
  108 #define IFWD_REG_1      0x01
  109 #define IFWD_REG_2      0x02
  110 #define IFWD_REG_3      0x03
  111 #define IFWD_REG_4      0x04
  112 #define IFWD_REG_5      0x05
  113 #define IFWD_REG_6      0x06
  114 #define IFWD_REG_7      0x07
  115 
  116 /* Register offset definitions for all boards */
  117 
  118 #define IFWD_LAR_0      0x08
  119 #define IFWD_LAR_1      0x09
  120 #define IFWD_LAR_2      0x0a
  121 #define IFWD_LAR_3      0x0b
  122 #define IFWD_LAR_4      0x0c
  123 #define IFWD_LAR_5      0x0d
  124 #define IFWD_BOARD_ID   0x0e
  125 #define IFWD_CHKSUM     0x0f
  126 
  127 /* revision number mask for BOARD_ID */
  128 #define IFWD_BOARD_REV_MASK     0x1e
  129 
  130 /* REG 1 */
  131 #define IFWD_MEMSIZE    0x08
  132 #define IFWD_16BIT      0x01
  133 
  134 /* REG 5 */
  135 #define IFWD_REG5_MEM_MASK      0x3f /* B23-B19 of address of the memory */
  136 #define IFWD_LA19               0x01 /* B19 of address of the memory */
  137 #define IFWD_MEM16ENB           0x80 /* Enable 16 bit memory access from bus */
  138 #define IFWD_LAN16ENB           0x40 /* Enable 16 bit memory access from chip*/
  139 #define IFWD_INIT_LAAR          IFWD_LA19
  140 #define IFWD_SOFTINT            0x20 /* Enable interrupt from pc */
  141 
  142 /* Defs for board rev numbers > 1 */
  143 #define IFWD_MEDIA_TYPE         0x01
  144 #define IFWD_SOFT_CONFIG        0x20
  145 #define IFWD_RAM_SIZE           0x40
  146 #define IFWD_BUS_TYPE           0x80
  147 
  148 /* Register offsets for reading the EEPROM in the 584 chip */
  149 #define IFWD_EEPROM_0           0x08
  150 #define IFWD_EEPROM_1           0x09
  151 #define IFWD_EEPROM_2           0x0A
  152 #define IFWD_EEPROM_3           0x0B
  153 #define IFWD_EEPROM_4           0x0C
  154 #define IFWD_EEPROM_5           0x0D
  155 #define IFWD_EEPROM_6           0x0E
  156 #define IFWD_EEPROM_7           0x0F
  157 
  158 /**** defs for manipulating the 584 ****/
  159 #define IFWD_OTHER_BIT                  0x02
  160 #define IFWD_ICR_MASK                   0x0C
  161 #define IFWD_EAR_MASK                   0x0F
  162 #define IFWD_ENGR_PAGE                  0xA0
  163 /* #define IFWD_RLA                     0x10  defined in ICR defs */
  164 #define IFWD_EA6                        0x80
  165 #define IFWD_RECALL_DONE_MASK           0x10
  166 #define IFWD_EEPROM_MEDIA_MASK          0x07
  167 #define IFWD_STARLAN_TYPE               0x00
  168 #define IFWD_ETHERNET_TYPE              0x01
  169 #define IFWD_TP_TYPE                    0x02
  170 #define IFWD_EW_TYPE                    0x03
  171 #define IFWD_EEPROM_IRQ_MASK            0x18
  172 #define IFWD_PRIMARY_IRQ                0x00
  173 #define IFWD_ALTERNATE_IRQ_1            0x08
  174 #define IFWD_ALTERNATE_IRQ_2            0x10
  175 #define IFWD_ALTERNATE_IRQ_3            0x18
  176 #define IFWD_EEPROM_RAM_SIZE_MASK       0xE0
  177 #define IFWD_EEPROM_RAM_SIZE_RES1       0x00
  178 #define IFWD_EEPROM_RAM_SIZE_RES2       0x20
  179 #define IFWD_EEPROM_RAM_SIZE_8K         0x40
  180 #define IFWD_EEPROM_RAM_SIZE_16K        0x60
  181 #define IFWD_EEPROM_RAM_SIZE_32K        0x80
  182 #define IFWD_EEPROM_RAM_SIZE_64K        0xA0
  183 #define IFWD_EEPROM_RAM_SIZE_RES3       0xC0
  184 #define IFWD_EEPROM_RAM_SIZE_RES4       0xE0
  185 #define IFWD_EEPROM_BUS_TYPE_MASK       0x07
  186 #define IFWD_EEPROM_BUS_TYPE_AT         0x00
  187 #define IFWD_EEPROM_BUS_TYPE_MCA        0x01
  188 #define IFWD_EEPROM_BUS_TYPE_EISA       0x02
  189 #define IFWD_EEPROM_BUS_SIZE_MASK       0x18
  190 #define IFWD_EEPROM_BUS_SIZE_8BIT       0x00
  191 #define IFWD_EEPROM_BUS_SIZE_16BIT      0x08
  192 #define IFWD_EEPROM_BUS_SIZE_32BIT      0x10
  193 #define IFWD_EEPROM_BUS_SIZE_64BIT      0x18
  194 
  195 /*****************************************************************************
  196  *                                                                           *
  197  *   Definitions for board ID.                                               *
  198  *                                                                           *
  199  *   note: board ID should be ANDed with the STATIC_ID_MASK                  *
  200  *         before comparing to a specific board ID                           *
  201  *         The high order 16 bits correspond to the Extra Bits which do not  *
  202  *         change the boards ID.                                             *
  203  *                                                                           *
  204  *   Note: not all are implemented.  Rest are here for future enhancements...*
  205  *                                                                           *
  206  *****************************************************************************/
  207 
  208 #define IFWD_STARLAN_MEDIA      0x00000001      /* StarLAN */
  209 #define IFWD_ETHERNET_MEDIA     0x00000002      /* Ethernet */
  210 #define IFWD_TWISTED_PAIR_MEDIA 0x00000003      /* Twisted Pair */
  211 #define IFWD_EW_MEDIA           0x00000004      /* Ethernet and Twisted Pair */
  212 #define IFWD_MICROCHANNEL       0x00000008      /* MicroChannel Adapter */
  213 #define IFWD_INTERFACE_CHIP     0x00000010      /* Soft Config Adapter */
  214 /* #define IFWD_UNUSED          0x00000020 */   /* used to be INTELLIGENT */
  215 #define IFWD_BOARD_16BIT        0x00000040      /* 16 bit capability */
  216 #define IFWD_RAM_SIZE_UNKNOWN   0x00000000      /* 000 => Unknown RAM Size */
  217 #define IFWD_RAM_SIZE_RES_1     0x00010000      /* 001 => Reserved */
  218 #define IFWD_RAM_SIZE_8K        0x00020000      /* 010 => 8k RAM */
  219 #define IFWD_RAM_SIZE_16K       0x00030000      /* 011 => 16k RAM */
  220 #define IFWD_RAM_SIZE_32K       0x00040000      /* 100 => 32k RAM */
  221 #define IFWD_RAM_SIZE_64K       0x00050000      /* 101 => 64k RAM */
  222 #define IFWD_RAM_SIZE_RES_6     0x00060000      /* 110 => Reserved */
  223 #define IFWD_RAM_SIZE_RES_7     0x00070000      /* 111 => Reserved */
  224 #define IFWD_SLOT_16BIT         0x00080000      /* 16 bit board - 16 bit slot*/
  225 #define IFWD_NIC_690_BIT        0x00100000      /* NIC is 690 */
  226 #define IFWD_ALTERNATE_IRQ_BIT  0x00200000      /* Alternate IRQ is used */
  227 #define IFWD_INTERFACE_584_CHIP 0x00400000      /* Interface chip is a 584 */
  228 
  229 #define IFWD_MEDIA_MASK         0x00000007      /* Isolates Media Type */
  230 #define IFWD_RAM_SIZE_MASK      0x00070000      /* Isolates RAM Size */
  231 #define IFWD_STATIC_ID_MASK     0x0000FFFF      /* Isolates Board ID */
  232 
  233 /* Word definitions for board types */
  234 #define WD8003E         IFWD_ETHERNET_MEDIA
  235 #define WD8003EBT       WD8003E         /* functionally identical to WD8003E */
  236 #define WD8003S         IFWD_STARLAN_MEDIA
  237 #define WD8003SH        WD8003S         /* functionally identical to WD8003S */
  238 #define WD8003WT        IFWD_TWISTED_PAIR_MEDIA
  239 #define WD8003W         (IFWD_TWISTED_PAIR_MEDIA | IFWD_INTERFACE_CHIP)
  240 #define WD8003EB        (IFWD_ETHERNET_MEDIA | IFWD_INTERFACE_CHIP)
  241 #define WD8003EP        WD8003EB    /* with IFWD_INTERFACE_584_CHIP bit set */a
  242 #define WD8003EW        (IFWD_EW_MEDIA | IFWD_INTERFACE_CHIP)
  243 #define WD8003ETA       (IFWD_ETHERNET_MEDIA | IFWD_MICROCHANNEL)
  244 #define WD8003STA       (IFWD_STARLAN_MEDIA | IFWD_MICROCHANNEL)
  245 #define WD8003EA        (IFWD_ETHERNET_MEDIA | IFWD_MICROCHANNEL | \
  246                          IFWD_INTERFACE_CHIP)
  247 #define WD8003SHA       (IFWD_STARLAN_MEDIA | IFWD_MICROCHANNEL | \
  248                          IFWD_INTERFACE_CHIP)
  249 #define WD8003WA        (IFWD_TWISTED_PAIR_MEDIA | IFWD_MICROCHANNEL | \
  250                          IFWD_INTERFACE_CHIP)
  251 #define WD8013EBT       (IFWD_ETHERNET_MEDIA | IFWD_BOARD_16BIT)
  252 #define WD8013EB        (IFWD_ETHERNET_MEDIA | IFWD_BOARD_16BIT | \
  253                          IFWD_INTERFACE_CHIP)
  254 #define WD8013EP        WD8013EB    /* with IFWD_INTERFACE_584_CHIP bit set */
  255 #define WD8013W         (IFWD_TWISTED_PAIR_MEDIA | IFWD_BOARD_16BIT | \
  256                          IFWD_INTERFACE_CHIP)
  257 #define WD8013EW        (IFWD_EW_MEDIA | IFWD_BOARD_16BIT | \
  258                          IFWD_INTERFACE_CHIP)
  259 
  260 
  261 /**** Western digital node bytes ****/
  262 #define WD_NODE_ADDR_0  0x00
  263 #define WD_NODE_ADDR_1  0x00
  264 #define WD_NODE_ADDR_2  0xC0
  265 
  266 /*--- 83c583 registers ---*/
  267 #define IFWD_MSR        0x00            /* memory select register */
  268                                         /* In 584 Board's command register */
  269 #define IFWD_ICR        0x01            /* interface configuration register */
  270                                         /* In 584 8013 bus size register */
  271 #define IFWD_IAR        0x02            /* io address register */
  272 #define IFWD_BIO        0x03            /* bios ROM address register */
  273 #define IFWD_IRR        0x04            /* interrupt request register */
  274 #define IFWD_GP1        0x05            /* general purpose register 1 */
  275 #define IFWD_IOD        0x06            /* io data latch */
  276 #define IFWD_GP2        0x07            /* general purpose register 2 */
  277 #define IFWD_LAR        0x08            /* LAN address register */
  278 #define IFWD_LAR2       0x09            /*                      */
  279 #define IFWD_LAR3       0x0A            /*                      */
  280 #define IFWD_LAR4       0x0B            /*                      */
  281 #define IFWD_LAR5       0x0C            /*                      */
  282 #define IFWD_LAR6       0x0D            /*                      */
  283 #define IFWD_LAR7       0x0E            /*                      */
  284 #define IFWD_LAR8       0x0F            /* LAN address register */
  285 
  286 /********************* Register Bit Definitions **************************/
  287 /* MSR definitions */
  288 #define IFWD_RST        0x80            /* 1 => reset */
  289 #define IFWD_MENB       0x40            /* 1 => memory enable */
  290 #define IFWD_SA18       0x20            /* Memory enable bits   */
  291 #define IFWD_SA17       0x10            /*      telling where shared    */
  292 #define IFWD_SA16       0x08            /*      mem is to start.        */
  293 #define IFWD_SA15       0x04            /*      Assume SA19 = 1         */
  294 #define IFWD_SA14       0x02            /*                              */
  295 #define IFWD_SA13       0x01            /*                              */
  296 
  297 /* ICR definitions */
  298 #define IFWD_STR        0x80            /* Non-volatile EEPROM store    */
  299 #define IFWD_RCL        0x40            /* Recall I/O Address from EEPROM */
  300 #define IFWD_RX7        0x20            /* Recall all but I/O and LAN address*/
  301 #define IFWD_RLA        0x10            /* Recall LAN Address   */
  302 #define IFWD_MSZ        0x08            /* Shared Memory Size   */
  303 #define IFWD_DMAE       0x04            /* DMA Enable   */
  304 #define IFWD_IOPE       0x02            /* I/O Port Enable */
  305 #define IFWD_WTS        0x01            /* Word Transfer Select */
  306 
  307 /* IAR definitions */
  308 #define IFWD_IA15       0x80            /* I/O Address Bits     */
  309 /*      .               */
  310 /*      .               */
  311 /*      .               */
  312 #define IFWD_IA5        0x01            /*                      */
  313 
  314 /* BIO definitions */
  315 #define IFWD_RS1        0x80            /* BIOS size bit 1 */
  316 #define IFWD_RS0        0x40            /* BIOS size bit 0 */
  317 #define IFWD_BA18       0x20            /* BIOS ROM Memory Address Bits */
  318 #define IFWD_BA17       0x10            /*                              */
  319 #define IFWD_BA16       0x08            /*                              */
  320 #define IFWD_BA15       0x04            /*                              */
  321 #define IFWD_BA14       0x02            /* BIOS ROM Memory Address Bits */
  322 #define IFWD_WINT       0x01            /* W8003 interrupt      */
  323 
  324 /* IRR definitions */
  325 #define IFWD_IEN        0x80    /* Interrupt Enable     */
  326 #define IFWD_IR1        0x40    /* Interrupt request bit 1      */
  327 #define IFWD_IR0        0x20    /* Interrupt request bit 0      */
  328 #define IFWD_AMD        0x10    /* Alternate mode       */
  329 #define IFWD_AINT       0x08    /* Alternate interrupt  */
  330 #define IFWD_BW1        0x04    /* BIOS Wait State Control bit 1        */
  331 #define IFWD_BW0        0x02    /* BIOS Wait State Control bit 0        */
  332 #define IFWD_OWS        0x01    /* Zero Wait State Enable       */
  333 
  334 /* GP1 definitions */
  335 
  336 /* IOD definitions */
  337 
  338 /* GP2 definitions */
  339 
  340 /*************************************************************/
  341 /*   Shared RAM buffer definitions                           */
  342 /*************************************************************/
  343 
  344 /**** NIC definitions ****/
  345 #define NIC_8003_SRAM_SIZE 0x2000       /* size of shared RAM buffer */
  346 #define NIC_HEADER_SIZE 4               /* size of receive header */
  347 #define NIC_PAGE_SIZE   0x100           /* each page of rcv ring is 256 byte */
  348 
  349 #define ETHER_ADDR_SIZE 6       /* size of a MAC address */
  350 
  351 #define DSF_LOCK        1
  352 #define DSF_RUNNING     2
  353 
  354 #define MOD_ENAL 1
  355 #define MOD_PROM 2

Cache object: d7685e696e04674d45d39ba0abb66f49


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