unm_brdcfg.h revision 9a5557fdd04be37785607871e8d4189e39490129
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 NetXen, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef __UNM_BRDINFO_H
#define __UNM_BRDINFO_H
/* The version of the main data structure */
#define UNM_BDINFO_VERSION 1
/* Magic number to let user know flash is programmed */
#define UNM_BDINFO_MAGIC 0x12345678
#define P2_CHIP 2
#define P3_CHIP 3
#define NX_P2_C0 0x24
#define NX_P2_C1 0x25
#define NX_P3_A0 0x30
#define NX_P3_A2 0x32
#define NX_P3_B0 0x40
#define NX_P3_B1 0x41
#define NX_P3_B2 0x42
typedef enum {
UNM_BRDTYPE_P1_BD = 0x0000,
UNM_BRDTYPE_P1_SB = 0x0001,
UNM_BRDTYPE_P1_SMAX = 0x0002,
UNM_BRDTYPE_P1_SOCK = 0x0003,
UNM_BRDTYPE_P2_SOCK_31 = 0x0008,
UNM_BRDTYPE_P2_SOCK_35 = 0x0009,
UNM_BRDTYPE_P2_SB35_4G = 0x000a,
UNM_BRDTYPE_P2_SB31_10G = 0x000b,
UNM_BRDTYPE_P2_SB31_2G = 0x000c,
UNM_BRDTYPE_P2_SB31_10G_IMEZ = 0x000d,
UNM_BRDTYPE_P2_SB31_10G_HMEZ = 0x000e,
UNM_BRDTYPE_P2_SB31_10G_CX4 = 0x000f,
/* Reference quad gig */
UNM_BRDTYPE_P3_REF_QG = 0x0021,
UNM_BRDTYPE_P3_HMEZ = 0x0022,
/* Dual CX4 - Low Profile - Red card */
UNM_BRDTYPE_P3_10G_CX4_LP = 0x0023,
UNM_BRDTYPE_P3_4_GB = 0x0024,
UNM_BRDTYPE_P3_IMEZ = 0x0025,
UNM_BRDTYPE_P3_10G_SFP_PLUS = 0x0026,
UNM_BRDTYPE_P3_10000_BASE_T = 0x0027,
UNM_BRDTYPE_P3_XG_LOM = 0x0028,
UNM_BRDTYPE_P3_4_GB_MM = 0x0029,
UNM_BRDTYPE_P3_10G_TRP = 0x0080,
typedef enum {
} nx_fw_type_t;
/* board type specific information */
typedef struct {
long ports; /* max no of physical ports */
char *short_name;
{ \
int i, found = 0; \
for (i = 0; i < NUM_SUPPORTED_BOARDS; ++i) { \
found = 1; \
break; \
} \
} \
if (!found) \
name = "Unknown"; \
}
typedef struct {
/* unm_eth_addr_t mac_address[MAX_PORTS]; */
/* MN-related config */
/* SN-related config */
#define FLASH_NUM_PORTS 4
typedef struct {
/* flash user area */
typedef struct {
/* bootloader */
/* image */
/* primary image status */
/* MAC address , 4 ports */
/* Any user defined data */
#define FLASH_NUM_MAC_PER_PORT 32
typedef struct {
// __uint8_t crbinit_md5[16];
// __uint8_t brdcfg_md5[16];
/* bootloader */
// __uint8_t bootld_md5[16];
/* image */
// U8 image_md5[16];
/* primary image status */
/* MAC address , 4 ports, 32 address per port */
/* Any user defined data */
/* Flash memory map */
typedef enum {
CRBINIT_START = 0, /* Crbinit section */
// LICENSE_TIME_START = 0x3C0000, /* license expiry time info */
/* User defined region for new boards */
USER_START = 0x3E8000,
#endif /* !__UNM_BRDINFO_H */