Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 1 | /* pdp11_xu.h: DEUNA/DELUA ethernet controller information
|
| 2 | ------------------------------------------------------------------------------
|
| 3 |
|
Bob Supnik | a9fd3dd | 2011-03-23 14:39:00 -0700 | [diff] [blame] | 4 | Copyright (c) 2003-2005, David T. Hittner
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 5 |
|
| 6 | Permission is hereby granted, free of charge, to any person obtaining a
|
| 7 | copy of this software and associated documentation files (the "Software"),
|
| 8 | to deal in the Software without restriction, including without limitation
|
| 9 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
| 10 | and/or sell copies of the Software, and to permit persons to whom the
|
| 11 | Software is furnished to do so, subject to the following conditions:
|
| 12 |
|
| 13 | The above copyright notice and this permission notice shall be included in
|
| 14 | all copies or substantial portions of the Software.
|
| 15 |
|
| 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
| 19 | THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
| 20 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
| 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 22 |
|
| 23 | Except as contained in this notice, the name of the author shall not be
|
| 24 | used in advertising or otherwise to promote the sale, use or other dealings
|
| 25 | in this Software without prior written authorization from the author.
|
| 26 |
|
| 27 | ------------------------------------------------------------------------------
|
| 28 |
|
| 29 | Modification history:
|
| 30 |
|
Mark Pizzolato | 7ceba37 | 2013-01-25 14:57:01 -0800 | [diff] [blame] | 31 | 25-Jan-13 RJ SELFTEST needs to report the READY state otherwise VMS 3.7 gets fatal controller error
|
Bob Supnik | a9fd3dd | 2011-03-23 14:39:00 -0700 | [diff] [blame] | 32 | 23-Jan-08 MP Added debugging support to display packet headers and packet data
|
Bob Supnik | a12e4a1 | 2006-01-23 20:01:00 -0800 | [diff] [blame] | 33 | 08-Dec-05 DTH Added load_server, increased UDBSIZE for system ID parameters
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 34 | 07-Jul-05 RMS Removed extraneous externs
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 35 | 05-Jan-04 DTH Added network statistics
|
| 36 | 31-Dec-03 DTH Added reserved states
|
| 37 | 28-Dec-03 DTH Corrected MODE bitmasks
|
| 38 | 23-Dec-03 DTH Corrected TXR and RXR bitmasks
|
| 39 | 03-Dec-03 DTH Refitted to SIMH v3.0 platform
|
| 40 | 05-May-03 DTH Started XU simulation
|
| 41 |
|
| 42 | ------------------------------------------------------------------------------
|
| 43 | */
|
| 44 |
|
Mark Pizzolato | d5ca542 | 2013-03-12 11:07:58 -0700 | [diff] [blame] | 45 | #ifndef PDP11_XU_H
|
| 46 | #define PDP11_XU_H
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 47 |
|
| 48 |
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 49 | #if defined (VM_PDP10) /* PDP10 version */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 50 | #include "pdp10_defs.h"
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 51 | #define XU_RDX 8
|
| 52 | #define XU_WID 16
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 53 |
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 54 | #elif defined (VM_VAX) /* VAX version */
|
Bob Supnik | b6393b3 | 2004-11-23 15:49:00 -0800 | [diff] [blame] | 55 | #include "vax_defs.h"
|
Mark Pizzolato | 68b5433 | 2013-01-22 16:14:53 -0800 | [diff] [blame] | 56 | #define XU_RDX 16
|
| 57 | #define XU_WID 32
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 58 |
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 59 | #else /* PDP-11 version */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 60 | #include "pdp11_defs.h"
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 61 | #define XU_RDX 8
|
| 62 | #define XU_WID 16
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 63 | #endif /* VM_PDP10 */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 64 |
|
| 65 | #include "sim_ether.h"
|
| 66 |
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 67 | #define XU_QUE_MAX 500 /* message queue array */
|
Bob Supnik | a9fd3dd | 2011-03-23 14:39:00 -0700 | [diff] [blame] | 68 | #define XU_FILTER_MAX 12 /* mac + broadcast + 10 multicast addrs */
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 69 | #define XU_SERVICE_INTERVAL 100 /* times per second */
|
| 70 | #define XU_ID_TIMER_VAL 540 /* 9 min * 60 sec */
|
Bob Supnik | a12e4a1 | 2006-01-23 20:01:00 -0800 | [diff] [blame] | 71 | #define UDBSIZE 200 /* max size of UDB (in words) */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 72 |
|
| 73 | enum xu_type {XU_T_DEUNA, XU_T_DELUA};
|
| 74 |
|
| 75 | struct xu_setup {
|
Mark Pizzolato | 68b5433 | 2013-01-22 16:14:53 -0800 | [diff] [blame] | 76 | int valid; /* is the setup block valid? */
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 77 | int promiscuous; /* promiscuous mode enabled */
|
| 78 | int multicast; /* enable all multicast addresses */
|
| 79 | int mac_count; /* number of multicast mac addresses */
|
| 80 | ETH_MAC macs[XU_FILTER_MAX]; /* MAC addresses to respond to */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 81 | };
|
| 82 |
|
| 83 | /* Network Statistics -
|
| 84 | some of these will always be zero in the simulated environment,
|
| 85 | since there is no ability for the sim_ether network driver to see
|
| 86 | things like incoming runts, collision tests, babbling, etc.
|
| 87 | */
|
| 88 | struct xu_stats {
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 89 | uint16 secs; /* seconds since last clear */
|
| 90 | uint32 frecv; /* frames received */
|
| 91 | uint32 mfrecv; /* multicast frames received */
|
| 92 | uint16 rxerf; /* receive error flags */
|
| 93 | uint32 frecve; /* frames received with errors */
|
| 94 | uint32 rbytes; /* data bytes received */
|
| 95 | uint32 mrbytes; /* multicast data bytes received */
|
| 96 | uint16 rlossi; /* received frames lost - internal err */
|
| 97 | uint16 rlossl; /* received frames lost - local buffers */
|
| 98 | uint32 ftrans; /* frames transmitted */
|
| 99 | uint32 mftrans; /* multicast frames transmitted */
|
| 100 | uint32 ftrans3; /* frames transmitted with 3+ tries */
|
| 101 | uint32 ftrans2; /* frames transmitted - two tries */
|
| 102 | uint32 ftransd; /* frames transmitted - deferred */
|
| 103 | uint32 tbytes; /* data bytes transmitted */
|
| 104 | uint32 mtbytes; /* multicast data bytes transmitted */
|
| 105 | uint16 txerf; /* transmit error flags summary */
|
| 106 | uint16 ftransa; /* transmit frames aborted */
|
| 107 | uint16 txccf; /* transmit collision test failure */
|
| 108 | uint16 porterr; /* port driver errors */
|
| 109 | uint16 bablcnt; /* babble counter */
|
Bob Supnik | a9fd3dd | 2011-03-23 14:39:00 -0700 | [diff] [blame] | 110 | uint32 loopf; /* loopback frames processed */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 111 | };
|
| 112 |
|
| 113 | struct xu_device {
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 114 | /*+ initialized values - DO NOT MOVE */
|
| 115 | ETH_PCALLBACK rcallback; /* read callback routine */
|
| 116 | ETH_PCALLBACK wcallback; /* write callback routine */
|
| 117 | ETH_MAC mac; /* MAC address */
|
| 118 | enum xu_type type; /* controller type */
|
Mark Pizzolato | e9b312f | 2014-06-06 15:03:31 -0700 | [diff] [blame] | 119 | uint32 throttle_time; /* ms burst time window */
|
| 120 | uint32 throttle_burst; /* packets passed with throttle_time which trigger throttling */
|
| 121 | uint32 throttle_delay; /* ms to delay when throttling. 0 disables throttling */
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 122 | /*- initialized values - DO NOT MOVE */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 123 |
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 124 | /* I/O register storage */
|
| 125 | uint32 irq; /* interrupt request flag */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 126 |
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 127 | /* buffers, etc. */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 128 | ETH_DEV* etherface;
|
| 129 | ETH_PACK read_buffer;
|
| 130 | ETH_PACK write_buffer;
|
| 131 | ETH_QUE ReadQ;
|
Bob Supnik | a12e4a1 | 2006-01-23 20:01:00 -0800 | [diff] [blame] | 132 | ETH_MAC load_server; /* load server address */
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 133 | int idtmr; /* countdown for ID Timer */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 134 | struct xu_setup setup;
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 135 | struct xu_stats stats; /* reportable network statistics */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 136 |
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 137 | /* copied from dec_deuna.h */
|
| 138 | uint16 pcsr0; /* primary DEUNA registers */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 139 | uint16 pcsr1;
|
| 140 | uint16 pcsr2;
|
| 141 | uint16 pcsr3;
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 142 | uint32 mode; /* mode register */
|
| 143 | uint32 pcbb; /* port command block base */
|
Mark Pizzolato | 68b5433 | 2013-01-22 16:14:53 -0800 | [diff] [blame] | 144 | uint16 stat; /* extended port status */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 145 |
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 146 | uint32 tdrb; /* transmit desc ring base */
|
| 147 | uint32 telen; /* transmit desc ring entry len */
|
| 148 | uint32 trlen; /* transmit desc ring length */
|
| 149 | uint32 txnext; /* transmit buffer pointer */
|
| 150 | uint32 rdrb; /* receive desc ring base */
|
| 151 | uint32 relen; /* receive desc ring entry len */
|
| 152 | uint32 rrlen; /* receive desc ring length */
|
| 153 | uint32 rxnext; /* receive buffer pointer */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 154 |
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 155 | uint16 pcb[4]; /* copy of Port Command Block */
|
| 156 | uint16 udb[UDBSIZE]; /* copy of Unibus Data Block */
|
| 157 | uint16 rxhdr[4]; /* content of RX ring entry, during wait */
|
| 158 | uint16 txhdr[4]; /* content of TX ring entry, during xmit */
|
Mark Pizzolato | ae6f3b9 | 2016-05-24 08:47:01 -0700 | [diff] [blame] | 159 | t_bool initialized; /* flag for one time initializations */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 160 | };
|
| 161 |
|
| 162 | struct xu_controller {
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 163 | DEVICE* dev; /* device block */
|
| 164 | UNIT* unit; /* unit block */
|
| 165 | DIB* dib; /* device interface block */
|
| 166 | struct xu_device* var; /* controller-specific variables */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 167 | };
|
| 168 |
|
| 169 | typedef struct xu_controller CTLR;
|
| 170 |
|
| 171 | /* PCSR0 register definitions */
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 172 | #define PCSR0_SERI 0100000 /* <15> Status Error Intr */
|
| 173 | #define PCSR0_PCEI 0040000 /* <14> Port Command Error Intr */
|
| 174 | #define PCSR0_RXI 0020000 /* <13> Receive Interrupt */
|
| 175 | #define PCSR0_TXI 0010000 /* <12> Transmit Interrupt */
|
| 176 | #define PCSR0_DNI 0004000 /* <11> Done Interrupt */
|
| 177 | #define PCSR0_RCBI 0002000 /* <10> Recv Buffer Unavail Intr */
|
Mark Pizzolato | 7ceba37 | 2013-01-25 14:57:01 -0800 | [diff] [blame] | 178 | #define PCSR0_FATL 0001000 /* <09> Fatal Internal Error */
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 179 | #define PCSR0_USCI 0000400 /* <08> Unsolicited State Chg Inter */
|
| 180 | #define PCSR0_INTR 0000200 /* <07> Interrupt Summary */
|
| 181 | #define PCSR0_INTE 0000100 /* <06> Interrupt Enable */
|
| 182 | #define PCSR0_RSET 0000040 /* <05> Reset */
|
| 183 | #define PCSR0_PCMD 0000017 /* <03:00> Port Command field */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 184 |
|
| 185 | /* PCSR0 Port Commands */
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 186 | #define CMD_NOOP 000 /* No-op */
|
| 187 | #define CMD_GETPCBB 001 /* Get PCB base */
|
| 188 | #define CMD_GETCMD 002 /* Get Command */
|
| 189 | #define CMD_SELFTEST 003 /* Self-test init */
|
| 190 | #define CMD_START 004 /* Start xmit/recv */
|
| 191 | #define CMD_BOOT 005 /* Boot */
|
| 192 | #define CMD_RSV06 006 /* Reserved */
|
| 193 | #define CMD_RSV07 007 /* Reserved */
|
| 194 | #define CMD_PDMD 010 /* Polling Demand */
|
| 195 | #define CMD_RSV11 011 /* Reserved */
|
| 196 | #define CMD_RSV12 012 /* Reserved */
|
| 197 | #define CMD_RSV13 013 /* Reserved */
|
| 198 | #define CMD_RSV14 014 /* Reserved */
|
| 199 | #define CMD_RSV15 015 /* Reserved */
|
| 200 | #define CMD_HALT 016 /* Halt */
|
| 201 | #define CMD_STOP 017 /* Stop */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 202 |
|
| 203 | /* PCSR1 register definitions */
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 204 | #define PCSR1_XPWR 0100000 /* <15> Tranceiver power failure */
|
| 205 | #define PCSR1_ICAB 0040000 /* <14> Port/Link cable failure */
|
| 206 | #define PCSR1_ECOD 0037400 /* <13:08> Self-test error code */
|
| 207 | #define PCSR1_PCTO 0000200 /* <07> Port Command Timeout */
|
| 208 | #define PCSR1_TYPE 0000160 /* <06:04> Interface type */
|
| 209 | #define PCSR1_STATE 0000017 /* <03:00> State: */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 210 |
|
| 211 | /* PCSR1 Types */
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 212 | #define TYPE_DEUNA (0 << 4) /* Controller is a DEUNA */
|
| 213 | #define TYPE_DELUA (1 << 4) /* Controller is a DELUA */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 214 |
|
| 215 | /* PCSR1 States */
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 216 | #define STATE_RESET 000 /* Reset */
|
| 217 | #define STATE_PLOAD 001 /* Primary Load */
|
| 218 | #define STATE_READY 002 /* Ready */
|
| 219 | #define STATE_RUNNING 003 /* Running */
|
| 220 | #define STATE_UHALT 005 /* UNIBUS Halted */
|
| 221 | #define STATE_NHALT 006 /* NI Halted */
|
| 222 | #define STATE_NUHALT 007 /* NI and UNIBUS Halted */
|
| 223 | #define STATE_HALT 010 /* Halted */
|
| 224 | #define STATE_SLOAD 017 /* Secondary Load */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 225 |
|
| 226 | /* Status register definitions */
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 227 | #define STAT_ERRS 0100000 /* <15> error summary */
|
| 228 | #define STAT_MERR 0040000 /* <14> multiple errors */
|
| 229 | #define STAT_BABL 0020000 /* <13> Transmitter on too long [DELUA only] */
|
| 230 | #define STAT_CERR 0010000 /* <12> collision test error */
|
| 231 | #define STAT_TMOT 0004000 /* <11> UNIBUS timeout */
|
| 232 | #define STAT_RRNG 0001000 /* <09> receive ring error */
|
| 233 | #define STAT_TRNG 0000400 /* <08> transmit ring error */
|
| 234 | #define STAT_PTCH 0000200 /* <07> ROM patch */
|
| 235 | #define STAT_RRAM 0000100 /* <06> running from RAM */
|
| 236 | #define STAT_RREV 0000077 /* <05:00> ROM version */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 237 |
|
| 238 | /* Mode definitions */
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 239 | #define MODE_PROM 0100000 /* <15> Promiscuous Mode */
|
| 240 | #define MODE_ENAL 0040000 /* <14> Enable All Multicasts */
|
| 241 | #define MODE_DRDC 0020000 /* <13> Disable Data Chaining */
|
| 242 | #define MODE_TPAD 0010000 /* <12> Transmit Msg Pad Enable */
|
| 243 | #define MODE_ECT 0004000 /* <11> Enable Collision Test */
|
| 244 | #define MODE_DMNT 0001000 /* <09> Disable Maint Message */
|
| 245 | #define MODE_INTL 0000200 /* <07> Internal Loopback [DELUA only] */
|
| 246 | #define MODE_DTCR 0000010 /* <03> Disable Transmit CRC */
|
| 247 | #define MODE_LOOP 0000004 /* <02> Internal Loopback Mode */
|
| 248 | #define MODE_HDPX 0000001 /* <00> Half-Duplex Mode */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 249 |
|
| 250 | /* Function Code definitions */
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 251 | #define FC_NOOP 0000000 /* no-op */
|
| 252 | #define FC_LSM 0000001 /* Load and Start Microaddress */
|
| 253 | #define FC_RDPA 0000002 /* Read Default Physical Address */
|
| 254 | #define FC_RPA 0000004 /* Read Physical Address */
|
| 255 | #define FC_WPA 0000005 /* Write Physical Address */
|
| 256 | #define FC_RMAL 0000006 /* Read Multicast Address List */
|
| 257 | #define FC_WMAL 0000007 /* Write Multicast Address List */
|
| 258 | #define FC_RRF 0000010 /* Read Ring Format */
|
| 259 | #define FC_WRF 0000011 /* Write Ring Format */
|
| 260 | #define FC_RDCTR 0000012 /* Read Counters */
|
| 261 | #define FC_RDCLCTR 0000013 /* Read and Clear Counters */
|
| 262 | #define FC_RMODE 0000014 /* Read Mode */
|
| 263 | #define FC_WMODE 0000015 /* Write Mode */
|
| 264 | #define FC_RSTAT 0000016 /* Read Status */
|
| 265 | #define FC_RCSTAT 0000017 /* Read and Clear Status */
|
| 266 | #define FC_DIM 0000020 /* Dump Internal Memory */
|
| 267 | #define FC_LIM 0000021 /* Load Internal Memory */
|
| 268 | #define FC_RSID 0000022 /* Read System ID parameters */
|
| 269 | #define FC_WSID 0000023 /* Write System ID parameters */
|
| 270 | #define FC_RLSA 0000024 /* Read Load Server Address */
|
| 271 | #define FC_WLSA 0000025 /* Write Load Server Address */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 272 |
|
| 273 | /* Transmitter Ring definitions */
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 274 | #define TXR_OWN 0100000 /* <15> we own it (1) */
|
| 275 | #define TXR_ERRS 0040000 /* <14> error summary */
|
| 276 | #define TXR_MTCH 0020000 /* <13> Station Match */
|
| 277 | #define TXR_MORE 0010000 /* <12> Mult Retries Needed */
|
| 278 | #define TXR_ONE 0004000 /* <11> One Collision */
|
| 279 | #define TXR_DEF 0002000 /* <10> Deferred */
|
| 280 | #define TXR_STF 0001000 /* <09> Start Of Frame */
|
| 281 | #define TXR_ENF 0000400 /* <08> End Of Frame */
|
| 282 | #define TXR_BUFL 0100000 /* <15> Buffer Length Error */
|
| 283 | #define TXR_UBTO 0040000 /* <14> UNIBUS TimeOut */
|
| 284 | #define TXR_UFLO 0020000 /* <13> Underflow Error */
|
| 285 | #define TXR_LCOL 0010000 /* <12> Late Collision */
|
| 286 | #define TXR_LCAR 0004000 /* <11> Lost Carrier */
|
| 287 | #define TXR_RTRY 0002000 /* <10> Retry Failure (16x) */
|
| 288 | #define TXR_TDR 0001777 /* <9:0> TDR value if RTRY=1 */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 289 |
|
| 290 | /* Receiver Ring definitions */
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 291 | #define RXR_OWN 0100000 /* <15> we own it (1) */
|
| 292 | #define RXR_ERRS 0040000 /* <14> Error Summary */
|
| 293 | #define RXR_FRAM 0020000 /* <13> Frame Error */
|
| 294 | #define RXR_OFLO 0010000 /* <12> Message Overflow */
|
| 295 | #define RXR_CRC 0004000 /* <11> CRC Check Error */
|
| 296 | #define RXR_STF 0001000 /* <09> Start Of Frame */
|
| 297 | #define RXR_ENF 0000400 /* <08> End Of Frame */
|
| 298 | #define RXR_BUFL 0100000 /* <15> Buffer Length error */
|
| 299 | #define RXR_UBTO 0040000 /* <14> UNIBUS TimeOut */
|
| 300 | #define RXR_NCHN 0020000 /* <13> No Data Chaining */
|
| 301 | #define RXR_OVRN 0010000 /* <12> Overrun Error [DELUA only] */
|
| 302 | #define RXR_MLEN 0007777 /* <11:0> Message Length */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 303 |
|
Mark Pizzolato | 4dfbb98 | 2016-02-24 09:02:17 -0800 | [diff] [blame] | 304 | BITFIELD xu_rdes_w2[] = {
|
| 305 | BITNCF(8), BIT(ENP), BIT(STP), BITNC, BIT(CRC), BIT(OFLO), BIT(FRAM), BIT(ERRS), BIT(OWN),
|
| 306 | ENDBITS
|
| 307 | };
|
| 308 | BITFIELD xu_rdes_w3[] = {
|
| 309 | BITFFMT(mlen,12,"0x%X"), BITNC, BIT(NCHN), BIT(UBTO), BIT(BUFL),
|
| 310 | ENDBITS
|
| 311 | };
|
| 312 |
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 313 | /* debugging bitmaps */
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 314 | #define DBG_TRC 0x0001 /* trace routine calls */
|
| 315 | #define DBG_REG 0x0002 /* trace read/write registers */
|
| 316 | #define DBG_WRN 0x0004 /* display warnings */
|
Bob Supnik | a9fd3dd | 2011-03-23 14:39:00 -0700 | [diff] [blame] | 317 | #define DBG_PCK 0x0080 /* display packet headers */
|
| 318 | #define DBG_DAT 0x0100 /* display packet data */
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 319 | #define DBG_ETH 0x8000 /* debug ethernet device */
|
Bob Supnik | 26aa6de | 2004-04-06 05:17:00 -0700 | [diff] [blame] | 320 |
|
Bob Supnik | b7c1eae | 2005-09-09 18:09:00 -0700 | [diff] [blame] | 321 | #endif /* _PDP11_XU_H */
|