cvmx-app-init.h revision 215990
1235235Sbschmidt/***********************license start***************
2145247Sdamien * Copyright (c) 2003-2010  Cavium Networks (support@cavium.com). All rights
3145247Sdamien * reserved.
4145247Sdamien *
5145247Sdamien *
6145247Sdamien * Redistribution and use in source and binary forms, with or without
7145247Sdamien * modification, are permitted provided that the following conditions are
8145247Sdamien * met:
9145247Sdamien *
10145247Sdamien *   * Redistributions of source code must retain the above copyright
11145247Sdamien *     notice, this list of conditions and the following disclaimer.
12145247Sdamien *
13145247Sdamien *   * Redistributions in binary form must reproduce the above
14145247Sdamien *     copyright notice, this list of conditions and the following
15147414Sru *     disclaimer in the documentation and/or other materials provided
16147414Sru *     with the distribution.
17235235Sbschmidt
18206622Suqs *   * Neither the name of Cavium Networks nor the names of
19145247Sdamien *     its contributors may be used to endorse or promote products
20145247Sdamien *     derived from this software without specific prior written
21145247Sdamien *     permission.
22235235Sbschmidt
23145247Sdamien * This Software, including technical data, may be subject to U.S. export  control
24151046Strhodes * laws, including the U.S. Export Administration Act and its  associated
25151046Strhodes * regulations, and may be subject to export or import  regulations in other
26148220Strhodes * countries.
27148145Strhodes
28145247Sdamien * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
29178354Ssam * AND WITH ALL FAULTS AND CAVIUM  NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR
30145247Sdamien * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO
31178354Ssam * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR
32178354Ssam * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM
33148145Strhodes * SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF TITLE,
34148145Strhodes * MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF
35151046Strhodes * VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
36151046Strhodes * CORRESPONDENCE TO DESCRIPTION. THE ENTIRE  RISK ARISING OUT OF USE OR
37148145Strhodes * PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
38148145Strhodes ***********************license end**************************************/
39148145Strhodes
40148145Strhodes
41145247Sdamien
42145247Sdamien
43145247Sdamien
44235235Sbschmidt
45279157Skevlo/**
46145247Sdamien * @file
47156324Sdamien * Header file for simple executive application initialization.  This defines
48235235Sbschmidt * part of the ABI between the bootloader and the application.
49156324Sdamien * <hr>$Revision: 52004 $<hr>
50145247Sdamien *
51235235Sbschmidt */
52235235Sbschmidt
53235235Sbschmidt#ifndef __CVMX_APP_INIT_H__
54156324Sdamien#define __CVMX_APP_INIT_H__
55156324Sdamien
56156324Sdamien#ifdef	__cplusplus
57156324Sdamienextern "C" {
58145247Sdamien#endif
59235235Sbschmidt
60156324Sdamien
61156324Sdamien/* Current major and minor versions of the CVMX bootinfo block that is passed
62235235Sbschmidt** from the bootloader to the application.  This is versioned so that applications
63235235Sbschmidt** can properly handle multiple bootloader versions. */
64235235Sbschmidt#define CVMX_BOOTINFO_MAJ_VER 1
65156324Sdamien#define CVMX_BOOTINFO_MIN_VER 2
66235235Sbschmidt
67235235Sbschmidt
68235235Sbschmidt#if (CVMX_BOOTINFO_MAJ_VER == 1)
69235235Sbschmidt#define CVMX_BOOTINFO_OCTEON_SERIAL_LEN 20
70178354Ssam/* This structure is populated by the bootloader.  For binary
71235235Sbschmidt** compatibility the only changes that should be made are
72235235Sbschmidt** adding members to the end of the structure, and the minor
73235235Sbschmidt** version should be incremented at that time.
74235235Sbschmidt** If an incompatible change is made, the major version
75235235Sbschmidt** must be incremented, and the minor version should be reset
76235235Sbschmidt** to 0.
77235235Sbschmidt*/
78235235Sbschmidtstruct cvmx_bootinfo {
79235235Sbschmidt    uint32_t major_version;
80235235Sbschmidt    uint32_t minor_version;
81178354Ssam
82178354Ssam    uint64_t stack_top;
83178354Ssam    uint64_t heap_base;
84178354Ssam    uint64_t heap_end;
85178354Ssam    uint64_t desc_vaddr;
86195618Srpaulo
87178354Ssam    uint32_t exception_base_addr;
88178354Ssam    uint32_t stack_size;
89178354Ssam    uint32_t flags;
90178354Ssam    uint32_t core_mask;
91178354Ssam    uint32_t dram_size;  /**< DRAM size in megabytes */
92178354Ssam    uint32_t phy_mem_desc_addr;  /**< physical address of free memory descriptor block*/
93195618Srpaulo    uint32_t debugger_flags_base_addr;  /**< used to pass flags from app to debugger */
94195618Srpaulo    uint32_t eclock_hz;  /**< CPU clock speed, in hz */
95178354Ssam    uint32_t dclock_hz;  /**< DRAM clock speed, in hz */
96233648Seadler    uint32_t reserved0;
97178354Ssam    uint16_t board_type;
98178354Ssam    uint8_t board_rev_major;
99178354Ssam    uint8_t board_rev_minor;
100178354Ssam    uint16_t reserved1;
101178354Ssam    uint8_t reserved2;
102178354Ssam    uint8_t reserved3;
103178354Ssam    char board_serial_number[CVMX_BOOTINFO_OCTEON_SERIAL_LEN];
104178354Ssam    uint8_t mac_addr_base[6];
105178354Ssam    uint8_t mac_addr_count;
106235235Sbschmidt#if (CVMX_BOOTINFO_MIN_VER >= 1)
107279157Skevlo    /* Several boards support compact flash on the Octeon boot bus.  The CF
108279157Skevlo    ** memory spaces may be mapped to different addresses on different boards.
109279157Skevlo    ** These are the physical addresses, so care must be taken to use the correct
110279157Skevlo    ** XKPHYS/KSEG0 addressing depending on the application's ABI.
111279157Skevlo    ** These values will be 0 if CF is not present */
112279157Skevlo    uint64_t compact_flash_common_base_addr;
113279157Skevlo    uint64_t compact_flash_attribute_base_addr;
114235235Sbschmidt    /* Base address of the LED display (as on EBT3000 board)
115235235Sbschmidt    ** This will be 0 if LED display not present. */
116178354Ssam    uint64_t led_display_base_addr;
117178354Ssam#endif
118145247Sdamien#if (CVMX_BOOTINFO_MIN_VER >= 2)
119152821Sbrueffer    uint32_t dfa_ref_clock_hz;  /**< DFA reference clock in hz (if applicable)*/
120152821Sbrueffer    uint32_t config_flags;  /**< flags indicating various configuration options.  These flags supercede
121235235Sbschmidt                            ** the 'flags' variable and should be used instead if available */
122235235Sbschmidt#endif
123145247Sdamien
124156691Sdamien
125156691Sdamien};
126172128Sbrueffer
127172128Sbrueffertypedef struct cvmx_bootinfo cvmx_bootinfo_t;
128172128Sbrueffer
129172128Sbrueffer#define CVMX_BOOTINFO_CFG_FLAG_PCI_HOST			(1ull << 0)
130172128Sbrueffer#define CVMX_BOOTINFO_CFG_FLAG_PCI_TARGET		(1ull << 1)
131172128Sbrueffer#define CVMX_BOOTINFO_CFG_FLAG_DEBUG			(1ull << 2)
132172128Sbrueffer#define CVMX_BOOTINFO_CFG_FLAG_NO_MAGIC			(1ull << 3)
133172128Sbrueffer/* This flag is set if the TLB mappings are not contained in the
134172128Sbrueffer** 0x10000000 - 0x20000000 boot bus region. */
135172128Sbrueffer#define CVMX_BOOTINFO_CFG_FLAG_OVERSIZE_TLB_MAPPING     (1ull << 4)
136172128Sbrueffer#define CVMX_BOOTINFO_CFG_FLAG_BREAK			(1ull << 5)
137172128Sbrueffer
138172128Sbrueffer#endif /*   (CVMX_BOOTINFO_MAJ_VER == 1) */
139172128Sbrueffer
140172128Sbrueffer
141172128Sbrueffer/* Type defines for board and chip types */
142172128Sbruefferenum cvmx_board_types_enum {
143172128Sbrueffer    CVMX_BOARD_TYPE_NULL           =  0,
144172128Sbrueffer    CVMX_BOARD_TYPE_SIM            =  1,
145172128Sbrueffer    CVMX_BOARD_TYPE_EBT3000        =  2,
146172128Sbrueffer    CVMX_BOARD_TYPE_KODAMA         =  3,
147172128Sbrueffer    CVMX_BOARD_TYPE_NIAGARA        =  4,	/* Obsolete, no longer supported */
148172128Sbrueffer    CVMX_BOARD_TYPE_NAC38          =  5,	/* formerly NAO38 */
149172128Sbrueffer    CVMX_BOARD_TYPE_THUNDER        =  6,
150172128Sbrueffer    CVMX_BOARD_TYPE_TRANTOR        =  7,	/* Obsolete, no longer supported */
151172128Sbrueffer    CVMX_BOARD_TYPE_EBH3000        =  8,
152279157Skevlo    CVMX_BOARD_TYPE_EBH3100        =  9,
153172128Sbrueffer    CVMX_BOARD_TYPE_HIKARI         = 10,
154172128Sbrueffer    CVMX_BOARD_TYPE_CN3010_EVB_HS5 = 11,
155172128Sbrueffer    CVMX_BOARD_TYPE_CN3005_EVB_HS5 = 12,
156172128Sbrueffer    CVMX_BOARD_TYPE_KBP            = 13,
157172128Sbrueffer    CVMX_BOARD_TYPE_CN3020_EVB_HS5 = 14,  /* Deprecated, CVMX_BOARD_TYPE_CN3010_EVB_HS5 supports the CN3020 */
158172128Sbrueffer    CVMX_BOARD_TYPE_EBT5800        = 15,
159172128Sbrueffer    CVMX_BOARD_TYPE_NICPRO2        = 16,
160172128Sbrueffer    CVMX_BOARD_TYPE_EBH5600        = 17,
161172128Sbrueffer    CVMX_BOARD_TYPE_EBH5601        = 18,
162172128Sbrueffer    CVMX_BOARD_TYPE_EBH5200        = 19,
163172128Sbrueffer    CVMX_BOARD_TYPE_BBGW_REF       = 20,
164172128Sbrueffer    CVMX_BOARD_TYPE_NIC_XLE_4G     = 21,
165172128Sbrueffer    CVMX_BOARD_TYPE_EBT5600        = 22,
166172128Sbrueffer    CVMX_BOARD_TYPE_EBH5201        = 23,
167172128Sbrueffer    CVMX_BOARD_TYPE_EBT5200        = 24,
168172128Sbrueffer    CVMX_BOARD_TYPE_CB5600         = 25,
169172128Sbrueffer    CVMX_BOARD_TYPE_CB5601         = 26,
170172128Sbrueffer    CVMX_BOARD_TYPE_CB5200         = 27,
171172128Sbrueffer    CVMX_BOARD_TYPE_GENERIC        = 28,   /* Special 'generic' board type, supports many boards */
172172128Sbrueffer    CVMX_BOARD_TYPE_EBH5610        = 29,
173172128Sbrueffer    CVMX_BOARD_TYPE_LANAI2_A       = 30,
174172128Sbrueffer    CVMX_BOARD_TYPE_LANAI2_U       = 31,
175172128Sbrueffer    CVMX_BOARD_TYPE_EBB5600        = 32,
176172128Sbrueffer    CVMX_BOARD_TYPE_EBB6300        = 33,
177172128Sbrueffer    CVMX_BOARD_TYPE_NIC_XLE_10G    = 34,
178172128Sbrueffer    CVMX_BOARD_TYPE_LANAI2_G       = 35,
179172128Sbrueffer    CVMX_BOARD_TYPE_EBT5810        = 36,
180172128Sbrueffer    CVMX_BOARD_TYPE_NIC10E         = 37,
181172128Sbrueffer    CVMX_BOARD_TYPE_MAX,
182172128Sbrueffer
183172128Sbrueffer    /* The range from CVMX_BOARD_TYPE_MAX to CVMX_BOARD_TYPE_CUST_DEFINED_MIN is reserved
184172128Sbrueffer    ** for future SDK use. */
185172128Sbrueffer
186172128Sbrueffer    /* Set aside a range for customer boards.  These numbers are managed
187172128Sbrueffer    ** by Cavium.
188172128Sbrueffer    */
189172128Sbrueffer    CVMX_BOARD_TYPE_CUST_DEFINED_MIN = 10000,
190172128Sbrueffer    CVMX_BOARD_TYPE_CUST_WSX16       = 10001,
191172128Sbrueffer    CVMX_BOARD_TYPE_CUST_NS0216      = 10002,
192172128Sbrueffer    CVMX_BOARD_TYPE_CUST_NB5         = 10003,
193172128Sbrueffer    CVMX_BOARD_TYPE_CUST_WMR500      = 10004,
194172128Sbrueffer    CVMX_BOARD_TYPE_CUST_ITB101      = 10005,
195172128Sbrueffer    CVMX_BOARD_TYPE_CUST_NTE102      = 10006,
196172128Sbrueffer    CVMX_BOARD_TYPE_CUST_AGS103      = 10007,
197172128Sbrueffer#if !defined(OCTEON_VENDOR_LANNER)
198172128Sbrueffer    CVMX_BOARD_TYPE_CUST_GST104      = 10008,
199172128Sbrueffer#else
200172128Sbrueffer    CVMX_BOARD_TYPE_CUST_LANNER_MR955= 10008,
201172128Sbrueffer#endif
202172128Sbrueffer    CVMX_BOARD_TYPE_CUST_GCT105      = 10009,
203172128Sbrueffer    CVMX_BOARD_TYPE_CUST_AGS106      = 10010,
204172128Sbrueffer    CVMX_BOARD_TYPE_CUST_SGM107      = 10011,
205172128Sbrueffer    CVMX_BOARD_TYPE_CUST_GCT108      = 10012,
206172128Sbrueffer    CVMX_BOARD_TYPE_CUST_AGS109      = 10013,
207172128Sbrueffer    CVMX_BOARD_TYPE_CUST_GCT110      = 10014,
208172128Sbrueffer    CVMX_BOARD_TYPE_CUST_L2_AIR_SENDER  = 10015,
209172128Sbrueffer    CVMX_BOARD_TYPE_CUST_L2_AIR_RECEIVER= 10016,
210172128Sbrueffer    CVMX_BOARD_TYPE_CUST_L2_ACCTON2_TX  = 10017,
211172128Sbrueffer    CVMX_BOARD_TYPE_CUST_L2_ACCTON2_RX  = 10018,
212145247Sdamien    CVMX_BOARD_TYPE_CUST_L2_WSTRNSNIC_TX= 10019,
213145247Sdamien    CVMX_BOARD_TYPE_CUST_L2_WSTRNSNIC_RX= 10020,
214147413Sru#if defined(OCTEON_VENDOR_LANNER)
215145247Sdamien    CVMX_BOARD_TYPE_CUST_LANNER_MR730	= 10021,
216178354Ssam#else
217145247Sdamien    CVMX_BOARD_TYPE_CUST_L2_ZINWELL     = 10021,
218145247Sdamien#endif
219145247Sdamien    CVMX_BOARD_TYPE_CUST_DEFINED_MAX = 20000,
220178354Ssam
221178354Ssam    /* Set aside a range for customer private use.  The SDK won't
222178354Ssam    ** use any numbers in this range. */
223178354Ssam    CVMX_BOARD_TYPE_CUST_PRIVATE_MIN = 20001,
224145247Sdamien#if defined(OCTEON_VENDOR_LANNER)
225147413Sru    CVMX_BOARD_TYPE_CUST_LANNER_MR320= 20002,
226145247Sdamien#endif
227178354Ssam    CVMX_BOARD_TYPE_CUST_PRIVATE_MAX = 30000,
228178354Ssam
229154998Sdamien
230145247Sdamien    /* Range for IO modules */
231145247Sdamien    CVMX_BOARD_TYPE_MODULE_MIN          = 30001,
232147413Sru    CVMX_BOARD_TYPE_MODULE_PCIE_RC_4X   = 30002,
233145247Sdamien    CVMX_BOARD_TYPE_MODULE_PCIE_EP_4X   = 30003,
234178354Ssam    CVMX_BOARD_TYPE_MODULE_SGMII_MARVEL = 30004,
235178354Ssam    CVMX_BOARD_TYPE_MODULE_SFPPLUS_BCM  = 30005,
236154998Sdamien    CVMX_BOARD_TYPE_MODULE_SRIO         = 30006,
237145247Sdamien    CVMX_BOARD_TYPE_MODULE_EBB5600_QLM0 = 30007,
238145247Sdamien    CVMX_BOARD_TYPE_MODULE_EBB5600_QLM1 = 30008,
239145247Sdamien    CVMX_BOARD_TYPE_MODULE_EBB5600_QLM2 = 30009,
240156324Sdamien    CVMX_BOARD_TYPE_MODULE_EBB5600_QLM3 = 30010,
241156324Sdamien    CVMX_BOARD_TYPE_MODULE_MAX          = 31000,
242156324Sdamien
243156324Sdamien    /* The remaining range is reserved for future use. */
244156324Sdamien};
245145247Sdamienenum cvmx_chip_types_enum {
246156324Sdamien    CVMX_CHIP_TYPE_NULL = 0,
247145247Sdamien    CVMX_CHIP_SIM_TYPE_DEPRECATED = 1,
248145247Sdamien    CVMX_CHIP_TYPE_OCTEON_SAMPLE = 2,
249145247Sdamien    CVMX_CHIP_TYPE_MAX,
250145247Sdamien};
251178354Ssam
252145247Sdamien/* Compatability alias for NAC38 name change, planned to be removed from SDK 1.7 */
253145247Sdamien#define CVMX_BOARD_TYPE_NAO38	CVMX_BOARD_TYPE_NAC38
254178354Ssam
255178354Ssam/* Functions to return string based on type */
256178354Ssam#define ENUM_BRD_TYPE_CASE(x)   case x: return(#x + 16);   /* Skip CVMX_BOARD_TYPE_ */
257178354Ssamstatic inline const char *cvmx_board_type_to_string(enum cvmx_board_types_enum type)
258178354Ssam{
259178354Ssam    switch (type)
260235237Sbschmidt    {
261145247Sdamien        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NULL)
262147413Sru        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_SIM)
263202386Sru        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBT3000)
264145247Sdamien        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_KODAMA)
265145247Sdamien        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NIAGARA)
266145247Sdamien        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NAC38)
267145247Sdamien        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_THUNDER)
268145247Sdamien        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_TRANTOR)
269145247Sdamien        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBH3000)
270235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBH3100)
271235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_HIKARI)
272235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CN3010_EVB_HS5)
273235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CN3005_EVB_HS5)
274235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_KBP)
275235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CN3020_EVB_HS5)
276235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBT5800)
277235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NICPRO2)
278147413Sru        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBH5600)
279178354Ssam        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBH5601)
280147413Sru        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBH5200)
281147413Sru        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_BBGW_REF)
282235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NIC_XLE_4G)
283235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBT5600)
284235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBH5201)
285235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBT5200)
286235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CB5600)
287235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CB5601)
288235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CB5200)
289235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_GENERIC)
290235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBH5610)
291235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_LANAI2_A)
292235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_LANAI2_U)
293235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBB5600)
294235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBB6300)
295235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NIC_XLE_10G)
296193526Ssam        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_LANAI2_G)
297235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_EBT5810)
298235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NIC10E)
299235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_MAX)
300235235Sbschmidt
301235235Sbschmidt        /* Customer boards listed here */
302235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_DEFINED_MIN)
303235235Sbschmidt        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_WSX16)
304        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_NS0216)
305        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_NB5)
306        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_WMR500)
307        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_ITB101)
308        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_NTE102)
309        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_AGS103)
310#if !defined(OCTEON_VENDOR_LANNER)
311        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_GST104)
312#else
313	ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_LANNER_MR955)
314#endif
315        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_GCT105)
316        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_AGS106)
317        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_SGM107)
318        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_GCT108)
319        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_AGS109)
320        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_GCT110)
321	ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_L2_AIR_SENDER)
322	ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_L2_AIR_RECEIVER)
323	ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_L2_ACCTON2_TX)
324	ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_L2_ACCTON2_RX)
325	ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_L2_WSTRNSNIC_TX)
326	ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_L2_WSTRNSNIC_RX)
327#if defined(OCTEON_VENDOR_LANNER)
328	ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_LANNER_MR730)
329#else
330	ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_L2_ZINWELL)
331#endif
332
333        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_DEFINED_MAX)
334
335        /* Customer private range */
336        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MIN)
337#if defined(OCTEON_VENDOR_LANNER)
338	ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_LANNER_MR320)
339#endif
340        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MAX)
341
342        /* Module range */
343        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_MODULE_MIN)
344        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_MODULE_PCIE_RC_4X)
345        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_MODULE_PCIE_EP_4X)
346        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_MODULE_SGMII_MARVEL)
347        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_MODULE_SFPPLUS_BCM)
348        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_MODULE_SRIO)
349        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_MODULE_EBB5600_QLM0)
350        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_MODULE_EBB5600_QLM1)
351        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_MODULE_EBB5600_QLM2)
352        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_MODULE_EBB5600_QLM3)
353        ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_MODULE_MAX)
354    }
355    return "Unsupported Board";
356}
357
358#define ENUM_CHIP_TYPE_CASE(x)   case x: return(#x + 15);   /* Skip CVMX_CHIP_TYPE */
359static inline const char *cvmx_chip_type_to_string(enum cvmx_chip_types_enum type)
360{
361    switch (type)
362    {
363        ENUM_CHIP_TYPE_CASE(CVMX_CHIP_TYPE_NULL)
364        ENUM_CHIP_TYPE_CASE(CVMX_CHIP_SIM_TYPE_DEPRECATED)
365        ENUM_CHIP_TYPE_CASE(CVMX_CHIP_TYPE_OCTEON_SAMPLE)
366        ENUM_CHIP_TYPE_CASE(CVMX_CHIP_TYPE_MAX)
367    }
368    return "Unsupported Chip";
369}
370
371
372extern int cvmx_debug_uart;
373
374
375
376#ifdef	__cplusplus
377}
378#endif
379
380#endif /* __CVMX_APP_INIT_H__ */
381