1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
|
/*
* Copyright (c) 2013-2014 Qlogic Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD$
*/
/*
* File: qls_dump.h
*/
#ifndef _QLS_DUMP_H_
#define _QLS_DUMP_H_
#define Q81_MPID_COOKIE 0x5555aaaa
typedef struct qls_mpid_glbl_hdr
{
uint32_t cookie;
uint8_t id[16];
uint32_t time_lo;
uint32_t time_hi;
uint32_t img_size;
uint32_t hdr_size;
uint8_t info[220];
} qls_mpid_glbl_hdr_t;
typedef struct qls_mpid_seg_hdr
{
uint32_t cookie;
uint32_t seg_num;
uint32_t seg_size;
uint32_t extra;
uint8_t desc[16];
} qls_mpid_seg_hdr_t;
enum
{
Q81_MPI_CORE_REGS_ADDR = 0x00030000,
Q81_MPI_CORE_REGS_CNT = 127,
Q81_MPI_CORE_SH_REGS_CNT = 16,
Q81_TEST_REGS_ADDR = 0x00001000,
Q81_TEST_REGS_CNT = 23,
Q81_RMII_REGS_ADDR = 0x00001040,
Q81_RMII_REGS_CNT = 64,
Q81_FCMAC1_REGS_ADDR = 0x00001080,
Q81_FCMAC2_REGS_ADDR = 0x000010c0,
Q81_FCMAC_REGS_CNT = 64,
Q81_FC1_MBX_REGS_ADDR = 0x00001100,
Q81_FC2_MBX_REGS_ADDR = 0x00001240,
Q81_FC_MBX_REGS_CNT = 64,
Q81_IDE_REGS_ADDR = 0x00001140,
Q81_IDE_REGS_CNT = 64,
Q81_NIC1_MBX_REGS_ADDR = 0x00001180,
Q81_NIC2_MBX_REGS_ADDR = 0x00001280,
Q81_NIC_MBX_REGS_CNT = 64,
Q81_SMBUS_REGS_ADDR = 0x00001200,
Q81_SMBUS_REGS_CNT = 64,
Q81_I2C_REGS_ADDR = 0x00001fc0,
Q81_I2C_REGS_CNT = 64,
Q81_MEMC_REGS_ADDR = 0x00003000,
Q81_MEMC_REGS_CNT = 256,
Q81_PBUS_REGS_ADDR = 0x00007c00,
Q81_PBUS_REGS_CNT = 256,
Q81_MDE_REGS_ADDR = 0x00010000,
Q81_MDE_REGS_CNT = 6,
Q81_CODE_RAM_ADDR = 0x00020000,
Q81_CODE_RAM_CNT = 0x2000,
Q81_MEMC_RAM_ADDR = 0x00100000,
Q81_MEMC_RAM_CNT = 0x2000,
Q81_XGMAC_REGISTER_END = 0x740,
};
#define Q81_PROBE_DATA_LENGTH_WORDS ((64*2) + 1)
#define Q81_NUMBER_OF_PROBES 34
#define Q81_PROBE_SIZE \
(Q81_PROBE_DATA_LENGTH_WORDS * Q81_NUMBER_OF_PROBES)
#define Q81_NUMBER_ROUTING_REG_ENTRIES 48
#define Q81_WORDS_PER_ROUTING_REG_ENTRY 4
#define Q81_ROUT_REG_SIZE \
(Q81_NUMBER_ROUTING_REG_ENTRIES * Q81_WORDS_PER_ROUTING_REG_ENTRY)
#define Q81_MAC_PROTOCOL_REGISTER_WORDS ((512 * 3) + (32 * 2) + (4096 * 1) +\
(4096 * 1) + (4 * 2) +\
(8 * 2) + (16 * 1) +\
(4 * 1) + (4 * 4) + (4 * 1))
#define Q81_WORDS_PER_MAC_PROT_ENTRY 2
#define Q81_MAC_REG_SIZE \
(Q81_MAC_PROTOCOL_REGISTER_WORDS * Q81_WORDS_PER_MAC_PROT_ENTRY)
#define Q81_MAX_SEMAPHORE_FUNCTIONS 5
#define Q81_WQC_WORD_SIZE 6
#define Q81_NUMBER_OF_WQCS 128
#define Q81_WQ_SIZE (Q81_WQC_WORD_SIZE * Q81_NUMBER_OF_WQCS)
#define Q81_CQC_WORD_SIZE 13
#define Q81_NUMBER_OF_CQCS 128
#define Q81_CQ_SIZE (Q81_CQC_WORD_SIZE * Q81_NUMBER_OF_CQCS)
struct qls_mpi_coredump {
qls_mpid_glbl_hdr_t mpi_global_header;
qls_mpid_seg_hdr_t core_regs_seg_hdr;
uint32_t mpi_core_regs[Q81_MPI_CORE_REGS_CNT];
uint32_t mpi_core_sh_regs[Q81_MPI_CORE_SH_REGS_CNT];
qls_mpid_seg_hdr_t test_logic_regs_seg_hdr;
uint32_t test_logic_regs[Q81_TEST_REGS_CNT];
qls_mpid_seg_hdr_t rmii_regs_seg_hdr;
uint32_t rmii_regs[Q81_RMII_REGS_CNT];
qls_mpid_seg_hdr_t fcmac1_regs_seg_hdr;
uint32_t fcmac1_regs[Q81_FCMAC_REGS_CNT];
qls_mpid_seg_hdr_t fcmac2_regs_seg_hdr;
uint32_t fcmac2_regs[Q81_FCMAC_REGS_CNT];
qls_mpid_seg_hdr_t fc1_mbx_regs_seg_hdr;
uint32_t fc1_mbx_regs[Q81_FC_MBX_REGS_CNT];
qls_mpid_seg_hdr_t ide_regs_seg_hdr;
uint32_t ide_regs[Q81_IDE_REGS_CNT];
qls_mpid_seg_hdr_t nic1_mbx_regs_seg_hdr;
uint32_t nic1_mbx_regs[Q81_NIC_MBX_REGS_CNT];
qls_mpid_seg_hdr_t smbus_regs_seg_hdr;
uint32_t smbus_regs[Q81_SMBUS_REGS_CNT];
qls_mpid_seg_hdr_t fc2_mbx_regs_seg_hdr;
uint32_t fc2_mbx_regs[Q81_FC_MBX_REGS_CNT];
qls_mpid_seg_hdr_t nic2_mbx_regs_seg_hdr;
uint32_t nic2_mbx_regs[Q81_NIC_MBX_REGS_CNT];
qls_mpid_seg_hdr_t i2c_regs_seg_hdr;
uint32_t i2c_regs[Q81_I2C_REGS_CNT];
qls_mpid_seg_hdr_t memc_regs_seg_hdr;
uint32_t memc_regs[Q81_MEMC_REGS_CNT];
qls_mpid_seg_hdr_t pbus_regs_seg_hdr;
uint32_t pbus_regs[Q81_PBUS_REGS_CNT];
qls_mpid_seg_hdr_t mde_regs_seg_hdr;
uint32_t mde_regs[Q81_MDE_REGS_CNT];
qls_mpid_seg_hdr_t xaui1_an_hdr;
uint32_t serdes1_xaui_an[14];
qls_mpid_seg_hdr_t xaui1_hss_pcs_hdr;
uint32_t serdes1_xaui_hss_pcs[33];
qls_mpid_seg_hdr_t xfi1_an_hdr;
uint32_t serdes1_xfi_an[14];
qls_mpid_seg_hdr_t xfi1_train_hdr;
uint32_t serdes1_xfi_train[12];
qls_mpid_seg_hdr_t xfi1_hss_pcs_hdr;
uint32_t serdes1_xfi_hss_pcs[15];
qls_mpid_seg_hdr_t xfi1_hss_tx_hdr;
uint32_t serdes1_xfi_hss_tx[32];
qls_mpid_seg_hdr_t xfi1_hss_rx_hdr;
uint32_t serdes1_xfi_hss_rx[32];
qls_mpid_seg_hdr_t xfi1_hss_pll_hdr;
uint32_t serdes1_xfi_hss_pll[32];
qls_mpid_seg_hdr_t xaui2_an_hdr;
uint32_t serdes2_xaui_an[14];
qls_mpid_seg_hdr_t xaui2_hss_pcs_hdr;
uint32_t serdes2_xaui_hss_pcs[33];
qls_mpid_seg_hdr_t xfi2_an_hdr;
uint32_t serdes2_xfi_an[14];
qls_mpid_seg_hdr_t xfi2_train_hdr;
uint32_t serdes2_xfi_train[12];
qls_mpid_seg_hdr_t xfi2_hss_pcs_hdr;
uint32_t serdes2_xfi_hss_pcs[15];
qls_mpid_seg_hdr_t xfi2_hss_tx_hdr;
uint32_t serdes2_xfi_hss_tx[32];
qls_mpid_seg_hdr_t xfi2_hss_rx_hdr;
uint32_t serdes2_xfi_hss_rx[32];
qls_mpid_seg_hdr_t xfi2_hss_pll_hdr;
uint32_t serdes2_xfi_hss_pll[32];
qls_mpid_seg_hdr_t nic1_regs_seg_hdr;
uint32_t nic1_regs[64];
qls_mpid_seg_hdr_t nic2_regs_seg_hdr;
uint32_t nic2_regs[64];
qls_mpid_seg_hdr_t intr_states_seg_hdr;
uint32_t intr_states[MAX_RX_RINGS];
qls_mpid_seg_hdr_t xgmac1_seg_hdr;
uint32_t xgmac1[Q81_XGMAC_REGISTER_END];
qls_mpid_seg_hdr_t xgmac2_seg_hdr;
uint32_t xgmac2[Q81_XGMAC_REGISTER_END];
qls_mpid_seg_hdr_t probe_dump_seg_hdr;
uint32_t probe_dump[Q81_PROBE_SIZE];
qls_mpid_seg_hdr_t routing_reg_seg_hdr;
uint32_t routing_regs[Q81_ROUT_REG_SIZE];
qls_mpid_seg_hdr_t mac_prot_reg_seg_hdr;
uint32_t mac_prot_regs[Q81_MAC_REG_SIZE];
qls_mpid_seg_hdr_t sem_regs_seg_hdr;
uint32_t sem_regs[Q81_MAX_SEMAPHORE_FUNCTIONS];
qls_mpid_seg_hdr_t ets_seg_hdr;
uint32_t ets[8+2];
qls_mpid_seg_hdr_t wqc1_seg_hdr;
uint32_t wqc1[Q81_WQ_SIZE];
qls_mpid_seg_hdr_t cqc1_seg_hdr;
uint32_t cqc1[Q81_CQ_SIZE];
qls_mpid_seg_hdr_t wqc2_seg_hdr;
uint32_t wqc2[Q81_WQ_SIZE];
qls_mpid_seg_hdr_t cqc2_seg_hdr;
uint32_t cqc2[Q81_CQ_SIZE];
qls_mpid_seg_hdr_t code_ram_seg_hdr;
uint32_t code_ram[Q81_CODE_RAM_CNT];
qls_mpid_seg_hdr_t memc_ram_seg_hdr;
uint32_t memc_ram[Q81_MEMC_RAM_CNT];
};
typedef struct qls_mpi_coredump qls_mpi_coredump_t;
#define Q81_BAD_DATA 0xDEADBEEF
#endif /* #ifndef _QLS_DUMP_H_ */
|