This source file includes following definitions.
- cvmx_board_type_to_string
- cvmx_chip_type_to_string
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 #ifndef __CVMX_BOOTINFO_H__
33 #define __CVMX_BOOTINFO_H__
34
35 #include "cvmx-coremask.h"
36
37
38
39
40
41
42
43 #define CVMX_BOOTINFO_MAJ_VER 1
44 #define CVMX_BOOTINFO_MIN_VER 4
45
46 #if (CVMX_BOOTINFO_MAJ_VER == 1)
47 #define CVMX_BOOTINFO_OCTEON_SERIAL_LEN 20
48
49
50
51
52
53
54
55
56
57 struct cvmx_bootinfo {
58 #ifdef __BIG_ENDIAN_BITFIELD
59 uint32_t major_version;
60 uint32_t minor_version;
61
62 uint64_t stack_top;
63 uint64_t heap_base;
64 uint64_t heap_end;
65 uint64_t desc_vaddr;
66
67 uint32_t exception_base_addr;
68 uint32_t stack_size;
69 uint32_t flags;
70 uint32_t core_mask;
71
72 uint32_t dram_size;
73
74 uint32_t phy_mem_desc_addr;
75
76 uint32_t debugger_flags_base_addr;
77
78
79 uint32_t eclock_hz;
80
81
82 uint32_t dclock_hz;
83
84 uint32_t reserved0;
85 uint16_t board_type;
86 uint8_t board_rev_major;
87 uint8_t board_rev_minor;
88 uint16_t reserved1;
89 uint8_t reserved2;
90 uint8_t reserved3;
91 char board_serial_number[CVMX_BOOTINFO_OCTEON_SERIAL_LEN];
92 uint8_t mac_addr_base[6];
93 uint8_t mac_addr_count;
94 #if (CVMX_BOOTINFO_MIN_VER >= 1)
95
96
97
98
99
100
101
102
103 uint64_t compact_flash_common_base_addr;
104 uint64_t compact_flash_attribute_base_addr;
105
106
107
108
109 uint64_t led_display_base_addr;
110 #endif
111 #if (CVMX_BOOTINFO_MIN_VER >= 2)
112
113 uint32_t dfa_ref_clock_hz;
114
115
116
117
118
119
120 uint32_t config_flags;
121 #endif
122 #if (CVMX_BOOTINFO_MIN_VER >= 3)
123
124
125
126
127 uint64_t fdt_addr;
128 #endif
129 #if (CVMX_BOOTINFO_MIN_VER >= 4)
130
131
132
133
134 struct cvmx_coremask ext_core_mask;
135 #endif
136 #else
137
138
139
140
141
142 uint32_t minor_version;
143 uint32_t major_version;
144
145 uint64_t stack_top;
146 uint64_t heap_base;
147 uint64_t heap_end;
148 uint64_t desc_vaddr;
149
150 uint32_t stack_size;
151 uint32_t exception_base_addr;
152
153 uint32_t core_mask;
154 uint32_t flags;
155
156 uint32_t phy_mem_desc_addr;
157 uint32_t dram_size;
158
159 uint32_t eclock_hz;
160 uint32_t debugger_flags_base_addr;
161
162 uint32_t reserved0;
163 uint32_t dclock_hz;
164
165 uint8_t reserved3;
166 uint8_t reserved2;
167 uint16_t reserved1;
168 uint8_t board_rev_minor;
169 uint8_t board_rev_major;
170 uint16_t board_type;
171
172 char board_serial_number[CVMX_BOOTINFO_OCTEON_SERIAL_LEN];
173 uint8_t mac_addr_base[6];
174 uint8_t mac_addr_count;
175 uint8_t pad[5];
176
177 #if (CVMX_BOOTINFO_MIN_VER >= 1)
178 uint64_t compact_flash_common_base_addr;
179 uint64_t compact_flash_attribute_base_addr;
180 uint64_t led_display_base_addr;
181 #endif
182 #if (CVMX_BOOTINFO_MIN_VER >= 2)
183 uint32_t config_flags;
184 uint32_t dfa_ref_clock_hz;
185 #endif
186 #if (CVMX_BOOTINFO_MIN_VER >= 3)
187 uint64_t fdt_addr;
188 #endif
189 #if (CVMX_BOOTINFO_MIN_VER >= 4)
190 struct cvmx_coremask ext_core_mask;
191 #endif
192 #endif
193 };
194
195 #define CVMX_BOOTINFO_CFG_FLAG_PCI_HOST (1ull << 0)
196 #define CVMX_BOOTINFO_CFG_FLAG_PCI_TARGET (1ull << 1)
197 #define CVMX_BOOTINFO_CFG_FLAG_DEBUG (1ull << 2)
198 #define CVMX_BOOTINFO_CFG_FLAG_NO_MAGIC (1ull << 3)
199
200
201 #define CVMX_BOOTINFO_CFG_FLAG_OVERSIZE_TLB_MAPPING (1ull << 4)
202 #define CVMX_BOOTINFO_CFG_FLAG_BREAK (1ull << 5)
203
204 #endif
205
206
207 enum cvmx_board_types_enum {
208 CVMX_BOARD_TYPE_NULL = 0,
209 CVMX_BOARD_TYPE_SIM = 1,
210 CVMX_BOARD_TYPE_EBT3000 = 2,
211 CVMX_BOARD_TYPE_KODAMA = 3,
212 CVMX_BOARD_TYPE_NIAGARA = 4,
213 CVMX_BOARD_TYPE_NAC38 = 5,
214 CVMX_BOARD_TYPE_THUNDER = 6,
215 CVMX_BOARD_TYPE_TRANTOR = 7,
216 CVMX_BOARD_TYPE_EBH3000 = 8,
217 CVMX_BOARD_TYPE_EBH3100 = 9,
218 CVMX_BOARD_TYPE_HIKARI = 10,
219 CVMX_BOARD_TYPE_CN3010_EVB_HS5 = 11,
220 CVMX_BOARD_TYPE_CN3005_EVB_HS5 = 12,
221 CVMX_BOARD_TYPE_KBP = 13,
222
223 CVMX_BOARD_TYPE_CN3020_EVB_HS5 = 14,
224 CVMX_BOARD_TYPE_EBT5800 = 15,
225 CVMX_BOARD_TYPE_NICPRO2 = 16,
226 CVMX_BOARD_TYPE_EBH5600 = 17,
227 CVMX_BOARD_TYPE_EBH5601 = 18,
228 CVMX_BOARD_TYPE_EBH5200 = 19,
229 CVMX_BOARD_TYPE_BBGW_REF = 20,
230 CVMX_BOARD_TYPE_NIC_XLE_4G = 21,
231 CVMX_BOARD_TYPE_EBT5600 = 22,
232 CVMX_BOARD_TYPE_EBH5201 = 23,
233 CVMX_BOARD_TYPE_EBT5200 = 24,
234 CVMX_BOARD_TYPE_CB5600 = 25,
235 CVMX_BOARD_TYPE_CB5601 = 26,
236 CVMX_BOARD_TYPE_CB5200 = 27,
237
238 CVMX_BOARD_TYPE_GENERIC = 28,
239 CVMX_BOARD_TYPE_EBH5610 = 29,
240 CVMX_BOARD_TYPE_LANAI2_A = 30,
241 CVMX_BOARD_TYPE_LANAI2_U = 31,
242 CVMX_BOARD_TYPE_EBB5600 = 32,
243 CVMX_BOARD_TYPE_EBB6300 = 33,
244 CVMX_BOARD_TYPE_NIC_XLE_10G = 34,
245 CVMX_BOARD_TYPE_LANAI2_G = 35,
246 CVMX_BOARD_TYPE_EBT5810 = 36,
247 CVMX_BOARD_TYPE_NIC10E = 37,
248 CVMX_BOARD_TYPE_EP6300C = 38,
249 CVMX_BOARD_TYPE_EBB6800 = 39,
250 CVMX_BOARD_TYPE_NIC4E = 40,
251 CVMX_BOARD_TYPE_NIC2E = 41,
252 CVMX_BOARD_TYPE_EBB6600 = 42,
253 CVMX_BOARD_TYPE_REDWING = 43,
254 CVMX_BOARD_TYPE_NIC68_4 = 44,
255 CVMX_BOARD_TYPE_NIC10E_66 = 45,
256 CVMX_BOARD_TYPE_MAX,
257
258
259
260
261
262
263
264
265
266
267
268 CVMX_BOARD_TYPE_CUST_DEFINED_MIN = 10000,
269 CVMX_BOARD_TYPE_CUST_WSX16 = 10001,
270 CVMX_BOARD_TYPE_CUST_NS0216 = 10002,
271 CVMX_BOARD_TYPE_CUST_NB5 = 10003,
272 CVMX_BOARD_TYPE_CUST_WMR500 = 10004,
273 CVMX_BOARD_TYPE_CUST_ITB101 = 10005,
274 CVMX_BOARD_TYPE_CUST_NTE102 = 10006,
275 CVMX_BOARD_TYPE_CUST_AGS103 = 10007,
276 CVMX_BOARD_TYPE_CUST_GST104 = 10008,
277 CVMX_BOARD_TYPE_CUST_GCT105 = 10009,
278 CVMX_BOARD_TYPE_CUST_AGS106 = 10010,
279 CVMX_BOARD_TYPE_CUST_SGM107 = 10011,
280 CVMX_BOARD_TYPE_CUST_GCT108 = 10012,
281 CVMX_BOARD_TYPE_CUST_AGS109 = 10013,
282 CVMX_BOARD_TYPE_CUST_GCT110 = 10014,
283 CVMX_BOARD_TYPE_CUST_L2_AIR_SENDER = 10015,
284 CVMX_BOARD_TYPE_CUST_L2_AIR_RECEIVER = 10016,
285 CVMX_BOARD_TYPE_CUST_L2_ACCTON2_TX = 10017,
286 CVMX_BOARD_TYPE_CUST_L2_ACCTON2_RX = 10018,
287 CVMX_BOARD_TYPE_CUST_L2_WSTRNSNIC_TX = 10019,
288 CVMX_BOARD_TYPE_CUST_L2_WSTRNSNIC_RX = 10020,
289 CVMX_BOARD_TYPE_CUST_L2_ZINWELL = 10021,
290 CVMX_BOARD_TYPE_CUST_DEFINED_MAX = 20000,
291
292
293
294
295
296 CVMX_BOARD_TYPE_CUST_PRIVATE_MIN = 20001,
297 CVMX_BOARD_TYPE_UBNT_E100 = 20002,
298 CVMX_BOARD_TYPE_CUST_DSR1000N = 20006,
299 CVMX_BOARD_TYPE_KONTRON_S1901 = 21901,
300 CVMX_BOARD_TYPE_CUST_PRIVATE_MAX = 30000,
301
302
303 };
304
305 enum cvmx_chip_types_enum {
306 CVMX_CHIP_TYPE_NULL = 0,
307 CVMX_CHIP_SIM_TYPE_DEPRECATED = 1,
308 CVMX_CHIP_TYPE_OCTEON_SAMPLE = 2,
309 CVMX_CHIP_TYPE_MAX,
310 };
311
312
313
314 #define CVMX_BOARD_TYPE_NAO38 CVMX_BOARD_TYPE_NAC38
315
316
317 #define ENUM_BRD_TYPE_CASE(x) \
318 case x: return(#x + 16);
319 static inline const char *cvmx_board_type_to_string(enum
320 cvmx_board_types_enum type)
321 {
322 switch (type) {
323 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NULL)
324 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_SIM)
325 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBT3000)
326 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_KODAMA)
327 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NIAGARA)
328 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NAC38)
329 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_THUNDER)
330 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_TRANTOR)
331 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBH3000)
332 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBH3100)
333 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_HIKARI)
334 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CN3010_EVB_HS5)
335 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CN3005_EVB_HS5)
336 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_KBP)
337 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CN3020_EVB_HS5)
338 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBT5800)
339 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NICPRO2)
340 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBH5600)
341 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBH5601)
342 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBH5200)
343 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_BBGW_REF)
344 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NIC_XLE_4G)
345 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBT5600)
346 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBH5201)
347 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBT5200)
348 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CB5600)
349 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CB5601)
350 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CB5200)
351 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_GENERIC)
352 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBH5610)
353 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_LANAI2_A)
354 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_LANAI2_U)
355 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBB5600)
356 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBB6300)
357 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NIC_XLE_10G)
358 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_LANAI2_G)
359 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBT5810)
360 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NIC10E)
361 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EP6300C)
362 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBB6800)
363 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NIC4E)
364 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NIC2E)
365 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBB6600)
366 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_REDWING)
367 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NIC68_4)
368 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NIC10E_66)
369 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_MAX)
370
371
372 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_DEFINED_MIN)
373 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_WSX16)
374 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_NS0216)
375 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_NB5)
376 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_WMR500)
377 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_ITB101)
378 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_NTE102)
379 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_AGS103)
380 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_GST104)
381 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_GCT105)
382 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_AGS106)
383 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_SGM107)
384 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_GCT108)
385 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_AGS109)
386 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_GCT110)
387 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_L2_AIR_SENDER)
388 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_L2_AIR_RECEIVER)
389 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_L2_ACCTON2_TX)
390 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_L2_ACCTON2_RX)
391 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_L2_WSTRNSNIC_TX)
392 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_L2_WSTRNSNIC_RX)
393 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_L2_ZINWELL)
394 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_DEFINED_MAX)
395
396
397 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MIN)
398 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E100)
399 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_DSR1000N)
400 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_KONTRON_S1901)
401 ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MAX)
402 }
403 return NULL;
404 }
405
406 #define ENUM_CHIP_TYPE_CASE(x) \
407 case x: return(#x + 15);
408 static inline const char *cvmx_chip_type_to_string(enum
409 cvmx_chip_types_enum type)
410 {
411 switch (type) {
412 ENUM_CHIP_TYPE_CASE(CVMX_CHIP_TYPE_NULL)
413 ENUM_CHIP_TYPE_CASE(CVMX_CHIP_SIM_TYPE_DEPRECATED)
414 ENUM_CHIP_TYPE_CASE(CVMX_CHIP_TYPE_OCTEON_SAMPLE)
415 ENUM_CHIP_TYPE_CASE(CVMX_CHIP_TYPE_MAX)
416 }
417 return "Unsupported Chip";
418 }
419
420 #endif