root/drivers/net/dgrs_bcomm.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * The bios low-memory structure
   3  *
   4  * Some of the variables in here can be used to set parameters that
   5  * are stored in NVRAM and will retain their old values the next time
   6  * the card is brought up.  To use the values stored in NVRAM, the
   7  * parameter should be set to "all ones".  This tells the firmware to
   8  * use the NVRAM value or a suitable default.  The value that is used
   9  * will be stored back into this structure by the firmware.  If the
  10  * value of the variable is not "all ones", then that value will be
  11  * used and will be stored into NVRAM if it isn't already there.
  12  * The variables this applies to are the following:
  13  *      Variable        Set to:         Gets default of:
  14  *      bc_hashexpire   -1              300     (5 minutes)
  15  *      bc_spantree     -1              1       (spanning tree on)
  16  *      bc_ipaddr       FF:FF:FF:FF     0       (no IP address)
  17  *      bc_ipxnet       FF:FF:FF:FF     0       (no IPX net)
  18  *
  19  * Some variables MUST have their value set after the firmware
  20  * is loaded onto the board, but before the processor is released.
  21  * These are:
  22  *      bc_host         0 means no host "port", run as standalone switch.
  23  *                      1 means there is a host "port" (normal).
  24  *      bc_nowait
  25  *      bc_hostarea_len
  26  *      bc_filter_len
  27  *                      
  28  */
  29 BEGIN_STRUCT(bios_comm)
  30         S4(ulong, bc_intflag)   /* Count of all interrupts */
  31         S4(ulong, bc_lbolt)     /* Count of timer interrupts */
  32         S4(ulong, bc_maincnt)   /* Count of main loops */
  33         S4(ulong, bc_hashcnt)   /* Count of entries in hash table */
  34         S4A(ulong, bc_cnt, 8)   /* Misc counters, for debugging */
  35         S4A(ulong, bc_flag, 8)  /* Misc flags, for debugging */
  36         S4(ulong, bc_memsize)   /* Size of memory */
  37         S4(ulong, bc_dcache)    /* Size of working dcache */
  38         S4(ulong, bc_icache)    /* Size of working icache */
  39         S4(long, bc_status)     /* Firmware status */
  40         S1A(char, bc_file, 8)   /* File name of assertion failure */
  41         S4(ulong, bc_line)      /* Line # of assertion failure */
  42         S4(uchar *, bc_ramstart)
  43         S4(uchar *, bc_ramend)
  44         S4(uchar *, bc_heapstart) /* Start of heap (end of loaded memory) */
  45         S4(uchar *, bc_heapend) /* End of heap */
  46 
  47         /* Configurable Parameters */
  48         S4(long, bc_host)       /* 1=Host Port, 0=No Host Port, -1=Test Mode */
  49         S4(long, bc_nowait)     /* Don't wait for 2host circ buffer to empty*/
  50         S4(long, bc_150ohm)     /* 0 == 100 ohm UTP, 1 == 150 ohm STP */
  51         S4(long, bc_squelch)    /* 0 == normal squelch, 1 == reduced squelch */
  52         S4(ulong, bc_hashexpire) /* Expiry time in seconds for hash table */
  53         S4(long, bc_spantree)   /* 1 == enable IEEE spanning tree */
  54 
  55         S2A(ushort, bc_eaddr, 3) /* New ether address */
  56         S2(ushort, bc_dummy1)   /* padding for DOS compilers */
  57 
  58         /* Various debugging aids */
  59         S4(long, bc_debug)      /* Debugging is turned on */
  60         S4(long, bc_spew)       /* Spew data on port 4 for bs_spew seconds */
  61         S4(long, bc_spewlen)    /* Length of spewed data packets */
  62         S4(long, bc_maxrfd)     /* If != 0, max number of RFD's to allocate */
  63         S4(long, bc_maxrbd)     /* If != 0, max number of RBD's to allocate */
  64 
  65         /* Circular buffers for messages to/from host */
  66         S4(ulong, bc_2host_head)
  67         S4(ulong, bc_2host_tail)
  68         S4(ulong, bc_2host_mask)
  69         S1A(char, bc_2host, 0x200)      /* Circ buff to host */
  70 
  71         S4(ulong, bc_2idt_head)
  72         S4(ulong, bc_2idt_tail)
  73         S4(ulong, bc_2idt_mask)
  74         S1A(char, bc_2idt, 0x200)       /* Circ buff to idt */
  75 
  76         /* Pointers to structures for driver access */
  77         S4(uchar *, bc_port)    /* pointer to Port[] structures */
  78         S4(long, bc_nports)     /* Number of ports */
  79         S4(long, bc_portlen)    /* sizeof(PORT) */
  80         S4(uchar *, bc_hash)    /* Pointer to hash table */
  81         S4(long, bc_hashlen)    /* sizeof(Table) */
  82 
  83         /* SNMP agent addresses */
  84         S1A(uchar, bc_ipaddr, 4) /* IP address for SNMP */
  85         S1A(uchar, bc_ipxnet, 4) /* IPX net address for SNMP */
  86 
  87         S4(long, bc_nohostintr) /* Do not cause periodic host interrupts */
  88 
  89         S4(uchar *, bc_dmaaddr) /* Physical addr of host DMA buf for diags */
  90         S4(ulong, bc_dmalen)    /* Length of DMA buffer 0..2048 */
  91 
  92         /*
  93          *      Board memory allocated on startup for use by host, usually
  94          *      for the purposes of creating DMA chain descriptors.  The
  95          *      "len" must be set before the processor is released.  The
  96          *      address of the area is returned in bc_hostarea.  The area
  97          *      is guaranteed to be aligned on a 16 byte boundary.
  98          */
  99         S4(ulong, bc_hostarea_len)      /* RW: Number of bytes to allocate */
 100         S4(uchar *, bc_hostarea)        /* RO: Address of allocated memory */
 101 
 102         /*
 103          *      Variables for communicating filters into the board
 104          */
 105         S4(ulong *, bc_filter_area)     /* RO: Space to put filter into */
 106         S4(ulong, bc_filter_area_len)   /* RO: Length of area, in bytes */
 107         S4(long, bc_filter_cmd)         /* RW: Filter command, see below */
 108         S4(ulong, bc_filter_len)        /* RW: Actual length of filter */
 109         S4(ulong, bc_filter_port)       /* RW: Port # for filter 0..6 */
 110         S4(ulong, bc_filter_num)        /* RW: Filter #, 0=input, 1=output */
 111 
 112         S4A(long, bc_spare, 3) /* spares */
 113 END_STRUCT(bios_comm)
 114 
 115 #define bc      VMO(struct bios_comm, 0xa3000100)
 116 
 117 /*
 118  *      bc_status values
 119  */
 120 #define BC_INIT 0
 121 #define BC_RUN  100
 122 
 123 /*
 124  *      Values for spew (debugging)
 125  */
 126 #define BC_SPEW_ENABLE  0x80000000
 127 
 128 /*
 129  *      filter commands
 130  */
 131 #define BC_FILTER_ERR   -1
 132 #define BC_FILTER_OK    0
 133 #define BC_FILTER_SET   1
 134 #define BC_FILTER_CLR   2

/* [previous][next][first][last][top][bottom][index][help] */