13dec9fcdSqs /* 23dec9fcdSqs * CDDL HEADER START 33dec9fcdSqs * 43dec9fcdSqs * The contents of this file are subject to the terms of the 53dec9fcdSqs * Common Development and Distribution License (the "License"). 63dec9fcdSqs * You may not use this file except in compliance with the License. 73dec9fcdSqs * 83dec9fcdSqs * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 93dec9fcdSqs * or http://www.opensolaris.org/os/licensing. 103dec9fcdSqs * See the License for the specific language governing permissions 113dec9fcdSqs * and limitations under the License. 123dec9fcdSqs * 133dec9fcdSqs * When distributing Covered Code, include this CDDL HEADER in each 143dec9fcdSqs * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 153dec9fcdSqs * If applicable, add the following below this CDDL HEADER, with the 163dec9fcdSqs * fields enclosed by brackets "[]" replaced with your own identifying 173dec9fcdSqs * information: Portions Copyright [yyyy] [name of copyright owner] 183dec9fcdSqs * 193dec9fcdSqs * CDDL HEADER END 203dec9fcdSqs */ 213dec9fcdSqs /* 223dec9fcdSqs * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 233dec9fcdSqs * Use is subject to license terms. 243dec9fcdSqs */ 253dec9fcdSqs 263dec9fcdSqs #ifndef _HXGE_VMAC_HW_H 273dec9fcdSqs #define _HXGE_VMAC_HW_H 283dec9fcdSqs 293dec9fcdSqs #ifdef __cplusplus 303dec9fcdSqs extern "C" { 313dec9fcdSqs #endif 323dec9fcdSqs 333dec9fcdSqs #define VMAC_BASE_ADDR 0X00100000 343dec9fcdSqs 353dec9fcdSqs #define VMAC_RST (VMAC_BASE_ADDR + 0x0) 363dec9fcdSqs #define VMAC_TX_CFG (VMAC_BASE_ADDR + 0x8) 373dec9fcdSqs #define VMAC_RX_CFG (VMAC_BASE_ADDR + 0x10) 383dec9fcdSqs #define VMAC_TX_STAT (VMAC_BASE_ADDR + 0x20) 393dec9fcdSqs #define VMAC_TX_MSK (VMAC_BASE_ADDR + 0x28) 403dec9fcdSqs #define VMAC_RX_STAT (VMAC_BASE_ADDR + 0x30) 413dec9fcdSqs #define VMAC_RX_MSK (VMAC_BASE_ADDR + 0x38) 423dec9fcdSqs #define VMAC_TX_STAT_MIRROR (VMAC_BASE_ADDR + 0x40) 433dec9fcdSqs #define VMAC_RX_STAT_MIRROR (VMAC_BASE_ADDR + 0x48) 443dec9fcdSqs #define VMAC_TX_FRAME_CNT (VMAC_BASE_ADDR + 0x100) 453dec9fcdSqs #define VMAC_TX_BYTE_CNT (VMAC_BASE_ADDR + 0x108) 463dec9fcdSqs #define VMAC_RX_FRAME_CNT (VMAC_BASE_ADDR + 0x120) 473dec9fcdSqs #define VMAC_RX_BYTE_CNT (VMAC_BASE_ADDR + 0x128) 483dec9fcdSqs #define VMAC_RX_DROP_FR_CNT (VMAC_BASE_ADDR + 0x130) 493dec9fcdSqs #define VMAC_RX_DROP_BYTE_CNT (VMAC_BASE_ADDR + 0x138) 503dec9fcdSqs #define VMAC_RX_CRC_CNT (VMAC_BASE_ADDR + 0x140) 513dec9fcdSqs #define VMAC_RX_PAUSE_CNT (VMAC_BASE_ADDR + 0x148) 523dec9fcdSqs #define VMAC_RX_BCAST_FR_CNT (VMAC_BASE_ADDR + 0x150) 533dec9fcdSqs #define VMAC_RX_MCAST_FR_CNT (VMAC_BASE_ADDR + 0x158) 543dec9fcdSqs 553dec9fcdSqs 563dec9fcdSqs /* 573dec9fcdSqs * Register: VmacRst 583dec9fcdSqs * VMAC Software Reset Command 593dec9fcdSqs * Description: 603dec9fcdSqs * Fields: 613dec9fcdSqs * Write a '1' to reset Rx VMAC; auto clears. This brings rx vmac 623dec9fcdSqs * to power on reset state. 633dec9fcdSqs * Write a '1' to reset Tx VMAC; auto clears. This brings tx vmac 643dec9fcdSqs * to power on reset state. 653dec9fcdSqs */ 663dec9fcdSqs typedef union { 673dec9fcdSqs uint64_t value; 683dec9fcdSqs struct { 693dec9fcdSqs #if defined(_BIG_ENDIAN) 70*fe930412Sqs uint32_t rsrvd:32; 71*fe930412Sqs uint32_t rsrvd_l:23; 72*fe930412Sqs uint32_t rx_reset:1; 73*fe930412Sqs uint32_t rsrvd1:7; 74*fe930412Sqs uint32_t tx_reset:1; 753dec9fcdSqs #else 76*fe930412Sqs uint32_t tx_reset:1; 77*fe930412Sqs uint32_t rsrvd1:7; 78*fe930412Sqs uint32_t rx_reset:1; 79*fe930412Sqs uint32_t rsrvd_l:23; 80*fe930412Sqs uint32_t rsrvd:32; 813dec9fcdSqs #endif 823dec9fcdSqs } bits; 833dec9fcdSqs } vmac_rst_t; 843dec9fcdSqs 853dec9fcdSqs 863dec9fcdSqs /* 873dec9fcdSqs * Register: VmacTxCfg 883dec9fcdSqs * Tx VMAC Configuration 893dec9fcdSqs * Description: 903dec9fcdSqs * Fields: 913dec9fcdSqs * Maximum length of any total transfer gathered by Tx VMAC, 923dec9fcdSqs * including packet data, header, crc, transmit header and any 933dec9fcdSqs * pad bytes. Default value of 0x2422 represents 9220 bytes of 943dec9fcdSqs * packet data, ethernet header, and crc, 14 bytes maximum pad, 953dec9fcdSqs * and 16 bytes transmit header = 9250 (0x2422). 963dec9fcdSqs * Enable padding of short packet to meet minimum frame length of 973dec9fcdSqs * 64 bytes. Software should note that if txPad functionality is 983dec9fcdSqs * used to pad runt packets to minimum length, that crcInsert 993dec9fcdSqs * functionality (below) must also be used to provide the packet 1003dec9fcdSqs * with correct L2 crc. 1013dec9fcdSqs * 1: Enable generation and appending of FCS to the packets. 0: 1023dec9fcdSqs * Disable generation and appending of FCS to the packets. 1033dec9fcdSqs * Enable Tx VMAC. Write a '1' to enable Tx VMAC; write a '0' to 1043dec9fcdSqs * disable it. This bit also propagates as vmacTdcEn to the TDC 1053dec9fcdSqs * block. In TDC, the vmacTdcEn bit disables the RTab state 1063dec9fcdSqs * machine. Hence, the transmission from that blade would be 1073dec9fcdSqs * stopped and be queued, but no packets would be dropped. Thus, 1083dec9fcdSqs * the VMAC can only be enabled/disabled at packet boundary. The 1093dec9fcdSqs * VMAC will not send out portion of a packet. The currently 1103dec9fcdSqs * processed packet will continue to be sent out when Tx VMAC is 1113dec9fcdSqs * disabled. 1123dec9fcdSqs */ 1133dec9fcdSqs typedef union { 1143dec9fcdSqs uint64_t value; 1153dec9fcdSqs struct { 1163dec9fcdSqs #if defined(_BIG_ENDIAN) 117*fe930412Sqs uint32_t rsrvd:32; 118*fe930412Sqs uint32_t tx_max_frame_length:14; 119*fe930412Sqs uint32_t rsrvd1:15; 120*fe930412Sqs uint32_t tx_pad:1; 121*fe930412Sqs uint32_t crc_insert:1; 122*fe930412Sqs uint32_t tx_en:1; 1233dec9fcdSqs #else 124*fe930412Sqs uint32_t tx_en:1; 125*fe930412Sqs uint32_t crc_insert:1; 126*fe930412Sqs uint32_t tx_pad:1; 127*fe930412Sqs uint32_t rsrvd1:15; 128*fe930412Sqs uint32_t tx_max_frame_length:14; 129*fe930412Sqs uint32_t rsrvd:32; 1303dec9fcdSqs #endif 1313dec9fcdSqs } bits; 1323dec9fcdSqs } vmac_tx_cfg_t; 1333dec9fcdSqs 1343dec9fcdSqs 1353dec9fcdSqs /* 1363dec9fcdSqs * Register: VmacRxCfg 1373dec9fcdSqs * Rx VMAC Configuration 1383dec9fcdSqs * Description: MAC address and length in Type/Length field are 1393dec9fcdSqs * checked in PFC. 1403dec9fcdSqs * Fields: 1413dec9fcdSqs * Maximum length of a frame accepted by Rx/Tx VMAC. Only packets 1423dec9fcdSqs * with length between 64 bytes and maxFrameLength will be 1433dec9fcdSqs * accepted by Rx/Tx VMAC. This length indicates just the packet 1443dec9fcdSqs * length excluding the packet header, crc, and any pad bytes. 1453dec9fcdSqs * Maximum value is 9K (9*1024) 1463dec9fcdSqs * enable packets from the same blade to loopback 1473dec9fcdSqs * Enable acceptance of all Unicast packets for L2 destination 1483dec9fcdSqs * address, ie, allow all Unicast packets to pass the L2 1493dec9fcdSqs * filtering. 1503dec9fcdSqs * Enable acceptance of all multi-cast packets, ie, allow all 1513dec9fcdSqs * multi-cast packets to pass the L2 filtering. 1523dec9fcdSqs * Enable the passing through of flow control frames. 1533dec9fcdSqs * Enable the stripping of FCS field in the packets. 1543dec9fcdSqs * Disable of FCS checking. When enable, packets with incorrect 1553dec9fcdSqs * FCS value are dropped by Rx VMAC. 1563dec9fcdSqs * Enable rx VMAC. Write a '1' to enable rx VMAC; write a '0' to 1573dec9fcdSqs * disable it. The VMAC will begin to accept packet at the 1583dec9fcdSqs * detection of the SOP (start of packet). When disable, the 1593dec9fcdSqs * currently processed packet will continue to be accepted. 1603dec9fcdSqs */ 1613dec9fcdSqs typedef union { 1623dec9fcdSqs uint64_t value; 1633dec9fcdSqs struct { 1643dec9fcdSqs #if defined(_BIG_ENDIAN) 165*fe930412Sqs uint32_t rsrvd:32; 166*fe930412Sqs uint32_t rx_max_frame_length:14; 167*fe930412Sqs uint32_t reserved:11; 168*fe930412Sqs uint32_t loopback:1; 169*fe930412Sqs uint32_t promiscuous_mode:1; 170*fe930412Sqs uint32_t promiscuous_group:1; 171*fe930412Sqs uint32_t pass_flow_ctrl_fr:1; 172*fe930412Sqs uint32_t strip_crc:1; 173*fe930412Sqs uint32_t crc_check_disable:1; 174*fe930412Sqs uint32_t rx_en:1; 1753dec9fcdSqs #else 176*fe930412Sqs uint32_t rx_en:1; 177*fe930412Sqs uint32_t crc_check_disable:1; 178*fe930412Sqs uint32_t strip_crc:1; 179*fe930412Sqs uint32_t pass_flow_ctrl_fr:1; 180*fe930412Sqs uint32_t promiscuous_group:1; 181*fe930412Sqs uint32_t promiscuous_mode:1; 182*fe930412Sqs uint32_t loopback:1; 183*fe930412Sqs uint32_t reserved:11; 184*fe930412Sqs uint32_t rx_max_frame_length:14; 185*fe930412Sqs uint32_t rsrvd:32; 1863dec9fcdSqs #endif 1873dec9fcdSqs } bits; 1883dec9fcdSqs } vmac_rx_cfg_t; 1893dec9fcdSqs 1903dec9fcdSqs 1913dec9fcdSqs /* 1923dec9fcdSqs * Register: VmacTxStat 1933dec9fcdSqs * Tx VMAC Status Register 1943dec9fcdSqs * Description: A new interrupt will be generated only if Tx VMAC is 1953dec9fcdSqs * enabled by vmacTxCfg::txEn=1. Disabling Tx VMAC does not affect 1963dec9fcdSqs * currently-existing Ldf state. Writing this register affects 1973dec9fcdSqs * vmacTxStatMirror register bits also the same way. 1983dec9fcdSqs * Fields: 1993dec9fcdSqs * Indicates that counter of byte transmitted has exceeded the 2003dec9fcdSqs * max value. 2013dec9fcdSqs * Indicates that counter of frame transmitted has exceeded the 2023dec9fcdSqs * max value. 2033dec9fcdSqs * A frame has been successfully transmitted. 2043dec9fcdSqs */ 2053dec9fcdSqs typedef union { 2063dec9fcdSqs uint64_t value; 2073dec9fcdSqs struct { 2083dec9fcdSqs #if defined(_BIG_ENDIAN) 209*fe930412Sqs uint32_t rsrvd:32; 210*fe930412Sqs uint32_t rsrvd_l:29; 211*fe930412Sqs uint32_t tx_byte_cnt_overflow:1; 212*fe930412Sqs uint32_t tx_frame_cnt_overflow:1; 213*fe930412Sqs uint32_t frame_tx:1; 2143dec9fcdSqs #else 215*fe930412Sqs uint32_t frame_tx:1; 216*fe930412Sqs uint32_t tx_frame_cnt_overflow:1; 217*fe930412Sqs uint32_t tx_byte_cnt_overflow:1; 218*fe930412Sqs uint32_t rsrvd_l:29; 219*fe930412Sqs uint32_t rsrvd:32; 2203dec9fcdSqs #endif 2213dec9fcdSqs } bits; 2223dec9fcdSqs } vmac_tx_stat_t; 2233dec9fcdSqs 2243dec9fcdSqs 2253dec9fcdSqs /* 2263dec9fcdSqs * Register: VmacTxMsk 2273dec9fcdSqs * Tx VMAC Status Mask 2283dec9fcdSqs * Description: masking vmacTxStat from interrupt. 2293dec9fcdSqs * Fields: 2303dec9fcdSqs * 1: mask interrupt due to overflow of counter of byte 2313dec9fcdSqs * transmitted 2323dec9fcdSqs * 1: mask interrupt due to overflow of counter of frame 2333dec9fcdSqs * transmitted 2343dec9fcdSqs * 1: mask interrupt due to successful transmition of frame. 2353dec9fcdSqs */ 2363dec9fcdSqs typedef union { 2373dec9fcdSqs uint64_t value; 2383dec9fcdSqs struct { 2393dec9fcdSqs #if defined(_BIG_ENDIAN) 240*fe930412Sqs uint32_t rsrvd:32; 241*fe930412Sqs uint32_t rsrvd_l:29; 242*fe930412Sqs uint32_t tx_byte_cnt_overflow_msk:1; 243*fe930412Sqs uint32_t tx_frame_cnt_overflow_msk:1; 244*fe930412Sqs uint32_t frame_tx_msk:1; 2453dec9fcdSqs #else 246*fe930412Sqs uint32_t frame_tx_msk:1; 247*fe930412Sqs uint32_t tx_frame_cnt_overflow_msk:1; 248*fe930412Sqs uint32_t tx_byte_cnt_overflow_msk:1; 249*fe930412Sqs uint32_t rsrvd_l:29; 250*fe930412Sqs uint32_t rsrvd:32; 2513dec9fcdSqs #endif 2523dec9fcdSqs } bits; 2533dec9fcdSqs } vmac_tx_msk_t; 2543dec9fcdSqs 2553dec9fcdSqs 2563dec9fcdSqs /* 2573dec9fcdSqs * Register: VmacRxStat 2583dec9fcdSqs * Rx VMAC Status Register 2593dec9fcdSqs * Description: Overflow indicators are read-only registers; Read off 2603dec9fcdSqs * the counters to clear. A new interrupt will be generated only if 2613dec9fcdSqs * Rx VMAC is enabled by vmacRxCfg::rxEn=1. Disabling Rx VMAC does 2623dec9fcdSqs * not affect currently-existing Ldf state. Writing this register 2633dec9fcdSqs * affects vmacRxStatMirror register bits also the same way. 2643dec9fcdSqs * Fields: 2653dec9fcdSqs * Indicates that the counter for broadcast packets has exceeded 2663dec9fcdSqs * the max value. 2673dec9fcdSqs * Indicates that the counter for multicast packets has exceeded 2683dec9fcdSqs * the max value. 2693dec9fcdSqs * Indicates that the counter for pause packets has exceeded the 2703dec9fcdSqs * max value. 2713dec9fcdSqs * Indicates that the counter for packets with mismatched FCS has 2723dec9fcdSqs * exceeded the max value. 2733dec9fcdSqs * Indicates that counter of dropped byte has exceeded the max 2743dec9fcdSqs * value. 2753dec9fcdSqs * Indicates that counter of dropped frame has exceeded the max 2763dec9fcdSqs * value. 2773dec9fcdSqs * Indicates that counter of byte received has exceeded the max 2783dec9fcdSqs * value. 2793dec9fcdSqs * Indicates that counter of frame received has exceeded the max 2803dec9fcdSqs * value. 2813dec9fcdSqs * A valid frame has been successfully received. 2823dec9fcdSqs */ 2833dec9fcdSqs typedef union { 2843dec9fcdSqs uint64_t value; 2853dec9fcdSqs struct { 2863dec9fcdSqs #if defined(_BIG_ENDIAN) 287*fe930412Sqs uint32_t rsrvd:32; 288*fe930412Sqs uint32_t rsrvd_l:23; 289*fe930412Sqs uint32_t bcast_cnt_overflow:1; 290*fe930412Sqs uint32_t mcast_cnt_overflow:1; 291*fe930412Sqs uint32_t pause_cnt_overflow:1; 292*fe930412Sqs uint32_t crc_err_cnt_overflow:1; 293*fe930412Sqs uint32_t rx_drop_byte_cnt_overflow:1; 294*fe930412Sqs uint32_t rx_drop_frame_cnt_overflow:1; 295*fe930412Sqs uint32_t rx_byte_cnt_overflow:1; 296*fe930412Sqs uint32_t rx_frame_cnt_overflow:1; 297*fe930412Sqs uint32_t frame_rx:1; 2983dec9fcdSqs #else 299*fe930412Sqs uint32_t frame_rx:1; 300*fe930412Sqs uint32_t rx_frame_cnt_overflow:1; 301*fe930412Sqs uint32_t rx_byte_cnt_overflow:1; 302*fe930412Sqs uint32_t rx_drop_frame_cnt_overflow:1; 303*fe930412Sqs uint32_t rx_drop_byte_cnt_overflow:1; 304*fe930412Sqs uint32_t crc_err_cnt_overflow:1; 305*fe930412Sqs uint32_t pause_cnt_overflow:1; 306*fe930412Sqs uint32_t mcast_cnt_overflow:1; 307*fe930412Sqs uint32_t bcast_cnt_overflow:1; 308*fe930412Sqs uint32_t rsrvd_l:23; 309*fe930412Sqs uint32_t rsrvd:32; 3103dec9fcdSqs #endif 3113dec9fcdSqs } bits; 3123dec9fcdSqs } vmac_rx_stat_t; 3133dec9fcdSqs 3143dec9fcdSqs 3153dec9fcdSqs /* 3163dec9fcdSqs * Register: VmacRxMsk 3173dec9fcdSqs * Rx VMAC Status Mask 3183dec9fcdSqs * Description: 3193dec9fcdSqs * Fields: 3203dec9fcdSqs * 1: mask interrupt due to overflow of the counter for broadcast 3213dec9fcdSqs * packets 3223dec9fcdSqs * 1: mask interrupt due to overflow of the counter for multicast 3233dec9fcdSqs * packets 3243dec9fcdSqs * 1: mask interrupt due to overflow of the counter for pause 3253dec9fcdSqs * packets 3263dec9fcdSqs * 1: mask interrupt due to overflow of the counter for packets 3273dec9fcdSqs * with mismatched FCS the max value. 3283dec9fcdSqs * 1: mask interrupt due to overflow of dropped byte counter 3293dec9fcdSqs * 1: mask interrupt due to overflow of dropped frame counter 3303dec9fcdSqs * 1: mask interrupt due to overflow of received byte counter 3313dec9fcdSqs * 1: mask interrupt due to overflow of received frame counter 3323dec9fcdSqs * 1: mask interrupt due to a valid frame has been successfully 3333dec9fcdSqs * received. 3343dec9fcdSqs */ 3353dec9fcdSqs typedef union { 3363dec9fcdSqs uint64_t value; 3373dec9fcdSqs struct { 3383dec9fcdSqs #if defined(_BIG_ENDIAN) 339*fe930412Sqs uint32_t rsrvd:32; 340*fe930412Sqs uint32_t rsrvd_l:23; 341*fe930412Sqs uint32_t bcast_cnt_overflow_msk:1; 342*fe930412Sqs uint32_t mcast_cnt_overflow_msk:1; 343*fe930412Sqs uint32_t pause_cnt_overflow_msk:1; 344*fe930412Sqs uint32_t crc_err_cnt_overflow_msk:1; 345*fe930412Sqs uint32_t rx_drop_byte_cnt_overflow_msk:1; 346*fe930412Sqs uint32_t rx_drop_frame_cnt_overflow_msk:1; 347*fe930412Sqs uint32_t rx_byte_cnt_overflow_msk:1; 348*fe930412Sqs uint32_t rx_frame_cnt_overflow_msk:1; 349*fe930412Sqs uint32_t frame_rx_msk:1; 3503dec9fcdSqs #else 351*fe930412Sqs uint32_t frame_rx_msk:1; 352*fe930412Sqs uint32_t rx_frame_cnt_overflow_msk:1; 353*fe930412Sqs uint32_t rx_byte_cnt_overflow_msk:1; 354*fe930412Sqs uint32_t rx_drop_frame_cnt_overflow_msk:1; 355*fe930412Sqs uint32_t rx_drop_byte_cnt_overflow_msk:1; 356*fe930412Sqs uint32_t crc_err_cnt_overflow_msk:1; 357*fe930412Sqs uint32_t pause_cnt_overflow_msk:1; 358*fe930412Sqs uint32_t mcast_cnt_overflow_msk:1; 359*fe930412Sqs uint32_t bcast_cnt_overflow_msk:1; 360*fe930412Sqs uint32_t rsrvd_l:23; 361*fe930412Sqs uint32_t rsrvd:32; 3623dec9fcdSqs #endif 3633dec9fcdSqs } bits; 3643dec9fcdSqs } vmac_rx_msk_t; 3653dec9fcdSqs 3663dec9fcdSqs 3673dec9fcdSqs /* 3683dec9fcdSqs * Register: VmacTxStatMirror 3693dec9fcdSqs * Tx VMAC Status Mirror Register 3703dec9fcdSqs * Description: Write a 1 to this register to force the corresponding 3713dec9fcdSqs * interrupt. Reading this register returns the current Tx interrupt 3723dec9fcdSqs * status which would be the same as reading the vmacTxStat register. 3733dec9fcdSqs * The bits are cleared by writing 1 to the corresponding register 3743dec9fcdSqs * bit in the vmacTxStat register. ie, bit 0 of this register is 3753dec9fcdSqs * cleared by writing 1 to bit 0 in the vmacTxStat register. 3763dec9fcdSqs * 3773dec9fcdSqs * Fields: 3783dec9fcdSqs * 1 : Force tx byte counter overflow interrupt generation 3793dec9fcdSqs * 1 : Force tx frame counter overflow interrupt generation 3803dec9fcdSqs * 1 : Force frame transmitted interrupt generation 3813dec9fcdSqs */ 3823dec9fcdSqs typedef union { 3833dec9fcdSqs uint64_t value; 3843dec9fcdSqs struct { 3853dec9fcdSqs #if defined(_BIG_ENDIAN) 386*fe930412Sqs uint32_t rsrvd:32; 387*fe930412Sqs uint32_t rsrvd_l:29; 388*fe930412Sqs uint32_t force_tx_byte_cnt_overflow:1; 389*fe930412Sqs uint32_t force_tx_frame_cnt_overflow:1; 390*fe930412Sqs uint32_t force_frame_tx:1; 3913dec9fcdSqs #else 392*fe930412Sqs uint32_t force_frame_tx:1; 393*fe930412Sqs uint32_t force_tx_frame_cnt_overflow:1; 394*fe930412Sqs uint32_t force_tx_byte_cnt_overflow:1; 395*fe930412Sqs uint32_t rsrvd_l:29; 396*fe930412Sqs uint32_t rsrvd:32; 3973dec9fcdSqs #endif 3983dec9fcdSqs } bits; 3993dec9fcdSqs } vmac_tx_stat_mirror_t; 4003dec9fcdSqs 4013dec9fcdSqs 4023dec9fcdSqs /* 4033dec9fcdSqs * Register: VmacRxStatMirror 4043dec9fcdSqs * Rx VMAC Status Mirror Register 4053dec9fcdSqs * Description: Write a 1 to this register to force the corresponding 4063dec9fcdSqs * interrupt. Reading this register returns the current Rx interrupt 4073dec9fcdSqs * status which would be the same as reading the vmacRxStat register. 4083dec9fcdSqs * The bits are cleared by writing 1 to the corresponding register 4093dec9fcdSqs * bit in the vmacRxStat register. ie, bit 0 of this register is 4103dec9fcdSqs * cleared by writing 1 to bit 0 in the vmacRxStat register. 4113dec9fcdSqs * Fields: 4123dec9fcdSqs * 1 : Force broadcast frame counter overflow interrupt 4133dec9fcdSqs * generation 4143dec9fcdSqs * 1 : Force multicast frame counter overflow interrupt 4153dec9fcdSqs * generation 4163dec9fcdSqs * 1 : Force pause frame counter overflow interrupt generation 4173dec9fcdSqs * 1 : Force crc error counter overflow interrupt generation 4183dec9fcdSqs * 1 : Force dropped frames byte counter overflow interrupt 4193dec9fcdSqs * generation 4203dec9fcdSqs * 1 : Force dropped frame counter overflow interrupt generation 4213dec9fcdSqs * 1 : Force rx byte counter overflow interrupt generation 4223dec9fcdSqs * 1 : Force rx frame counter overflow interrupt generation 4233dec9fcdSqs * 1 : Force frame received interrupt generation 4243dec9fcdSqs */ 4253dec9fcdSqs typedef union { 4263dec9fcdSqs uint64_t value; 4273dec9fcdSqs struct { 4283dec9fcdSqs #if defined(_BIG_ENDIAN) 429*fe930412Sqs uint32_t rsrvd:32; 430*fe930412Sqs uint32_t rsrvd_l:23; 431*fe930412Sqs uint32_t force_bcast_cnt_overflow:1; 432*fe930412Sqs uint32_t force_mcast_cnt_overflow:1; 433*fe930412Sqs uint32_t force_pause_cnt_overflow:1; 434*fe930412Sqs uint32_t force_crc_err_cnt_overflow:1; 435*fe930412Sqs uint32_t force_rx_drop_byte_cnt_overflow:1; 436*fe930412Sqs uint32_t force_rx_drop_frame_cnt_overflow:1; 437*fe930412Sqs uint32_t force_rx_byte_cnt_overflow:1; 438*fe930412Sqs uint32_t force_rx_frame_cnt_overflow:1; 439*fe930412Sqs uint32_t force_frame_rx:1; 4403dec9fcdSqs #else 441*fe930412Sqs uint32_t force_frame_rx:1; 442*fe930412Sqs uint32_t force_rx_frame_cnt_overflow:1; 443*fe930412Sqs uint32_t force_rx_byte_cnt_overflow:1; 444*fe930412Sqs uint32_t force_rx_drop_frame_cnt_overflow:1; 445*fe930412Sqs uint32_t force_rx_drop_byte_cnt_overflow:1; 446*fe930412Sqs uint32_t force_crc_err_cnt_overflow:1; 447*fe930412Sqs uint32_t force_pause_cnt_overflow:1; 448*fe930412Sqs uint32_t force_mcast_cnt_overflow:1; 449*fe930412Sqs uint32_t force_bcast_cnt_overflow:1; 450*fe930412Sqs uint32_t rsrvd_l:23; 451*fe930412Sqs uint32_t rsrvd:32; 4523dec9fcdSqs #endif 4533dec9fcdSqs } bits; 4543dec9fcdSqs } vmac_rx_stat_mirror_t; 4553dec9fcdSqs 4563dec9fcdSqs 4573dec9fcdSqs /* 4583dec9fcdSqs * Register: VmacTxFrameCnt 4593dec9fcdSqs * VMAC transmitted frame counter 4603dec9fcdSqs * Description: 4613dec9fcdSqs * Fields: 4623dec9fcdSqs * Indicates the number of frames transmitted by Tx VMAC. The 4633dec9fcdSqs * counter will saturate at max value. The counter is stalled 4643dec9fcdSqs * when Tx VMAC is disabled by vmacTxCfg::txEn=0 4653dec9fcdSqs */ 4663dec9fcdSqs typedef union { 4673dec9fcdSqs uint64_t value; 4683dec9fcdSqs struct { 4693dec9fcdSqs #if defined(_BIG_ENDIAN) 470*fe930412Sqs uint32_t rsrvd:32; 471*fe930412Sqs uint32_t tx_frame_cnt:32; 4723dec9fcdSqs #else 473*fe930412Sqs uint32_t tx_frame_cnt:32; 474*fe930412Sqs uint32_t rsrvd:32; 4753dec9fcdSqs #endif 4763dec9fcdSqs } bits; 4773dec9fcdSqs } vmac_tx_frame_cnt_t; 4783dec9fcdSqs 4793dec9fcdSqs 4803dec9fcdSqs /* 4813dec9fcdSqs * Register: VmacTxByteCnt 4823dec9fcdSqs * VMAC transmitted byte counter 4833dec9fcdSqs * Description: 4843dec9fcdSqs * Fields: 4853dec9fcdSqs * Indicates the number of byte (octet) of data transmitted by Tx 4863dec9fcdSqs * VMAC. This counter counts all the bytes of the incoming data 4873dec9fcdSqs * including packet header, packet data, crc, and pad bytes. The 4883dec9fcdSqs * counter will saturate at max value. The counter is stalled 4893dec9fcdSqs * when Tx VMAC is disabled by vmacTxCfg::txEn=0 4903dec9fcdSqs */ 4913dec9fcdSqs typedef union { 4923dec9fcdSqs uint64_t value; 4933dec9fcdSqs struct { 4943dec9fcdSqs #if defined(_BIG_ENDIAN) 495*fe930412Sqs uint32_t rsrvd:32; 496*fe930412Sqs uint32_t tx_byte_cnt:32; 4973dec9fcdSqs #else 498*fe930412Sqs uint32_t tx_byte_cnt:32; 499*fe930412Sqs uint32_t rsrvd:32; 5003dec9fcdSqs #endif 5013dec9fcdSqs } bits; 5023dec9fcdSqs } vmac_tx_byte_cnt_t; 5033dec9fcdSqs 5043dec9fcdSqs 5053dec9fcdSqs /* 5063dec9fcdSqs * Register: VmacRxFrameCnt 5073dec9fcdSqs * VMAC received frame counter 5083dec9fcdSqs * Description: 5093dec9fcdSqs * Fields: 5103dec9fcdSqs * Indicates the number of frame received by Rx VMAC. The counter 5113dec9fcdSqs * will saturate at max value. The counter is stalled when Rx 5123dec9fcdSqs * VMAC is disabled by vmacRxCfg::rxEn=0. 5133dec9fcdSqs */ 5143dec9fcdSqs typedef union { 5153dec9fcdSqs uint64_t value; 5163dec9fcdSqs struct { 5173dec9fcdSqs #if defined(_BIG_ENDIAN) 518*fe930412Sqs uint32_t rsrvd:32; 519*fe930412Sqs uint32_t rx_frame_cnt:32; 5203dec9fcdSqs #else 521*fe930412Sqs uint32_t rx_frame_cnt:32; 522*fe930412Sqs uint32_t rsrvd:32; 5233dec9fcdSqs #endif 5243dec9fcdSqs } bits; 5253dec9fcdSqs } vmac_rx_frame_cnt_t; 5263dec9fcdSqs 5273dec9fcdSqs 5283dec9fcdSqs /* 5293dec9fcdSqs * Register: VmacRxByteCnt 5303dec9fcdSqs * VMAC received byte counter 5313dec9fcdSqs * Description: 5323dec9fcdSqs * Fields: 5333dec9fcdSqs * Indicates the number of bytes (octet) of data received by Rx 5343dec9fcdSqs * VMAC including any error frames. The counter will saturate at 5353dec9fcdSqs * max value. The counter is stalled when Rx VMAC is disabled by 5363dec9fcdSqs * vmacRxCfg::rxEn=0. 5373dec9fcdSqs */ 5383dec9fcdSqs typedef union { 5393dec9fcdSqs uint64_t value; 5403dec9fcdSqs struct { 5413dec9fcdSqs #if defined(_BIG_ENDIAN) 542*fe930412Sqs uint32_t rsrvd:32; 543*fe930412Sqs uint32_t rx_byte_cnt:32; 5443dec9fcdSqs #else 545*fe930412Sqs uint32_t rx_byte_cnt:32; 546*fe930412Sqs uint32_t rsrvd:32; 5473dec9fcdSqs #endif 5483dec9fcdSqs } bits; 5493dec9fcdSqs } vmac_rx_byte_cnt_t; 5503dec9fcdSqs 5513dec9fcdSqs 5523dec9fcdSqs /* 5533dec9fcdSqs * Register: VmacRxDropFrCnt 5543dec9fcdSqs * VMAC dropped frame counter 5553dec9fcdSqs * Description: 5563dec9fcdSqs * Fields: 5573dec9fcdSqs * Indicates the number of frame dropped by Rx VMAC. The counter 5583dec9fcdSqs * will This counter increments for every frame dropped for the 5593dec9fcdSqs * following: - crc mismatch & crc check is enabled - failed the 5603dec9fcdSqs * L2 address match & Vmac is not in promiscuous mode - pause 5613dec9fcdSqs * packet & Vmac is not programmed to pass these frames The 5623dec9fcdSqs * counter will saturate at max value. The counter is stalled 5633dec9fcdSqs * when Rx VMAC is disabled by vmacRxCfg::rxEn=0. 5643dec9fcdSqs */ 5653dec9fcdSqs typedef union { 5663dec9fcdSqs uint64_t value; 5673dec9fcdSqs struct { 5683dec9fcdSqs #if defined(_BIG_ENDIAN) 569*fe930412Sqs uint32_t rsrvd:32; 570*fe930412Sqs uint32_t rx_drop_frame_cnt:32; 5713dec9fcdSqs #else 572*fe930412Sqs uint32_t rx_drop_frame_cnt:32; 573*fe930412Sqs uint32_t rsrvd:32; 5743dec9fcdSqs #endif 5753dec9fcdSqs } bits; 5763dec9fcdSqs } vmac_rx_drop_fr_cnt_t; 5773dec9fcdSqs 5783dec9fcdSqs 5793dec9fcdSqs /* 5803dec9fcdSqs * Register: VmacRxDropByteCnt 5813dec9fcdSqs * VMAC dropped byte counter 5823dec9fcdSqs * Description: 5833dec9fcdSqs * Fields: 5843dec9fcdSqs * Indicates the number of byte of data dropped by Rx VMAC. 5853dec9fcdSqs * Frames are dropped for one of the follg conditions : - crc 5863dec9fcdSqs * mismatch & crc check is enabled - failed the L2 address match 5873dec9fcdSqs * & Vmac is not in promiscuous mode - pause packet & Vmac is not 5883dec9fcdSqs * programmed to pass these frames The counter will saturate at 5893dec9fcdSqs * max value. The counter is stalled when Rx VMAC is disabled by 5903dec9fcdSqs * vmacRxCfg::rxEn=0. 5913dec9fcdSqs */ 5923dec9fcdSqs typedef union { 5933dec9fcdSqs uint64_t value; 5943dec9fcdSqs struct { 5953dec9fcdSqs #if defined(_BIG_ENDIAN) 596*fe930412Sqs uint32_t rsrvd:32; 597*fe930412Sqs uint32_t rx_drop_byte_cnt:32; 5983dec9fcdSqs #else 599*fe930412Sqs uint32_t rx_drop_byte_cnt:32; 600*fe930412Sqs uint32_t rsrvd:32; 6013dec9fcdSqs #endif 6023dec9fcdSqs } bits; 6033dec9fcdSqs } vmac_rx_drop_byte_cnt_t; 6043dec9fcdSqs 6053dec9fcdSqs 6063dec9fcdSqs /* 6073dec9fcdSqs * Register: VmacRxCrcCnt 6083dec9fcdSqs * VMAC received CRC error frame counter 6093dec9fcdSqs * Description: 6103dec9fcdSqs * Fields: 6113dec9fcdSqs * Indicates the number of frames with invalid CRC. When NMAC 6123dec9fcdSqs * truncates a packet, it asserts crcError indication to VMAC 6133dec9fcdSqs * which then counts it towards CRC error. Thus the VMAC crc 6143dec9fcdSqs * error counter reflects the CRC mismatches on all the packets 6153dec9fcdSqs * going out of RxMAC while the NMAC crc error counter reflects 6163dec9fcdSqs * the CRC mismatches on all the packets coming into RxMAC. The 6173dec9fcdSqs * counter will saturate at max value The counter is stalled when 6183dec9fcdSqs * Rx VMAC is disabled by vmacRxCfg::rxEn=0. 6193dec9fcdSqs */ 6203dec9fcdSqs typedef union { 6213dec9fcdSqs uint64_t value; 6223dec9fcdSqs struct { 6233dec9fcdSqs #if defined(_BIG_ENDIAN) 624*fe930412Sqs uint32_t rsrvd:32; 625*fe930412Sqs uint32_t rx_crc_cnt:32; 6263dec9fcdSqs #else 627*fe930412Sqs uint32_t rx_crc_cnt:32; 628*fe930412Sqs uint32_t rsrvd:32; 6293dec9fcdSqs #endif 6303dec9fcdSqs } bits; 6313dec9fcdSqs } vmac_rx_crc_cnt_t; 6323dec9fcdSqs 6333dec9fcdSqs 6343dec9fcdSqs /* 6353dec9fcdSqs * Register: VmacRxPauseCnt 6363dec9fcdSqs * VMAC received pause frame counter 6373dec9fcdSqs * Description: 6383dec9fcdSqs * Fields: 6393dec9fcdSqs * Count the number of pause frames received by Rx VMAC. The 6403dec9fcdSqs * counter is stalled when Rx VMAC is disabled by 6413dec9fcdSqs * vmacRxCfg::rxEn=0. 6423dec9fcdSqs */ 6433dec9fcdSqs typedef union { 6443dec9fcdSqs uint64_t value; 6453dec9fcdSqs struct { 6463dec9fcdSqs #if defined(_BIG_ENDIAN) 647*fe930412Sqs uint32_t rsrvd:32; 648*fe930412Sqs uint32_t rx_pause_cnt:32; 6493dec9fcdSqs #else 650*fe930412Sqs uint32_t rx_pause_cnt:32; 651*fe930412Sqs uint32_t rsrvd:32; 6523dec9fcdSqs #endif 6533dec9fcdSqs } bits; 6543dec9fcdSqs } vmac_rx_pause_cnt_t; 6553dec9fcdSqs 6563dec9fcdSqs 6573dec9fcdSqs /* 6583dec9fcdSqs * Register: VmacRxBcastFrCnt 6593dec9fcdSqs * VMAC received broadcast frame counter 6603dec9fcdSqs * Description: 6613dec9fcdSqs * Fields: 6623dec9fcdSqs * Indicates the number of broadcast frames received The counter 6633dec9fcdSqs * is stalled when Rx VMAC is disabled by vmacRxCfg::rxEn=0. 6643dec9fcdSqs */ 6653dec9fcdSqs typedef union { 6663dec9fcdSqs uint64_t value; 6673dec9fcdSqs struct { 6683dec9fcdSqs #if defined(_BIG_ENDIAN) 669*fe930412Sqs uint32_t rsrvd:32; 670*fe930412Sqs uint32_t rx_bcast_fr_cnt:32; 6713dec9fcdSqs #else 672*fe930412Sqs uint32_t rx_bcast_fr_cnt:32; 673*fe930412Sqs uint32_t rsrvd:32; 6743dec9fcdSqs #endif 6753dec9fcdSqs } bits; 6763dec9fcdSqs } vmac_rx_bcast_fr_cnt_t; 6773dec9fcdSqs 6783dec9fcdSqs 6793dec9fcdSqs /* 6803dec9fcdSqs * Register: VmacRxMcastFrCnt 6813dec9fcdSqs * VMAC received multicast frame counter 6823dec9fcdSqs * Description: 6833dec9fcdSqs * Fields: 6843dec9fcdSqs * Indicates the number of multicast frames received The counter 6853dec9fcdSqs * is stalled when Rx VMAC is disabled by vmacRxCfg::rxEn=0. 6863dec9fcdSqs */ 6873dec9fcdSqs typedef union { 6883dec9fcdSqs uint64_t value; 6893dec9fcdSqs struct { 6903dec9fcdSqs #if defined(_BIG_ENDIAN) 691*fe930412Sqs uint32_t rsrvd:32; 692*fe930412Sqs uint32_t rx_mcast_fr_cnt:32; 6933dec9fcdSqs #else 694*fe930412Sqs uint32_t rx_mcast_fr_cnt:32; 695*fe930412Sqs uint32_t rsrvd:32; 6963dec9fcdSqs #endif 6973dec9fcdSqs } bits; 6983dec9fcdSqs } vmac_rx_mcast_fr_cnt_t; 6993dec9fcdSqs 7003dec9fcdSqs 7013dec9fcdSqs #ifdef __cplusplus 7023dec9fcdSqs } 7033dec9fcdSqs #endif 7043dec9fcdSqs 7053dec9fcdSqs #endif /* _HXGE_VMAC_HW_H */ 706