aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dgrs_bcomm.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/net/dgrs_bcomm.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/net/dgrs_bcomm.h')
-rw-r--r--drivers/net/dgrs_bcomm.h148
1 files changed, 148 insertions, 0 deletions
diff --git a/drivers/net/dgrs_bcomm.h b/drivers/net/dgrs_bcomm.h
new file mode 100644
index 000000000000..6646608811cd
--- /dev/null
+++ b/drivers/net/dgrs_bcomm.h
@@ -0,0 +1,148 @@
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 SNMP IP address)
17 * bc_ipxnet FF:FF:FF:FF 0 (no SNMP IPX net)
18 * bc_iptrap FF:FF:FF:FF 0 (no SNMP IP trap address)
19 *
20 * Some variables MUST have their value set after the firmware
21 * is loaded onto the board, but before the processor is released.
22 * These are:
23 * bc_host 0 means no host "port", run as standalone switch.
24 * 1 means run as a switch, with a host port. (normal)
25 * 2 means run as multiple NICs, not as a switch.
26 * -1 means run in diagnostics mode.
27 * bc_nowait
28 * bc_hostarea_len
29 * bc_filter_len
30 *
31 */
32BEGIN_STRUCT(bios_comm)
33 S4(ulong, bc_intflag) /* Count of all interrupts */
34 S4(ulong, bc_lbolt) /* Count of timer interrupts */
35 S4(ulong, bc_maincnt) /* Count of main loops */
36 S4(ulong, bc_hashcnt) /* Count of entries in hash table */
37 S4A(ulong, bc_cnt, 8) /* Misc counters, for debugging */
38 S4A(ulong, bc_flag, 8) /* Misc flags, for debugging */
39 S4(ulong, bc_memsize) /* Size of memory */
40 S4(ulong, bc_dcache) /* Size of working dcache */
41 S4(ulong, bc_icache) /* Size of working icache */
42 S4(long, bc_status) /* Firmware status */
43 S1A(char, bc_file, 8) /* File name of assertion failure */
44 S4(ulong, bc_line) /* Line # of assertion failure */
45 S4(uchar *, bc_ramstart)
46 S4(uchar *, bc_ramend)
47 S4(uchar *, bc_heapstart) /* Start of heap (end of loaded memory) */
48 S4(uchar *, bc_heapend) /* End of heap */
49
50 /* Configurable Parameters */
51 S4(long, bc_host) /* 1=Host Port, 0=No Host Port, -1=Test Mode */
52 S4(long, bc_nowait) /* Don't wait for 2host circ buffer to empty*/
53 S4(long, bc_150ohm) /* 0 == 100 ohm UTP, 1 == 150 ohm STP */
54 S4(long, bc_squelch) /* 0 == normal squelch, 1 == reduced squelch */
55 S4(ulong, bc_hashexpire) /* Expiry time in seconds for hash table */
56 S4(long, bc_spantree) /* 1 == enable IEEE spanning tree */
57
58 S2A(ushort, bc_eaddr, 3) /* New ether address */
59 S2(ushort, bc_dummy1) /* padding for DOS compilers */
60
61 /* Various debugging aids */
62 S4(long, bc_debug) /* Debugging is turned on */
63 S4(long, bc_spew) /* Spew data on port 4 for bs_spew seconds */
64 S4(long, bc_spewlen) /* Length of spewed data packets */
65 S4(long, bc_maxrfd) /* If != 0, max number of RFD's to allocate */
66 S4(long, bc_maxrbd) /* If != 0, max number of RBD's to allocate */
67
68 /* Circular buffers for messages to/from host */
69 S4(ulong, bc_2host_head)
70 S4(ulong, bc_2host_tail)
71 S4(ulong, bc_2host_mask)
72 S1A(char, bc_2host, 0x200) /* Circ buff to host */
73
74 S4(ulong, bc_2idt_head)
75 S4(ulong, bc_2idt_tail)
76 S4(ulong, bc_2idt_mask)
77 S1A(char, bc_2idt, 0x200) /* Circ buff to idt */
78
79 /* Pointers to structures for driver access */
80 S4(uchar *, bc_port) /* pointer to Port[] structures */
81 S4(long, bc_nports) /* Number of ports */
82 S4(long, bc_portlen) /* sizeof(PORT) */
83 S4(uchar *, bc_hash) /* Pointer to hash table */
84 S4(long, bc_hashlen) /* sizeof(Table) */
85
86 /* SNMP agent addresses */
87 S1A(uchar, bc_ipaddr, 4) /* IP address for SNMP */
88 S1A(uchar, bc_ipxnet, 4) /* IPX net address for SNMP */
89
90 S4(long, bc_nohostintr) /* Do not cause periodic host interrupts */
91
92 S4(uchar *, bc_dmaaddr) /* Physical addr of host DMA buf for diags */
93 S4(ulong, bc_dmalen) /* Length of DMA buffer 0..2048 */
94
95 /*
96 * Board memory allocated on startup for use by host, usually
97 * for the purposes of creating DMA chain descriptors. The
98 * "len" must be set before the processor is released. The
99 * address of the area is returned in bc_hostarea. The area
100 * is guaranteed to be aligned on a 16 byte boundary.
101 */
102 S4(ulong, bc_hostarea_len) /* RW: Number of bytes to allocate */
103 S4(uchar *, bc_hostarea) /* RO: Address of allocated memory */
104
105 /*
106 * Variables for communicating filters into the board
107 */
108 S4(ulong *, bc_filter_area) /* RO: Space to put filter into */
109 S4(ulong, bc_filter_area_len) /* RO: Length of area, in bytes */
110 S4(long, bc_filter_cmd) /* RW: Filter command, see below */
111 S4(ulong, bc_filter_len) /* RW: Actual length of filter */
112 S4(ulong, bc_filter_port) /* RW: Port # for filter 0..6 */
113 S4(ulong, bc_filter_num) /* RW: Filter #, 0=input, 1=output */
114
115 /* more SNMP agent addresses */
116 S1A(uchar, bc_iptrap, 4) /* IP address for SNMP */
117
118 S4A(long, bc_spare, 2) /* spares */
119END_STRUCT(bios_comm)
120
121#define bc VMO(struct bios_comm, 0xa3000100)
122
123/*
124 * bc_status values
125 */
126#define BC_INIT 0
127#define BC_RUN 100
128
129/*
130 * bc_host values
131 */
132#define BC_DIAGS -1
133#define BC_SASWITCH 0
134#define BC_SWITCH 1
135#define BC_MULTINIC 2
136
137/*
138 * Values for spew (debugging)
139 */
140#define BC_SPEW_ENABLE 0x80000000
141
142/*
143 * filter commands
144 */
145#define BC_FILTER_ERR -1
146#define BC_FILTER_OK 0
147#define BC_FILTER_SET 1
148#define BC_FILTER_CLR 2