nxge_ipp_hw.h revision 14ea4bb737263733ad80a36b4f73f681c30a6b45
/*
* 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 _SYS_NXGE_NXGE_IPP_HW_H
#define _SYS_NXGE_NXGE_IPP_HW_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <nxge_defs.h>
/* IPP Registers */
#define IPP_CONFIG_REG 0x000
#define IPP_DISCARD_PKT_CNT_REG 0x020
#define IPP_TCP_CKSUM_ERR_CNT_REG 0x028
#define IPP_ECC_ERR_COUNTER_REG 0x030
#define IPP_INT_STATUS_REG 0x040
#define IPP_INT_MASK_REG 0x048
#define IPP_PFIFO_RD_DATA0_REG 0x060
#define IPP_PFIFO_RD_DATA1_REG 0x068
#define IPP_PFIFO_RD_DATA2_REG 0x070
#define IPP_PFIFO_RD_DATA3_REG 0x078
#define IPP_PFIFO_RD_DATA4_REG 0x080
#define IPP_PFIFO_WR_DATA0_REG 0x088
#define IPP_PFIFO_WR_DATA1_REG 0x090
#define IPP_PFIFO_WR_DATA2_REG 0x098
#define IPP_PFIFO_WR_DATA3_REG 0x0a0
#define IPP_PFIFO_WR_DATA4_REG 0x0a8
#define IPP_PFIFO_RD_PTR_REG 0x0b0
#define IPP_PFIFO_WR_PTR_REG 0x0b8
#define IPP_DFIFO_RD_DATA0_REG 0x0c0
#define IPP_DFIFO_RD_DATA1_REG 0x0c8
#define IPP_DFIFO_RD_DATA2_REG 0x0d0
#define IPP_DFIFO_RD_DATA3_REG 0x0d8
#define IPP_DFIFO_RD_DATA4_REG 0x0e0
#define IPP_DFIFO_WR_DATA0_REG 0x0e8
#define IPP_DFIFO_WR_DATA1_REG 0x0f0
#define IPP_DFIFO_WR_DATA2_REG 0x0f8
#define IPP_DFIFO_WR_DATA3_REG 0x100
#define IPP_DFIFO_WR_DATA4_REG 0x108
#define IPP_DFIFO_RD_PTR_REG 0x110
#define IPP_DFIFO_WR_PTR_REG 0x118
#define IPP_STATE_MACHINE_REG 0x120
#define IPP_CKSUM_STATUS_REG 0x128
#define IPP_FFLP_CKSUM_INFO_REG 0x130
#define IPP_DEBUG_SELECT_REG 0x138
#define IPP_DFIFO_ECC_SYNDROME_REG 0x140
#define IPP_DFIFO_EOPM_RD_PTR_REG 0x148
#define IPP_ECC_CTRL_REG 0x150
#define IPP_PORT_OFFSET 0x4000
#define IPP_PORT0_OFFSET 0
#define IPP_PORT1_OFFSET 0x8000
#define IPP_PORT2_OFFSET 0x4000
#define IPP_PORT3_OFFSET 0xc000
#define IPP_PORT_ADDR(port_num)\
/* IPP Configuration Register */
#define IPP_IP_MAX_PKT_BYTES_SHIFT 8
#define IPP_IP_MAX_PKT_BYTES_MASK 0x1FFFF
#define IPP_EN (1 << 0)
/* IPP Interrupt Status Registers */
#define IPP_DFIFO_ECC_UNCORR_ERR_MASK 0x3
#define IPP_DFIFO_ECC_UNCORR_ERR_SHIFT 28
#define IPP_DFIFO_ECC_CORR_ERR_MASK 0x3
#define IPP_DFIFO_ECC_CORR_ERR_SHIFT 26
#define IPP_DFIFO_ECC_ERR_MASK 0x3
#define IPP_DFIFO_ECC_ERR_SHIFT 24
#define IPP_DFIFO_ECC_ERR_ENTRY_INDEX_MASK 0x7FF
#define IPP_DFIFO_ECC_ERR_ENTRY_INDEX_SHIFT 12
#define IPP_PRE_FIFO_PERR_ENTRY_INDEX_MASK 0x3F
#define IPP_PRE_FIFO_PERR_ENTRY_INDEX_SHIFT 4
#define IPP_PKT_DISCARD_CNT_MAX (1 << 0)
#define IPP_P0_P1_DFIFO_ENTRIES 2048
#define IPP_P2_P3_DFIFO_ENTRIES 1024
#define IPP_NIU_DFIFO_ENTRIES 1024
typedef union _ipp_status {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#if defined(_BIT_FIELDS_HTOL)
#elif defined(_BIT_FIELDS_LTOH)
#else
#endif
} w0;
#if !defined(_BIG_ENDIAN)
#endif
} bits;
} ipp_status_t;
typedef union _ipp_ecc_ctrl {
struct {
#if defined(_BIG_ENDIAN)
#endif
struct {
#if defined(_BIT_FIELDS_HTOL)
#elif defined(_BIT_FIELDS_LTOH)
#else
#endif
} w0;
#if !defined(_BIG_ENDIAN)
#endif
} bits;
/* IPP Interrupt Mask Registers */
#define IPP_PKT_DISCARD_CNT_INTR_DIS (1 << 0)
#define IPP_RESET_WAIT 10
#define IPP_XMAC_DFIFO_PTR_MASK 0x7FF
#define IPP_BMAC_DFIFO_PTR_MASK 0x3FF
#define IPP_ECC_CNT_MASK 0xFF
#define IPP_BAD_CS_CNT_MASK 0x3FFF
#define IPP_PKT_DIS_CNT_MASK 0x3FFF
#ifdef __cplusplus
}
#endif
#endif /* _SYS_NXGE_NXGE_IPP_HW_H */