|
|
1.1 ! root 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 [email protected] ! 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: Copyright 1988, 1989 by Olivetti Advanced Technology Center, Inc., ! 28: Cupertino, California. ! 29: ! 30: All Rights Reserved ! 31: ! 32: Permission to use, copy, modify, and distribute this software and ! 33: its documentation for any purpose and without fee is hereby ! 34: granted, provided that the above copyright notice appears in all ! 35: copies and that both the copyright notice and this permission notice ! 36: appear in supporting documentation, and that the name of Olivetti ! 37: not be used in advertising or publicity pertaining to distribution ! 38: of the software without specific, written prior permission. ! 39: ! 40: OLIVETTI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE ! 41: INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, ! 42: IN NO EVENT SHALL OLIVETTI BE LIABLE FOR ANY SPECIAL, INDIRECT, OR ! 43: CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM ! 44: LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, ! 45: NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUR OF OR IN CONNECTION ! 46: WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ! 47: */ ! 48: ! 49: /* ! 50: * Defines for managing the status word of the 82586 cpu. For details see ! 51: * the Intel LAN Component User's Manual starting at p. 2-14. ! 52: * ! 53: */ ! 54: ! 55: #define SCB_SW_INT 0xf000 ! 56: #define SCB_SW_CX 0x8000 /* CU finished w/ int. bit set */ ! 57: #define SCB_SW_FR 0x4000 /* RU finished receiving a frame */ ! 58: #define SCB_SW_CNA 0x2000 /* CU left active state */ ! 59: #define SCB_SW_RNR 0x1000 /* RU left ready state */ ! 60: ! 61: /* ! 62: * Defines for managing the Command Unit Status portion of the 82586 ! 63: * System Control Block. ! 64: * ! 65: */ ! 66: ! 67: #define SCB_CUS_IDLE 0x0000 ! 68: #define SCB_CUS_SUSPND 0x0100 ! 69: #define SCB_CUS_ACTV 0x0200 ! 70: ! 71: /* ! 72: * Defines for managing the Receive Unit Status portion of the System ! 73: * Control Block. ! 74: * ! 75: */ ! 76: ! 77: #define SCB_RUS_IDLE 0x0000 ! 78: #define SCB_RUS_SUSPND 0x0010 ! 79: #define SCB_RUS_NORESRC 0x0020 ! 80: #define SCB_RUS_READY 0x0040 ! 81: ! 82: /* ! 83: * Defines that manage portions of the Command Word in the System Control ! 84: * Block of the 82586. Below are the Interrupt Acknowledge Bits and their ! 85: * appropriate masks. ! 86: * ! 87: */ ! 88: ! 89: #define SCB_ACK_CX 0x8000 ! 90: #define SCB_ACK_FR 0x4000 ! 91: #define SCB_ACK_CNA 0x2000 ! 92: #define SCB_ACK_RNR 0x1000 ! 93: ! 94: /* ! 95: * Defines for managing the Command Unit Control word, and the Receive ! 96: * Unit Control word. The software RESET bit is also defined. ! 97: * ! 98: */ ! 99: ! 100: #define SCB_CU_STRT 0x0100 ! 101: #define SCB_CU_RSUM 0x0200 ! 102: #define SCB_CU_SUSPND 0x0300 ! 103: #define SCB_CU_ABRT 0x0400 ! 104: ! 105: #define SCB_RESET 0x0080 ! 106: ! 107: #define SCB_RU_STRT 0x0010 ! 108: #define SCB_RU_RSUM 0x0020 ! 109: #define SCB_RU_SUSPND 0x0030 ! 110: #define SCB_RU_ABRT 0x0040 ! 111: ! 112: ! 113: /* ! 114: * The following define Action Commands for the 82586 chip. ! 115: * ! 116: */ ! 117: ! 118: #define AC_NOP 0x00 ! 119: #define AC_IASETUP 0x01 ! 120: #define AC_CONFIGURE 0x02 ! 121: #define AC_MCSETUP 0x03 ! 122: #define AC_TRANSMIT 0x04 ! 123: #define AC_TDR 0x05 ! 124: #define AC_DUMP 0x06 ! 125: #define AC_DIAGNOSE 0x07 ! 126: ! 127: ! 128: /* ! 129: * Defines for General Format for Action Commands, both Status Words, and ! 130: * Command Words. ! 131: * ! 132: */ ! 133: ! 134: #define AC_SW_C 0x8000 ! 135: #define AC_SW_B 0x4000 ! 136: #define AC_SW_OK 0x2000 ! 137: #define AC_SW_A 0x1000 ! 138: #define TC_CARRIER 0x0400 ! 139: #define TC_CLS 0x0200 ! 140: #define TC_DMA 0x0100 ! 141: #define TC_DEFER 0x0080 ! 142: #define TC_SQE 0x0040 ! 143: #define TC_COLLISION 0x0020 ! 144: #define AC_CW_EL 0x8000 ! 145: #define AC_CW_S 0x4000 ! 146: #define AC_CW_I 0x2000 ! 147: ! 148: /* ! 149: * Specific defines for the transmit action command. ! 150: * ! 151: */ ! 152: ! 153: #define TBD_SW_EOF 0x8000 ! 154: #define TBD_SW_COUNT 0x3fff ! 155: ! 156: /* ! 157: * Specific defines for the receive frame actions. ! 158: * ! 159: */ ! 160: ! 161: #define RBD_SW_EOF 0x8000 ! 162: #define RBD_SW_COUNT 0x3fff ! 163: ! 164: #define RFD_DONE 0x8000 ! 165: #define RFD_BUSY 0x4000 ! 166: #define RFD_OK 0x2000 ! 167: #define RFD_CRC 0x0800 ! 168: #define RFD_ALN 0x0400 ! 169: #define RFD_RSC 0x0200 ! 170: #define RFD_DMA 0x0100 ! 171: #define RFD_SHORT 0x0080 ! 172: #define RFD_EOF 0x0040 ! 173: #define RFD_EL 0x8000 ! 174: #define RFD_SUSP 0x4000 ! 175: /* ! 176: * 82586 chip specific structure definitions. For details, see the Intel ! 177: * LAN Components manual. ! 178: * ! 179: */ ! 180: ! 181: ! 182: typedef struct { ! 183: u_short scp_sysbus; ! 184: u_short scp_unused[2]; ! 185: u_short scp_iscp; ! 186: u_short scp_iscp_base; ! 187: } scp_t; ! 188: ! 189: ! 190: typedef struct { ! 191: u_short iscp_busy; ! 192: u_short iscp_scb_offset; ! 193: u_short iscp_scb; ! 194: u_short iscp_scb_base; ! 195: } iscp_t; ! 196: ! 197: ! 198: typedef struct { ! 199: u_short scb_status; ! 200: u_short scb_command; ! 201: u_short scb_cbl_offset; ! 202: u_short scb_rfa_offset; ! 203: u_short scb_crcerrs; ! 204: u_short scb_alnerrs; ! 205: u_short scb_rscerrs; ! 206: u_short scb_ovrnerrs; ! 207: } scb_t; ! 208: ! 209: ! 210: typedef struct { ! 211: u_short tbd_offset; ! 212: u_char dest_addr[6]; ! 213: u_short length; ! 214: } transmit_t; ! 215: ! 216: ! 217: typedef struct { ! 218: u_short fifolim_bytecnt; ! 219: u_short addrlen_mode; ! 220: u_short linprio_interframe; ! 221: u_short slot_time; ! 222: u_short hardware; ! 223: u_short min_frame_len; ! 224: } configure_t; ! 225: ! 226: ! 227: typedef struct { ! 228: u_short ac_status; ! 229: u_short ac_command; ! 230: u_short ac_link_offset; ! 231: union { ! 232: transmit_t transmit; ! 233: configure_t configure; ! 234: u_char iasetup[6]; ! 235: } cmd; ! 236: } ac_t; ! 237: ! 238: ! 239: typedef struct { ! 240: u_short act_count; ! 241: u_short next_tbd_offset; ! 242: u_short buffer_addr; ! 243: u_short buffer_base; ! 244: } tbd_t; ! 245: ! 246: ! 247: typedef struct { ! 248: u_short status; ! 249: u_short command; ! 250: u_short link_offset; ! 251: u_short rbd_offset; ! 252: u_char destination[6]; ! 253: u_char source[6]; ! 254: u_short length; ! 255: } fd_t; ! 256: ! 257: ! 258: typedef struct { ! 259: u_short status; ! 260: u_short next_rbd_offset; ! 261: u_short buffer_addr; ! 262: u_short buffer_base; ! 263: u_short size; ! 264: } rbd_t;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.