npi_zcp.h revision 4496171313bed39e96f21bc2f9faf2868e267ae3
/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _NPI_ZCP_H
#define _NPI_ZCP_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <npi.h>
#include <nxge_zcp_hw.h>
typedef enum zcp_buf_region_e {
BAM_4BUF = 1,
BAM_8BUF = 2,
BAM_16BUF = 3,
BAM_32BUF = 4
typedef enum zcp_config_e {
CFG_ZCP = 0x01,
CFG_ZCP_ECC_CHK = 0x02,
CFG_ZCP_PAR_CHK = 0x04,
CFG_ZCP_BUF_RESP = 0x08,
CFG_ZCP_BUF_REQ = 0x10,
CFG_ZCP_ALL = 0x1F
} zcp_config_t;
typedef enum zcp_iconfig_e {
typedef enum tte_sflow_attr_mask_e {
TTE_RDC_TBL_OFF = 0x0001,
TTE_BUF_SIZE = 0x0002,
TTE_NUM_BUF = 0x0004,
TTE_ULP_END = 0x0008,
TTE_ULP_END_EN = 0x0010,
TTE_UNMAP_ALL_EN = 0x0020,
TTE_TMODE = 0x0040,
TTE_SKIP = 0x0080,
TTE_HBM_RING_BASE_ADDR = 0x0100,
TTE_HBM_RING_SIZE = 0x0200,
TTE_HBM_BUSY = 0x0400,
TTE_HBM_TOQ = 0x0800,
TTE_SFLOW_ATTR_ALL = 0x0FFF
typedef enum tte_dflow_attr_mask_e {
TTE_MAPPED_IN = 0x0001,
TTE_ANCHOR_SEQ = 0x0002,
TTE_ANCHOR_OFFSET = 0x0004,
TTE_ANCHOR_BUFFER = 0x0008,
TTE_ANCHOR_BUF_FLAG = 0x0010,
TTE_UNMAP_ON_LEFT = 0x0020,
TTE_ULP_END_REACHED = 0x0040,
TTE_ERR_STAT = 0x0080,
TTE_HBM_WR_PTR = 0x0100,
TTE_HBM_HOQ = 0x0200,
TTE_HBM_PREFETCH_ON = 0x0400,
TTE_DFLOW_ATTR_ALL = 0x07FF
#define IS_VALID_BAM_REGION(region)\
do {\
cnt--;\
}
#define ZCP_DMA_THRES_INVALID 0x10
#define ZCP_BAM_REGION_INVALID 0x11
#define ZCP_ROW_INDEX_INVALID 0x12
#define ZCP_SFLOW_ATTR_INVALID 0x13
#define ZCP_DFLOW_ATTR_INVALID 0x14
#define ZCP_FLOW_ID_INVALID 0x15
#define ZCP_BAM_BANK_INVALID 0x16
#define ZCP_BAM_WORD_EN_INVALID 0x17
(portn << 12))
/* ZCP HW NPI Prototypes */
tte_sflow_attr_t *);
tte_dflow_attr_t *);
uint8_t, zcp_ram_unit_t *);
zcp_ram_unit_t *);
#ifdef __cplusplus
}
#endif
#endif /* _NPI_ZCP_H */