1191783Srmacklem/***********************license start*************** 2191783Srmacklem * Copyright (c) 2003-2012 Cavium Inc. (support@cavium.com). All rights 3191783Srmacklem * reserved. 4191783Srmacklem * 5191783Srmacklem * 6191783Srmacklem * Redistribution and use in source and binary forms, with or without 7191783Srmacklem * modification, are permitted provided that the following conditions are 8191783Srmacklem * met: 9191783Srmacklem * 10191783Srmacklem * * Redistributions of source code must retain the above copyright 11191783Srmacklem * notice, this list of conditions and the following disclaimer. 12191783Srmacklem * 13191783Srmacklem * * Redistributions in binary form must reproduce the above 14191783Srmacklem * copyright notice, this list of conditions and the following 15191783Srmacklem * disclaimer in the documentation and/or other materials provided 16191783Srmacklem * with the distribution. 17191783Srmacklem 18191783Srmacklem * * Neither the name of Cavium Inc. nor the names of 19191783Srmacklem * its contributors may be used to endorse or promote products 20191783Srmacklem * derived from this software without specific prior written 21191783Srmacklem * permission. 22191783Srmacklem 23191783Srmacklem * This Software, including technical data, may be subject to U.S. export control 24191783Srmacklem * laws, including the U.S. Export Administration Act and its associated 25191783Srmacklem * regulations, and may be subject to export or import regulations in other 26191783Srmacklem * countries. 27191783Srmacklem 28191783Srmacklem * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" 29191783Srmacklem * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR 30191783Srmacklem * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO 31191783Srmacklem * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR 32191783Srmacklem * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM 33191783Srmacklem * SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF TITLE, 34191783Srmacklem * MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF 35191783Srmacklem * VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR 36191783Srmacklem * CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT OF USE OR 37191783Srmacklem * PERFORMANCE OF THE SOFTWARE LIES WITH YOU. 38191783Srmacklem ***********************license end**************************************/ 39191783Srmacklem 40191783Srmacklem 41191783Srmacklem/** 42191783Srmacklem * cvmx-ipd-defs.h 43191783Srmacklem * 44191783Srmacklem * Configuration and status register (CSR) type definitions for 45191783Srmacklem * Octeon ipd. 46191783Srmacklem * 47191783Srmacklem * This file is auto generated. Do not edit. 48193066Sjamie * 49191783Srmacklem * <hr>$Revision$<hr> 50191783Srmacklem * 51191783Srmacklem */ 52191783Srmacklem#ifndef __CVMX_IPD_DEFS_H__ 53191783Srmacklem#define __CVMX_IPD_DEFS_H__ 54191783Srmacklem 55191783Srmacklem#define CVMX_IPD_1ST_MBUFF_SKIP (CVMX_ADD_IO_SEG(0x00014F0000000000ull)) 56191783Srmacklem#define CVMX_IPD_1st_NEXT_PTR_BACK (CVMX_ADD_IO_SEG(0x00014F0000000150ull)) 57191783Srmacklem#define CVMX_IPD_2nd_NEXT_PTR_BACK (CVMX_ADD_IO_SEG(0x00014F0000000158ull)) 58191783Srmacklem#define CVMX_IPD_BIST_STATUS (CVMX_ADD_IO_SEG(0x00014F00000007F8ull)) 59191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 60191783Srmacklemstatic inline uint64_t CVMX_IPD_BPIDX_MBUF_TH(unsigned long offset) 61191783Srmacklem{ 62191783Srmacklem if (!( 63191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset <= 63))))) 64191783Srmacklem cvmx_warn("CVMX_IPD_BPIDX_MBUF_TH(%lu) is invalid on this chip\n", offset); 65191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000002000ull) + ((offset) & 63) * 8; 66191783Srmacklem} 67191783Srmacklem#else 68191783Srmacklem#define CVMX_IPD_BPIDX_MBUF_TH(offset) (CVMX_ADD_IO_SEG(0x00014F0000002000ull) + ((offset) & 63) * 8) 69191783Srmacklem#endif 70191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 71191783Srmacklemstatic inline uint64_t CVMX_IPD_BPID_BP_COUNTERX(unsigned long offset) 72191783Srmacklem{ 73191783Srmacklem if (!( 74191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset <= 63))))) 75191783Srmacklem cvmx_warn("CVMX_IPD_BPID_BP_COUNTERX(%lu) is invalid on this chip\n", offset); 76191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000003000ull) + ((offset) & 63) * 8; 77191783Srmacklem} 78191783Srmacklem#else 79191783Srmacklem#define CVMX_IPD_BPID_BP_COUNTERX(offset) (CVMX_ADD_IO_SEG(0x00014F0000003000ull) + ((offset) & 63) * 8) 80191783Srmacklem#endif 81191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 82191783Srmacklem#define CVMX_IPD_BP_PRT_RED_END CVMX_IPD_BP_PRT_RED_END_FUNC() 83191783Srmacklemstatic inline uint64_t CVMX_IPD_BP_PRT_RED_END_FUNC(void) 84191783Srmacklem{ 85191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX))) 86191783Srmacklem cvmx_warn("CVMX_IPD_BP_PRT_RED_END not supported on this chip\n"); 87191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000328ull); 88191783Srmacklem} 89191783Srmacklem#else 90191783Srmacklem#define CVMX_IPD_BP_PRT_RED_END (CVMX_ADD_IO_SEG(0x00014F0000000328ull)) 91191783Srmacklem#endif 92191783Srmacklem#define CVMX_IPD_CLK_COUNT (CVMX_ADD_IO_SEG(0x00014F0000000338ull)) 93191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 94191783Srmacklem#define CVMX_IPD_CREDITS CVMX_IPD_CREDITS_FUNC() 95191783Srmacklemstatic inline uint64_t CVMX_IPD_CREDITS_FUNC(void) 96191783Srmacklem{ 97192585Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN68XX))) 98191783Srmacklem cvmx_warn("CVMX_IPD_CREDITS not supported on this chip\n"); 99191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000004410ull); 100191783Srmacklem} 101191783Srmacklem#else 102203303Srmacklem#define CVMX_IPD_CREDITS (CVMX_ADD_IO_SEG(0x00014F0000004410ull)) 103191783Srmacklem#endif 104191783Srmacklem#define CVMX_IPD_CTL_STATUS (CVMX_ADD_IO_SEG(0x00014F0000000018ull)) 105191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 106191783Srmacklem#define CVMX_IPD_ECC_CTL CVMX_IPD_ECC_CTL_FUNC() 107191783Srmacklemstatic inline uint64_t CVMX_IPD_ECC_CTL_FUNC(void) 108191783Srmacklem{ 109191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN68XX))) 110191783Srmacklem cvmx_warn("CVMX_IPD_ECC_CTL not supported on this chip\n"); 111191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000004408ull); 112191783Srmacklem} 113191783Srmacklem#else 114191783Srmacklem#define CVMX_IPD_ECC_CTL (CVMX_ADD_IO_SEG(0x00014F0000004408ull)) 115191783Srmacklem#endif 116191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 117191783Srmacklem#define CVMX_IPD_FREE_PTR_FIFO_CTL CVMX_IPD_FREE_PTR_FIFO_CTL_FUNC() 118191783Srmacklemstatic inline uint64_t CVMX_IPD_FREE_PTR_FIFO_CTL_FUNC(void) 119191783Srmacklem{ 120191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN68XX))) 121191783Srmacklem cvmx_warn("CVMX_IPD_FREE_PTR_FIFO_CTL not supported on this chip\n"); 122191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000780ull); 123191783Srmacklem} 124191783Srmacklem#else 125191783Srmacklem#define CVMX_IPD_FREE_PTR_FIFO_CTL (CVMX_ADD_IO_SEG(0x00014F0000000780ull)) 126191783Srmacklem#endif 127191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 128191783Srmacklem#define CVMX_IPD_FREE_PTR_VALUE CVMX_IPD_FREE_PTR_VALUE_FUNC() 129191783Srmacklemstatic inline uint64_t CVMX_IPD_FREE_PTR_VALUE_FUNC(void) 130191783Srmacklem{ 131191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN68XX))) 132191783Srmacklem cvmx_warn("CVMX_IPD_FREE_PTR_VALUE not supported on this chip\n"); 133191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000788ull); 134191783Srmacklem} 135191783Srmacklem#else 136191783Srmacklem#define CVMX_IPD_FREE_PTR_VALUE (CVMX_ADD_IO_SEG(0x00014F0000000788ull)) 137191783Srmacklem#endif 138191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 139191783Srmacklem#define CVMX_IPD_HOLD_PTR_FIFO_CTL CVMX_IPD_HOLD_PTR_FIFO_CTL_FUNC() 140192145Srmacklemstatic inline uint64_t CVMX_IPD_HOLD_PTR_FIFO_CTL_FUNC(void) 141192145Srmacklem{ 142191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN68XX))) 143191783Srmacklem cvmx_warn("CVMX_IPD_HOLD_PTR_FIFO_CTL not supported on this chip\n"); 144192145Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000790ull); 145191783Srmacklem} 146191783Srmacklem#else 147192145Srmacklem#define CVMX_IPD_HOLD_PTR_FIFO_CTL (CVMX_ADD_IO_SEG(0x00014F0000000790ull)) 148192145Srmacklem#endif 149191783Srmacklem#define CVMX_IPD_INT_ENB (CVMX_ADD_IO_SEG(0x00014F0000000160ull)) 150191783Srmacklem#define CVMX_IPD_INT_SUM (CVMX_ADD_IO_SEG(0x00014F0000000168ull)) 151191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 152191783Srmacklem#define CVMX_IPD_NEXT_PKT_PTR CVMX_IPD_NEXT_PKT_PTR_FUNC() 153191783Srmacklemstatic inline uint64_t CVMX_IPD_NEXT_PKT_PTR_FUNC(void) 154191783Srmacklem{ 155191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN68XX))) 156191783Srmacklem cvmx_warn("CVMX_IPD_NEXT_PKT_PTR not supported on this chip\n"); 157191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F00000007A0ull); 158191783Srmacklem} 159191783Srmacklem#else 160191783Srmacklem#define CVMX_IPD_NEXT_PKT_PTR (CVMX_ADD_IO_SEG(0x00014F00000007A0ull)) 161191783Srmacklem#endif 162191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 163191783Srmacklem#define CVMX_IPD_NEXT_WQE_PTR CVMX_IPD_NEXT_WQE_PTR_FUNC() 164191783Srmacklemstatic inline uint64_t CVMX_IPD_NEXT_WQE_PTR_FUNC(void) 165191783Srmacklem{ 166191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN68XX))) 167191783Srmacklem cvmx_warn("CVMX_IPD_NEXT_WQE_PTR not supported on this chip\n"); 168191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F00000007A8ull); 169191783Srmacklem} 170191783Srmacklem#else 171191783Srmacklem#define CVMX_IPD_NEXT_WQE_PTR (CVMX_ADD_IO_SEG(0x00014F00000007A8ull)) 172191783Srmacklem#endif 173191783Srmacklem#define CVMX_IPD_NOT_1ST_MBUFF_SKIP (CVMX_ADD_IO_SEG(0x00014F0000000008ull)) 174191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 175191783Srmacklemstatic inline uint64_t CVMX_IPD_ON_BP_DROP_PKTX(unsigned long block_id) 176191783Srmacklem{ 177191783Srmacklem if (!( 178191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((block_id == 0))))) 179191783Srmacklem cvmx_warn("CVMX_IPD_ON_BP_DROP_PKTX(%lu) is invalid on this chip\n", block_id); 180191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000004100ull); 181191783Srmacklem} 182191783Srmacklem#else 183191783Srmacklem#define CVMX_IPD_ON_BP_DROP_PKTX(block_id) (CVMX_ADD_IO_SEG(0x00014F0000004100ull)) 184191783Srmacklem#endif 185191783Srmacklem#define CVMX_IPD_PACKET_MBUFF_SIZE (CVMX_ADD_IO_SEG(0x00014F0000000010ull)) 186191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 187191783Srmacklem#define CVMX_IPD_PKT_ERR CVMX_IPD_PKT_ERR_FUNC() 188191783Srmacklemstatic inline uint64_t CVMX_IPD_PKT_ERR_FUNC(void) 189191783Srmacklem{ 190191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN68XX))) 191191783Srmacklem cvmx_warn("CVMX_IPD_PKT_ERR not supported on this chip\n"); 192191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F00000003F0ull); 193191783Srmacklem} 194191783Srmacklem#else 195191783Srmacklem#define CVMX_IPD_PKT_ERR (CVMX_ADD_IO_SEG(0x00014F00000003F0ull)) 196191783Srmacklem#endif 197191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 198191783Srmacklem#define CVMX_IPD_PKT_PTR_VALID CVMX_IPD_PKT_PTR_VALID_FUNC() 199191783Srmacklemstatic inline uint64_t CVMX_IPD_PKT_PTR_VALID_FUNC(void) 200191783Srmacklem{ 201191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX))) 202191783Srmacklem cvmx_warn("CVMX_IPD_PKT_PTR_VALID not supported on this chip\n"); 203191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000358ull); 204191783Srmacklem} 205191783Srmacklem#else 206191783Srmacklem#define CVMX_IPD_PKT_PTR_VALID (CVMX_ADD_IO_SEG(0x00014F0000000358ull)) 207191783Srmacklem#endif 208191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 209191783Srmacklemstatic inline uint64_t CVMX_IPD_PORTX_BP_PAGE_CNT(unsigned long offset) 210191783Srmacklem{ 211191783Srmacklem if (!( 212191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN30XX) && ((offset <= 2) || (offset == 32))) || 213191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN31XX) && ((offset <= 2) || ((offset >= 32) && (offset <= 33)))) || 214191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN38XX) && ((offset <= 35))) || 215191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN50XX) && ((offset <= 2) || ((offset >= 32) && (offset <= 33)))) || 216191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 3) || ((offset >= 32) && (offset <= 35)))) || 217191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset <= 3) || ((offset >= 16) && (offset <= 19)) || ((offset >= 32) && (offset <= 35)))) || 218191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN58XX) && ((offset <= 35))) || 219191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 3) || ((offset >= 16) && (offset <= 19)) || ((offset >= 32) && (offset <= 35)))) || 220191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 3) || ((offset >= 32) && (offset <= 35)))) || 221191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 3) || ((offset >= 16) && (offset <= 19)) || ((offset >= 32) && (offset <= 35)))) || 222191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CNF71XX) && ((offset <= 3) || ((offset >= 16) && (offset <= 19)) || ((offset >= 32) && (offset <= 35)))))) 223191783Srmacklem cvmx_warn("CVMX_IPD_PORTX_BP_PAGE_CNT(%lu) is invalid on this chip\n", offset); 224191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000028ull) + ((offset) & 63) * 8; 225191783Srmacklem} 226192145Srmacklem#else 227191783Srmacklem#define CVMX_IPD_PORTX_BP_PAGE_CNT(offset) (CVMX_ADD_IO_SEG(0x00014F0000000028ull) + ((offset) & 63) * 8) 228192145Srmacklem#endif 229192145Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 230192145Srmacklemstatic inline uint64_t CVMX_IPD_PORTX_BP_PAGE_CNT2(unsigned long offset) 231191783Srmacklem{ 232191783Srmacklem if (!( 233192145Srmacklem (OCTEON_IS_MODEL(OCTEON_CN52XX) && (((offset >= 36) && (offset <= 39)))) || 234192145Srmacklem (OCTEON_IS_MODEL(OCTEON_CN56XX) && (((offset >= 36) && (offset <= 39)))) || 235191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN61XX) && (((offset >= 36) && (offset <= 39)))) || 236191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN63XX) && (((offset >= 36) && (offset <= 39)))) || 237192145Srmacklem (OCTEON_IS_MODEL(OCTEON_CN66XX) && (((offset >= 36) && (offset <= 39)))) || 238192145Srmacklem (OCTEON_IS_MODEL(OCTEON_CNF71XX) && (((offset >= 36) && (offset <= 39)))))) 239191783Srmacklem cvmx_warn("CVMX_IPD_PORTX_BP_PAGE_CNT2(%lu) is invalid on this chip\n", offset); 240191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000368ull) + ((offset) & 63) * 8 - 8*36; 241192145Srmacklem} 242192145Srmacklem#else 243192145Srmacklem#define CVMX_IPD_PORTX_BP_PAGE_CNT2(offset) (CVMX_ADD_IO_SEG(0x00014F0000000368ull) + ((offset) & 63) * 8 - 8*36) 244191783Srmacklem#endif 245191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 246192145Srmacklemstatic inline uint64_t CVMX_IPD_PORTX_BP_PAGE_CNT3(unsigned long offset) 247191783Srmacklem{ 248191783Srmacklem if (!( 249191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN61XX) && (((offset >= 40) && (offset <= 47)))) || 250191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN63XX) && (((offset >= 40) && (offset <= 43)))) || 251191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN66XX) && (((offset >= 40) && (offset <= 41)) || ((offset >= 44) && (offset <= 47)))) || 252191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CNF71XX) && (((offset >= 40) && (offset <= 47)))))) 253191783Srmacklem cvmx_warn("CVMX_IPD_PORTX_BP_PAGE_CNT3(%lu) is invalid on this chip\n", offset); 254191990Sattilio return CVMX_ADD_IO_SEG(0x00014F00000003D0ull) + ((offset) & 63) * 8 - 8*40; 255191783Srmacklem} 256191783Srmacklem#else 257191990Sattilio#define CVMX_IPD_PORTX_BP_PAGE_CNT3(offset) (CVMX_ADD_IO_SEG(0x00014F00000003D0ull) + ((offset) & 63) * 8 - 8*40) 258191783Srmacklem#endif 259191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 260191783Srmacklemstatic inline uint64_t CVMX_IPD_PORT_BP_COUNTERS2_PAIRX(unsigned long offset) 261191783Srmacklem{ 262191783Srmacklem if (!( 263191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN52XX) && (((offset >= 36) && (offset <= 39)))) || 264191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN56XX) && (((offset >= 36) && (offset <= 39)))) || 265191990Sattilio (OCTEON_IS_MODEL(OCTEON_CN61XX) && (((offset >= 36) && (offset <= 39)))) || 266191990Sattilio (OCTEON_IS_MODEL(OCTEON_CN63XX) && (((offset >= 36) && (offset <= 39)))) || 267191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN66XX) && (((offset >= 36) && (offset <= 39)))) || 268191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CNF71XX) && (((offset >= 36) && (offset <= 39)))))) 269191783Srmacklem cvmx_warn("CVMX_IPD_PORT_BP_COUNTERS2_PAIRX(%lu) is invalid on this chip\n", offset); 270191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000388ull) + ((offset) & 63) * 8 - 8*36; 271191783Srmacklem} 272191783Srmacklem#else 273191783Srmacklem#define CVMX_IPD_PORT_BP_COUNTERS2_PAIRX(offset) (CVMX_ADD_IO_SEG(0x00014F0000000388ull) + ((offset) & 63) * 8 - 8*36) 274191783Srmacklem#endif 275191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 276191783Srmacklemstatic inline uint64_t CVMX_IPD_PORT_BP_COUNTERS3_PAIRX(unsigned long offset) 277191783Srmacklem{ 278191783Srmacklem if (!( 279191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN61XX) && (((offset >= 40) && (offset <= 43)))) || 280191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN63XX) && (((offset >= 40) && (offset <= 43)))) || 281191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN66XX) && (((offset >= 40) && (offset <= 43)))) || 282191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CNF71XX) && (((offset >= 40) && (offset <= 43)))))) 283191783Srmacklem cvmx_warn("CVMX_IPD_PORT_BP_COUNTERS3_PAIRX(%lu) is invalid on this chip\n", offset); 284191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F00000003B0ull) + ((offset) & 63) * 8 - 8*40; 285191783Srmacklem} 286191783Srmacklem#else 287191783Srmacklem#define CVMX_IPD_PORT_BP_COUNTERS3_PAIRX(offset) (CVMX_ADD_IO_SEG(0x00014F00000003B0ull) + ((offset) & 63) * 8 - 8*40) 288191783Srmacklem#endif 289191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 290191783Srmacklemstatic inline uint64_t CVMX_IPD_PORT_BP_COUNTERS4_PAIRX(unsigned long offset) 291191783Srmacklem{ 292191783Srmacklem if (!( 293191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN61XX) && (((offset >= 44) && (offset <= 47)))) || 294191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN66XX) && (((offset >= 44) && (offset <= 47)))) || 295191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CNF71XX) && (((offset >= 44) && (offset <= 47)))))) 296191783Srmacklem cvmx_warn("CVMX_IPD_PORT_BP_COUNTERS4_PAIRX(%lu) is invalid on this chip\n", offset); 297191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000410ull) + ((offset) & 63) * 8 - 8*44; 298191783Srmacklem} 299191783Srmacklem#else 300191783Srmacklem#define CVMX_IPD_PORT_BP_COUNTERS4_PAIRX(offset) (CVMX_ADD_IO_SEG(0x00014F0000000410ull) + ((offset) & 63) * 8 - 8*44) 301191783Srmacklem#endif 302191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 303191783Srmacklemstatic inline uint64_t CVMX_IPD_PORT_BP_COUNTERS_PAIRX(unsigned long offset) 304191783Srmacklem{ 305191783Srmacklem if (!( 306191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN30XX) && ((offset <= 2) || (offset == 32))) || 307191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN31XX) && ((offset <= 2) || ((offset >= 32) && (offset <= 33)))) || 308191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN38XX) && ((offset <= 35))) || 309191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN50XX) && ((offset <= 2) || ((offset >= 32) && (offset <= 33)))) || 310191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 3) || ((offset >= 32) && (offset <= 35)))) || 311191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset <= 3) || ((offset >= 16) && (offset <= 19)) || ((offset >= 32) && (offset <= 35)))) || 312191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN58XX) && ((offset <= 35))) || 313191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 3) || ((offset >= 16) && (offset <= 19)) || ((offset >= 32) && (offset <= 35)))) || 314191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 3) || ((offset >= 32) && (offset <= 35)))) || 315191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 3) || ((offset >= 16) && (offset <= 19)) || ((offset >= 32) && (offset <= 35)))) || 316191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CNF71XX) && ((offset <= 3) || ((offset >= 16) && (offset <= 19)) || ((offset >= 32) && (offset <= 35)))))) 317191783Srmacklem cvmx_warn("CVMX_IPD_PORT_BP_COUNTERS_PAIRX(%lu) is invalid on this chip\n", offset); 318191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F00000001B8ull) + ((offset) & 63) * 8; 319191783Srmacklem} 320191783Srmacklem#else 321191783Srmacklem#define CVMX_IPD_PORT_BP_COUNTERS_PAIRX(offset) (CVMX_ADD_IO_SEG(0x00014F00000001B8ull) + ((offset) & 63) * 8) 322191783Srmacklem#endif 323191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 324191783Srmacklem#define CVMX_IPD_PORT_PTR_FIFO_CTL CVMX_IPD_PORT_PTR_FIFO_CTL_FUNC() 325191783Srmacklemstatic inline uint64_t CVMX_IPD_PORT_PTR_FIFO_CTL_FUNC(void) 326191783Srmacklem{ 327191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN68XX))) 328191783Srmacklem cvmx_warn("CVMX_IPD_PORT_PTR_FIFO_CTL not supported on this chip\n"); 329191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000798ull); 330191783Srmacklem} 331191783Srmacklem#else 332191783Srmacklem#define CVMX_IPD_PORT_PTR_FIFO_CTL (CVMX_ADD_IO_SEG(0x00014F0000000798ull)) 333191783Srmacklem#endif 334191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 335191783Srmacklemstatic inline uint64_t CVMX_IPD_PORT_QOS_INTX(unsigned long offset) 336191783Srmacklem{ 337191783Srmacklem if (!( 338191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset == 0) || (offset == 4))) || 339191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0) || (offset == 2) || (offset == 4))) || 340191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset == 0) || (offset == 2) || (offset == 4) || (offset == 5))) || 341191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset == 0) || (offset == 4) || (offset == 5))) || 342191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset == 0) || (offset == 2) || (offset == 4) || (offset == 5))) || 343191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset <= 7))) || 344191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CNF71XX) && ((offset == 0) || (offset == 2) || (offset == 4) || (offset == 5))))) 345191783Srmacklem cvmx_warn("CVMX_IPD_PORT_QOS_INTX(%lu) is invalid on this chip\n", offset); 346191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000808ull) + ((offset) & 7) * 8; 347191783Srmacklem} 348191783Srmacklem#else 349191783Srmacklem#define CVMX_IPD_PORT_QOS_INTX(offset) (CVMX_ADD_IO_SEG(0x00014F0000000808ull) + ((offset) & 7) * 8) 350191783Srmacklem#endif 351191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 352191783Srmacklemstatic inline uint64_t CVMX_IPD_PORT_QOS_INT_ENBX(unsigned long offset) 353191783Srmacklem{ 354191783Srmacklem if (!( 355191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset == 0) || (offset == 4))) || 356191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset == 0) || (offset == 2) || (offset == 4))) || 357191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset == 0) || (offset == 2) || (offset == 4) || (offset == 5))) || 358191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset == 0) || (offset == 4) || (offset == 5))) || 359191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset == 0) || (offset == 2) || (offset == 4) || (offset == 5))) || 360191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset <= 7))) || 361191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CNF71XX) && ((offset == 0) || (offset == 2) || (offset == 4) || (offset == 5))))) 362191783Srmacklem cvmx_warn("CVMX_IPD_PORT_QOS_INT_ENBX(%lu) is invalid on this chip\n", offset); 363191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000848ull) + ((offset) & 7) * 8; 364191783Srmacklem} 365192145Srmacklem#else 366191783Srmacklem#define CVMX_IPD_PORT_QOS_INT_ENBX(offset) (CVMX_ADD_IO_SEG(0x00014F0000000848ull) + ((offset) & 7) * 8) 367191783Srmacklem#endif 368191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 369192145Srmacklemstatic inline uint64_t CVMX_IPD_PORT_QOS_X_CNT(unsigned long offset) 370191783Srmacklem{ 371192145Srmacklem if (!( 372191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 31) || ((offset >= 256) && (offset <= 319)))) || 373191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset <= 31) || ((offset >= 128) && (offset <= 159)) || ((offset >= 256) && (offset <= 319)))) || 374191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 31) || ((offset >= 128) && (offset <= 159)) || ((offset >= 256) && (offset <= 383)))) || 375191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 31) || ((offset >= 256) && (offset <= 351)))) || 376193066Sjamie (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 31) || ((offset >= 128) && (offset <= 159)) || ((offset >= 256) && (offset <= 335)) || ((offset >= 352) && (offset <= 383)))) || 377191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset <= 511))) || 378191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CNF71XX) && ((offset <= 31) || ((offset >= 128) && (offset <= 159)) || ((offset >= 256) && (offset <= 383)))))) 379191783Srmacklem cvmx_warn("CVMX_IPD_PORT_QOS_X_CNT(%lu) is invalid on this chip\n", offset); 380191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000888ull) + ((offset) & 511) * 8; 381191783Srmacklem} 382192145Srmacklem#else 383191783Srmacklem#define CVMX_IPD_PORT_QOS_X_CNT(offset) (CVMX_ADD_IO_SEG(0x00014F0000000888ull) + ((offset) & 511) * 8) 384191783Srmacklem#endif 385191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 386191783Srmacklemstatic inline uint64_t CVMX_IPD_PORT_SOPX(unsigned long block_id) 387191783Srmacklem{ 388191783Srmacklem if (!( 389191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((block_id == 0))))) 390191783Srmacklem cvmx_warn("CVMX_IPD_PORT_SOPX(%lu) is invalid on this chip\n", block_id); 391191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000004400ull); 392191783Srmacklem} 393191783Srmacklem#else 394191783Srmacklem#define CVMX_IPD_PORT_SOPX(block_id) (CVMX_ADD_IO_SEG(0x00014F0000004400ull)) 395191783Srmacklem#endif 396191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 397191783Srmacklem#define CVMX_IPD_PRC_HOLD_PTR_FIFO_CTL CVMX_IPD_PRC_HOLD_PTR_FIFO_CTL_FUNC() 398191783Srmacklemstatic inline uint64_t CVMX_IPD_PRC_HOLD_PTR_FIFO_CTL_FUNC(void) 399191783Srmacklem{ 400191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX))) 401191783Srmacklem cvmx_warn("CVMX_IPD_PRC_HOLD_PTR_FIFO_CTL not supported on this chip\n"); 402191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000348ull); 403191783Srmacklem} 404192145Srmacklem#else 405191783Srmacklem#define CVMX_IPD_PRC_HOLD_PTR_FIFO_CTL (CVMX_ADD_IO_SEG(0x00014F0000000348ull)) 406191783Srmacklem#endif 407191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 408191783Srmacklem#define CVMX_IPD_PRC_PORT_PTR_FIFO_CTL CVMX_IPD_PRC_PORT_PTR_FIFO_CTL_FUNC() 409191783Srmacklemstatic inline uint64_t CVMX_IPD_PRC_PORT_PTR_FIFO_CTL_FUNC(void) 410191783Srmacklem{ 411191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX))) 412191783Srmacklem cvmx_warn("CVMX_IPD_PRC_PORT_PTR_FIFO_CTL not supported on this chip\n"); 413191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000350ull); 414191783Srmacklem} 415191783Srmacklem#else 416191783Srmacklem#define CVMX_IPD_PRC_PORT_PTR_FIFO_CTL (CVMX_ADD_IO_SEG(0x00014F0000000350ull)) 417191783Srmacklem#endif 418191783Srmacklem#define CVMX_IPD_PTR_COUNT (CVMX_ADD_IO_SEG(0x00014F0000000320ull)) 419191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 420191783Srmacklem#define CVMX_IPD_PWP_PTR_FIFO_CTL CVMX_IPD_PWP_PTR_FIFO_CTL_FUNC() 421191783Srmacklemstatic inline uint64_t CVMX_IPD_PWP_PTR_FIFO_CTL_FUNC(void) 422191783Srmacklem{ 423191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX))) 424191783Srmacklem cvmx_warn("CVMX_IPD_PWP_PTR_FIFO_CTL not supported on this chip\n"); 425192145Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000340ull); 426191783Srmacklem} 427191783Srmacklem#else 428191783Srmacklem#define CVMX_IPD_PWP_PTR_FIFO_CTL (CVMX_ADD_IO_SEG(0x00014F0000000340ull)) 429191783Srmacklem#endif 430191783Srmacklem#define CVMX_IPD_QOS0_RED_MARKS CVMX_IPD_QOSX_RED_MARKS(0) 431191783Srmacklem#define CVMX_IPD_QOS1_RED_MARKS CVMX_IPD_QOSX_RED_MARKS(1) 432192145Srmacklem#define CVMX_IPD_QOS2_RED_MARKS CVMX_IPD_QOSX_RED_MARKS(2) 433191783Srmacklem#define CVMX_IPD_QOS3_RED_MARKS CVMX_IPD_QOSX_RED_MARKS(3) 434191783Srmacklem#define CVMX_IPD_QOS4_RED_MARKS CVMX_IPD_QOSX_RED_MARKS(4) 435191783Srmacklem#define CVMX_IPD_QOS5_RED_MARKS CVMX_IPD_QOSX_RED_MARKS(5) 436191783Srmacklem#define CVMX_IPD_QOS6_RED_MARKS CVMX_IPD_QOSX_RED_MARKS(6) 437191783Srmacklem#define CVMX_IPD_QOS7_RED_MARKS CVMX_IPD_QOSX_RED_MARKS(7) 438191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 439191783Srmacklemstatic inline uint64_t CVMX_IPD_QOSX_RED_MARKS(unsigned long offset) 440191783Srmacklem{ 441191783Srmacklem if (!( 442191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN30XX) && ((offset <= 7))) || 443191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN31XX) && ((offset <= 7))) || 444191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN38XX) && ((offset <= 7))) || 445191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN50XX) && ((offset <= 7))) || 446191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 7))) || 447191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset <= 7))) || 448191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN58XX) && ((offset <= 7))) || 449191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 7))) || 450192145Srmacklem (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 7))) || 451191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 7))) || 452191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset <= 7))) || 453191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CNF71XX) && ((offset <= 7))))) 454191783Srmacklem cvmx_warn("CVMX_IPD_QOSX_RED_MARKS(%lu) is invalid on this chip\n", offset); 455191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000178ull) + ((offset) & 7) * 8; 456192145Srmacklem} 457191783Srmacklem#else 458191783Srmacklem#define CVMX_IPD_QOSX_RED_MARKS(offset) (CVMX_ADD_IO_SEG(0x00014F0000000178ull) + ((offset) & 7) * 8) 459191783Srmacklem#endif 460191783Srmacklem#define CVMX_IPD_QUE0_FREE_PAGE_CNT (CVMX_ADD_IO_SEG(0x00014F0000000330ull)) 461191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 462191783Srmacklemstatic inline uint64_t CVMX_IPD_RED_BPID_ENABLEX(unsigned long block_id) 463191783Srmacklem{ 464191783Srmacklem if (!( 465191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((block_id == 0))))) 466191783Srmacklem cvmx_warn("CVMX_IPD_RED_BPID_ENABLEX(%lu) is invalid on this chip\n", block_id); 467191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000004200ull); 468191783Srmacklem} 469192145Srmacklem#else 470191783Srmacklem#define CVMX_IPD_RED_BPID_ENABLEX(block_id) (CVMX_ADD_IO_SEG(0x00014F0000004200ull)) 471191783Srmacklem#endif 472191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 473191783Srmacklem#define CVMX_IPD_RED_DELAY CVMX_IPD_RED_DELAY_FUNC() 474191783Srmacklemstatic inline uint64_t CVMX_IPD_RED_DELAY_FUNC(void) 475191783Srmacklem{ 476191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN68XX))) 477191783Srmacklem cvmx_warn("CVMX_IPD_RED_DELAY not supported on this chip\n"); 478191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000004300ull); 479191783Srmacklem} 480193066Sjamie#else 481194118Sjamie#define CVMX_IPD_RED_DELAY (CVMX_ADD_IO_SEG(0x00014F0000004300ull)) 482194118Sjamie#endif 483193066Sjamie#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 484191783Srmacklem#define CVMX_IPD_RED_PORT_ENABLE CVMX_IPD_RED_PORT_ENABLE_FUNC() 485191783Srmacklemstatic inline uint64_t CVMX_IPD_RED_PORT_ENABLE_FUNC(void) 486191783Srmacklem{ 487191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX))) 488191783Srmacklem cvmx_warn("CVMX_IPD_RED_PORT_ENABLE not supported on this chip\n"); 489191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F00000002D8ull); 490191783Srmacklem} 491191783Srmacklem#else 492191783Srmacklem#define CVMX_IPD_RED_PORT_ENABLE (CVMX_ADD_IO_SEG(0x00014F00000002D8ull)) 493191783Srmacklem#endif 494191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 495191783Srmacklem#define CVMX_IPD_RED_PORT_ENABLE2 CVMX_IPD_RED_PORT_ENABLE2_FUNC() 496191783Srmacklemstatic inline uint64_t CVMX_IPD_RED_PORT_ENABLE2_FUNC(void) 497191783Srmacklem{ 498191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX))) 499191783Srmacklem cvmx_warn("CVMX_IPD_RED_PORT_ENABLE2 not supported on this chip\n"); 500191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F00000003A8ull); 501203303Srmacklem} 502192145Srmacklem#else 503191783Srmacklem#define CVMX_IPD_RED_PORT_ENABLE2 (CVMX_ADD_IO_SEG(0x00014F00000003A8ull)) 504191783Srmacklem#endif 505191783Srmacklem#define CVMX_IPD_RED_QUE0_PARAM CVMX_IPD_RED_QUEX_PARAM(0) 506191783Srmacklem#define CVMX_IPD_RED_QUE1_PARAM CVMX_IPD_RED_QUEX_PARAM(1) 507191783Srmacklem#define CVMX_IPD_RED_QUE2_PARAM CVMX_IPD_RED_QUEX_PARAM(2) 508191783Srmacklem#define CVMX_IPD_RED_QUE3_PARAM CVMX_IPD_RED_QUEX_PARAM(3) 509192585Srmacklem#define CVMX_IPD_RED_QUE4_PARAM CVMX_IPD_RED_QUEX_PARAM(4) 510192585Srmacklem#define CVMX_IPD_RED_QUE5_PARAM CVMX_IPD_RED_QUEX_PARAM(5) 511192585Srmacklem#define CVMX_IPD_RED_QUE6_PARAM CVMX_IPD_RED_QUEX_PARAM(6) 512192585Srmacklem#define CVMX_IPD_RED_QUE7_PARAM CVMX_IPD_RED_QUEX_PARAM(7) 513192585Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 514192585Srmacklemstatic inline uint64_t CVMX_IPD_RED_QUEX_PARAM(unsigned long offset) 515192585Srmacklem{ 516192585Srmacklem if (!( 517192585Srmacklem (OCTEON_IS_MODEL(OCTEON_CN30XX) && ((offset <= 7))) || 518192585Srmacklem (OCTEON_IS_MODEL(OCTEON_CN31XX) && ((offset <= 7))) || 519192585Srmacklem (OCTEON_IS_MODEL(OCTEON_CN38XX) && ((offset <= 7))) || 520191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN50XX) && ((offset <= 7))) || 521191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN52XX) && ((offset <= 7))) || 522191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN56XX) && ((offset <= 7))) || 523191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN58XX) && ((offset <= 7))) || 524191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN61XX) && ((offset <= 7))) || 525191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN63XX) && ((offset <= 7))) || 526191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN66XX) && ((offset <= 7))) || 527191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CN68XX) && ((offset <= 7))) || 528191783Srmacklem (OCTEON_IS_MODEL(OCTEON_CNF71XX) && ((offset <= 7))))) 529191783Srmacklem cvmx_warn("CVMX_IPD_RED_QUEX_PARAM(%lu) is invalid on this chip\n", offset); 530191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F00000002E0ull) + ((offset) & 7) * 8; 531191783Srmacklem} 532191783Srmacklem#else 533191783Srmacklem#define CVMX_IPD_RED_QUEX_PARAM(offset) (CVMX_ADD_IO_SEG(0x00014F00000002E0ull) + ((offset) & 7) * 8) 534191783Srmacklem#endif 535191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 536191783Srmacklem#define CVMX_IPD_REQ_WGT CVMX_IPD_REQ_WGT_FUNC() 537191783Srmacklemstatic inline uint64_t CVMX_IPD_REQ_WGT_FUNC(void) 538191783Srmacklem{ 539191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN68XX))) 540191783Srmacklem cvmx_warn("CVMX_IPD_REQ_WGT not supported on this chip\n"); 541191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000004418ull); 542191783Srmacklem} 543191783Srmacklem#else 544191783Srmacklem#define CVMX_IPD_REQ_WGT (CVMX_ADD_IO_SEG(0x00014F0000004418ull)) 545191783Srmacklem#endif 546191783Srmacklem#define CVMX_IPD_SUB_PORT_BP_PAGE_CNT (CVMX_ADD_IO_SEG(0x00014F0000000148ull)) 547191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 548191783Srmacklem#define CVMX_IPD_SUB_PORT_FCS CVMX_IPD_SUB_PORT_FCS_FUNC() 549191783Srmacklemstatic inline uint64_t CVMX_IPD_SUB_PORT_FCS_FUNC(void) 550191783Srmacklem{ 551191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX))) 552191783Srmacklem cvmx_warn("CVMX_IPD_SUB_PORT_FCS not supported on this chip\n"); 553191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000170ull); 554191783Srmacklem} 555191783Srmacklem#else 556191783Srmacklem#define CVMX_IPD_SUB_PORT_FCS (CVMX_ADD_IO_SEG(0x00014F0000000170ull)) 557191783Srmacklem#endif 558191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 559191783Srmacklem#define CVMX_IPD_SUB_PORT_QOS_CNT CVMX_IPD_SUB_PORT_QOS_CNT_FUNC() 560191783Srmacklemstatic inline uint64_t CVMX_IPD_SUB_PORT_QOS_CNT_FUNC(void) 561191783Srmacklem{ 562191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CN68XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX))) 563191783Srmacklem cvmx_warn("CVMX_IPD_SUB_PORT_QOS_CNT not supported on this chip\n"); 564191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000800ull); 565191783Srmacklem} 566191783Srmacklem#else 567191783Srmacklem#define CVMX_IPD_SUB_PORT_QOS_CNT (CVMX_ADD_IO_SEG(0x00014F0000000800ull)) 568191783Srmacklem#endif 569191783Srmacklem#define CVMX_IPD_WQE_FPA_QUEUE (CVMX_ADD_IO_SEG(0x00014F0000000020ull)) 570191783Srmacklem#if CVMX_ENABLE_CSR_ADDRESS_CHECKING 571191783Srmacklem#define CVMX_IPD_WQE_PTR_VALID CVMX_IPD_WQE_PTR_VALID_FUNC() 572191783Srmacklemstatic inline uint64_t CVMX_IPD_WQE_PTR_VALID_FUNC(void) 573191783Srmacklem{ 574191783Srmacklem if (!(OCTEON_IS_MODEL(OCTEON_CN3XXX) || OCTEON_IS_MODEL(OCTEON_CN5XXX) || OCTEON_IS_MODEL(OCTEON_CN61XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) || OCTEON_IS_MODEL(OCTEON_CN66XX) || OCTEON_IS_MODEL(OCTEON_CNF71XX))) 575191783Srmacklem cvmx_warn("CVMX_IPD_WQE_PTR_VALID not supported on this chip\n"); 576191783Srmacklem return CVMX_ADD_IO_SEG(0x00014F0000000360ull); 577191783Srmacklem} 578191783Srmacklem#else 579191783Srmacklem#define CVMX_IPD_WQE_PTR_VALID (CVMX_ADD_IO_SEG(0x00014F0000000360ull)) 580191783Srmacklem#endif 581191783Srmacklem 582191783Srmacklem/** 583191783Srmacklem * cvmx_ipd_1st_mbuff_skip 584191783Srmacklem * 585191783Srmacklem * IPD_1ST_MBUFF_SKIP = IPD First MBUFF Word Skip Size 586191783Srmacklem * 587191783Srmacklem * The number of words that the IPD will skip when writing the first MBUFF. 588191783Srmacklem */ 589191783Srmacklemunion cvmx_ipd_1st_mbuff_skip { 590191783Srmacklem uint64_t u64; 591191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s { 592191783Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 593191783Srmacklem uint64_t reserved_6_63 : 58; 594191783Srmacklem uint64_t skip_sz : 6; /**< The number of 8-byte words from the top of the 595191783Srmacklem 1st MBUFF that the IPD will store the next-pointer. 596191783Srmacklem Legal values are 0 to 32, where the MAX value 597191783Srmacklem is also limited to: 598191783Srmacklem IPD_PACKET_MBUFF_SIZE[MB_SIZE] - 18. 599191783Srmacklem Must be at least 16 when IPD_CTL_STATUS[NO_WPTR] 600191783Srmacklem is set. */ 601191783Srmacklem#else 602191783Srmacklem uint64_t skip_sz : 6; 603191783Srmacklem uint64_t reserved_6_63 : 58; 604191783Srmacklem#endif 605191783Srmacklem } s; 606191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s cn30xx; 607191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s cn31xx; 608191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s cn38xx; 609191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s cn38xxp2; 610191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s cn50xx; 611191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s cn52xx; 612191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s cn52xxp1; 613191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s cn56xx; 614191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s cn56xxp1; 615191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s cn58xx; 616191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s cn58xxp1; 617191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s cn61xx; 618191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s cn63xx; 619191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s cn63xxp1; 620191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s cn66xx; 621191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s cn68xx; 622191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s cn68xxp1; 623191783Srmacklem struct cvmx_ipd_1st_mbuff_skip_s cnf71xx; 624191783Srmacklem}; 625191783Srmacklemtypedef union cvmx_ipd_1st_mbuff_skip cvmx_ipd_1st_mbuff_skip_t; 626191783Srmacklem 627191783Srmacklem/** 628191783Srmacklem * cvmx_ipd_1st_next_ptr_back 629191783Srmacklem * 630191783Srmacklem * IPD_1st_NEXT_PTR_BACK = IPD First Next Pointer Back Values 631191783Srmacklem * 632191783Srmacklem * Contains the Back Field for use in creating the Next Pointer Header for the First MBUF 633191783Srmacklem */ 634191783Srmacklemunion cvmx_ipd_1st_next_ptr_back { 635191783Srmacklem uint64_t u64; 636191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s { 637191783Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 638191783Srmacklem uint64_t reserved_4_63 : 60; 639191783Srmacklem uint64_t back : 4; /**< Used to find head of buffer from the nxt-hdr-ptr. */ 640191783Srmacklem#else 641191783Srmacklem uint64_t back : 4; 642191783Srmacklem uint64_t reserved_4_63 : 60; 643191783Srmacklem#endif 644191783Srmacklem } s; 645191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s cn30xx; 646191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s cn31xx; 647191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s cn38xx; 648191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s cn38xxp2; 649191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s cn50xx; 650191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s cn52xx; 651191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s cn52xxp1; 652191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s cn56xx; 653191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s cn56xxp1; 654191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s cn58xx; 655191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s cn58xxp1; 656191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s cn61xx; 657191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s cn63xx; 658191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s cn63xxp1; 659191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s cn66xx; 660191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s cn68xx; 661191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s cn68xxp1; 662191783Srmacklem struct cvmx_ipd_1st_next_ptr_back_s cnf71xx; 663191783Srmacklem}; 664192585Srmacklemtypedef union cvmx_ipd_1st_next_ptr_back cvmx_ipd_1st_next_ptr_back_t; 665191783Srmacklem 666191783Srmacklem/** 667192585Srmacklem * cvmx_ipd_2nd_next_ptr_back 668192585Srmacklem * 669192585Srmacklem * IPD_2nd_NEXT_PTR_BACK = IPD Second Next Pointer Back Value 670192585Srmacklem * 671192585Srmacklem * Contains the Back Field for use in creating the Next Pointer Header for the First MBUF 672203303Srmacklem */ 673191783Srmacklemunion cvmx_ipd_2nd_next_ptr_back { 674191783Srmacklem uint64_t u64; 675191783Srmacklem struct cvmx_ipd_2nd_next_ptr_back_s { 676191783Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 677191783Srmacklem uint64_t reserved_4_63 : 60; 678191783Srmacklem uint64_t back : 4; /**< Used to find head of buffer from the nxt-hdr-ptr. */ 679191783Srmacklem#else 680191783Srmacklem uint64_t back : 4; 681191783Srmacklem uint64_t reserved_4_63 : 60; 682191783Srmacklem#endif 683191783Srmacklem } s; 684191783Srmacklem struct cvmx_ipd_2nd_next_ptr_back_s cn30xx; 685191783Srmacklem struct cvmx_ipd_2nd_next_ptr_back_s cn31xx; 686191990Sattilio struct cvmx_ipd_2nd_next_ptr_back_s cn38xx; 687191783Srmacklem struct cvmx_ipd_2nd_next_ptr_back_s cn38xxp2; 688191783Srmacklem struct cvmx_ipd_2nd_next_ptr_back_s cn50xx; 689191783Srmacklem struct cvmx_ipd_2nd_next_ptr_back_s cn52xx; 690191783Srmacklem struct cvmx_ipd_2nd_next_ptr_back_s cn52xxp1; 691191783Srmacklem struct cvmx_ipd_2nd_next_ptr_back_s cn56xx; 692191783Srmacklem struct cvmx_ipd_2nd_next_ptr_back_s cn56xxp1; 693191783Srmacklem struct cvmx_ipd_2nd_next_ptr_back_s cn58xx; 694191783Srmacklem struct cvmx_ipd_2nd_next_ptr_back_s cn58xxp1; 695191783Srmacklem struct cvmx_ipd_2nd_next_ptr_back_s cn61xx; 696191783Srmacklem struct cvmx_ipd_2nd_next_ptr_back_s cn63xx; 697191783Srmacklem struct cvmx_ipd_2nd_next_ptr_back_s cn63xxp1; 698191783Srmacklem struct cvmx_ipd_2nd_next_ptr_back_s cn66xx; 699191783Srmacklem struct cvmx_ipd_2nd_next_ptr_back_s cn68xx; 700191783Srmacklem struct cvmx_ipd_2nd_next_ptr_back_s cn68xxp1; 701191783Srmacklem struct cvmx_ipd_2nd_next_ptr_back_s cnf71xx; 702191783Srmacklem}; 703191783Srmacklemtypedef union cvmx_ipd_2nd_next_ptr_back cvmx_ipd_2nd_next_ptr_back_t; 704191783Srmacklem 705191783Srmacklem/** 706191783Srmacklem * cvmx_ipd_bist_status 707191783Srmacklem * 708191783Srmacklem * IPD_BIST_STATUS = IPD BIST STATUS 709191783Srmacklem * 710191783Srmacklem * BIST Status for IPD's Memories. 711191783Srmacklem */ 712192585Srmacklemunion cvmx_ipd_bist_status { 713191783Srmacklem uint64_t u64; 714192585Srmacklem struct cvmx_ipd_bist_status_s { 715192585Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 716191783Srmacklem uint64_t reserved_23_63 : 41; 717191990Sattilio uint64_t iiwo1 : 1; /**< IPD IOB WQE Dataout MEM1 Bist Status. */ 718191783Srmacklem uint64_t iiwo0 : 1; /**< IPD IOB WQE Dataout MEM0 Bist Status. */ 719191783Srmacklem uint64_t iio1 : 1; /**< IPD IOB Dataout MEM1 Bist Status. */ 720192585Srmacklem uint64_t iio0 : 1; /**< IPD IOB Dataout MEM0 Bist Status. */ 721203303Srmacklem uint64_t pbm4 : 1; /**< PBM4Memory Bist Status. */ 722191783Srmacklem uint64_t csr_mem : 1; /**< CSR Register Memory Bist Status. */ 723191783Srmacklem uint64_t csr_ncmd : 1; /**< CSR NCB Commands Memory Bist Status. */ 724191783Srmacklem uint64_t pwq_wqed : 1; /**< PWQ PIP WQE DONE Memory Bist Status. */ 725191783Srmacklem uint64_t pwq_wp1 : 1; /**< PWQ WQE PAGE1 PTR Memory Bist Status. */ 726191783Srmacklem uint64_t pwq_pow : 1; /**< PWQ POW MEM Memory Bist Status. */ 727191783Srmacklem uint64_t ipq_pbe1 : 1; /**< IPQ PBE1 Memory Bist Status. */ 728191990Sattilio uint64_t ipq_pbe0 : 1; /**< IPQ PBE0 Memory Bist Status. */ 729191783Srmacklem uint64_t pbm3 : 1; /**< PBM3 Memory Bist Status. */ 730192145Srmacklem uint64_t pbm2 : 1; /**< PBM2 Memory Bist Status. */ 731191783Srmacklem uint64_t pbm1 : 1; /**< PBM1 Memory Bist Status. */ 732191783Srmacklem uint64_t pbm0 : 1; /**< PBM0 Memory Bist Status. */ 733191783Srmacklem uint64_t pbm_word : 1; /**< PBM_WORD Memory Bist Status. */ 734192585Srmacklem uint64_t pwq1 : 1; /**< PWQ1 Memory Bist Status. */ 735191783Srmacklem uint64_t pwq0 : 1; /**< PWQ0 Memory Bist Status. */ 736192585Srmacklem uint64_t prc_off : 1; /**< PRC_OFF Memory Bist Status. */ 737192585Srmacklem uint64_t ipd_old : 1; /**< IPD_OLD Memory Bist Status. */ 738192585Srmacklem uint64_t ipd_new : 1; /**< IPD_NEW Memory Bist Status. */ 739192585Srmacklem uint64_t pwp : 1; /**< PWP Memory Bist Status. */ 740192585Srmacklem#else 741192585Srmacklem uint64_t pwp : 1; 742192585Srmacklem uint64_t ipd_new : 1; 743192585Srmacklem uint64_t ipd_old : 1; 744192585Srmacklem uint64_t prc_off : 1; 745192585Srmacklem uint64_t pwq0 : 1; 746192585Srmacklem uint64_t pwq1 : 1; 747192585Srmacklem uint64_t pbm_word : 1; 748192585Srmacklem uint64_t pbm0 : 1; 749192585Srmacklem uint64_t pbm1 : 1; 750192585Srmacklem uint64_t pbm2 : 1; 751192585Srmacklem uint64_t pbm3 : 1; 752192585Srmacklem uint64_t ipq_pbe0 : 1; 753192585Srmacklem uint64_t ipq_pbe1 : 1; 754192585Srmacklem uint64_t pwq_pow : 1; 755192585Srmacklem uint64_t pwq_wp1 : 1; 756192585Srmacklem uint64_t pwq_wqed : 1; 757192585Srmacklem uint64_t csr_ncmd : 1; 758192585Srmacklem uint64_t csr_mem : 1; 759192585Srmacklem uint64_t pbm4 : 1; 760192585Srmacklem uint64_t iio0 : 1; 761192585Srmacklem uint64_t iio1 : 1; 762192585Srmacklem uint64_t iiwo0 : 1; 763192585Srmacklem uint64_t iiwo1 : 1; 764192585Srmacklem uint64_t reserved_23_63 : 41; 765192585Srmacklem#endif 766192585Srmacklem } s; 767192585Srmacklem struct cvmx_ipd_bist_status_cn30xx { 768191783Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 769192585Srmacklem uint64_t reserved_16_63 : 48; 770192585Srmacklem uint64_t pwq_wqed : 1; /**< PWQ PIP WQE DONE Memory Bist Status. */ 771192585Srmacklem uint64_t pwq_wp1 : 1; /**< PWQ WQE PAGE1 PTR Memory Bist Status. */ 772192585Srmacklem uint64_t pwq_pow : 1; /**< PWQ POW MEM Memory Bist Status. */ 773192585Srmacklem uint64_t ipq_pbe1 : 1; /**< IPQ PBE1 Memory Bist Status. */ 774192585Srmacklem uint64_t ipq_pbe0 : 1; /**< IPQ PBE0 Memory Bist Status. */ 775192585Srmacklem uint64_t pbm3 : 1; /**< PBM3 Memory Bist Status. */ 776192585Srmacklem uint64_t pbm2 : 1; /**< PBM2 Memory Bist Status. */ 777192585Srmacklem uint64_t pbm1 : 1; /**< PBM1 Memory Bist Status. */ 778192585Srmacklem uint64_t pbm0 : 1; /**< PBM0 Memory Bist Status. */ 779192585Srmacklem uint64_t pbm_word : 1; /**< PBM_WORD Memory Bist Status. */ 780192585Srmacklem uint64_t pwq1 : 1; /**< PWQ1 Memory Bist Status. */ 781192585Srmacklem uint64_t pwq0 : 1; /**< PWQ0 Memory Bist Status. */ 782192585Srmacklem uint64_t prc_off : 1; /**< PRC_OFF Memory Bist Status. */ 783192585Srmacklem uint64_t ipd_old : 1; /**< IPD_OLD Memory Bist Status. */ 784192585Srmacklem uint64_t ipd_new : 1; /**< IPD_NEW Memory Bist Status. */ 785192585Srmacklem uint64_t pwp : 1; /**< PWP Memory Bist Status. */ 786192585Srmacklem#else 787192585Srmacklem uint64_t pwp : 1; 788192585Srmacklem uint64_t ipd_new : 1; 789192585Srmacklem uint64_t ipd_old : 1; 790192585Srmacklem uint64_t prc_off : 1; 791192585Srmacklem uint64_t pwq0 : 1; 792192585Srmacklem uint64_t pwq1 : 1; 793192585Srmacklem uint64_t pbm_word : 1; 794192585Srmacklem uint64_t pbm0 : 1; 795192585Srmacklem uint64_t pbm1 : 1; 796192585Srmacklem uint64_t pbm2 : 1; 797192585Srmacklem uint64_t pbm3 : 1; 798192585Srmacklem uint64_t ipq_pbe0 : 1; 799192585Srmacklem uint64_t ipq_pbe1 : 1; 800192585Srmacklem uint64_t pwq_pow : 1; 801192585Srmacklem uint64_t pwq_wp1 : 1; 802192585Srmacklem uint64_t pwq_wqed : 1; 803192585Srmacklem uint64_t reserved_16_63 : 48; 804192585Srmacklem#endif 805192585Srmacklem } cn30xx; 806192585Srmacklem struct cvmx_ipd_bist_status_cn30xx cn31xx; 807192585Srmacklem struct cvmx_ipd_bist_status_cn30xx cn38xx; 808192585Srmacklem struct cvmx_ipd_bist_status_cn30xx cn38xxp2; 809192585Srmacklem struct cvmx_ipd_bist_status_cn30xx cn50xx; 810192585Srmacklem struct cvmx_ipd_bist_status_cn52xx { 811192585Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 812192585Srmacklem uint64_t reserved_18_63 : 46; 813192585Srmacklem uint64_t csr_mem : 1; /**< CSR Register Memory Bist Status. */ 814192585Srmacklem uint64_t csr_ncmd : 1; /**< CSR NCB Commands Memory Bist Status. */ 815192585Srmacklem uint64_t pwq_wqed : 1; /**< PWQ PIP WQE DONE Memory Bist Status. */ 816192585Srmacklem uint64_t pwq_wp1 : 1; /**< PWQ WQE PAGE1 PTR Memory Bist Status. */ 817192585Srmacklem uint64_t pwq_pow : 1; /**< PWQ POW MEM Memory Bist Status. */ 818192585Srmacklem uint64_t ipq_pbe1 : 1; /**< IPQ PBE1 Memory Bist Status. */ 819192585Srmacklem uint64_t ipq_pbe0 : 1; /**< IPQ PBE0 Memory Bist Status. */ 820192585Srmacklem uint64_t pbm3 : 1; /**< PBM3 Memory Bist Status. */ 821192585Srmacklem uint64_t pbm2 : 1; /**< PBM2 Memory Bist Status. */ 822192585Srmacklem uint64_t pbm1 : 1; /**< PBM1 Memory Bist Status. */ 823192585Srmacklem uint64_t pbm0 : 1; /**< PBM0 Memory Bist Status. */ 824192585Srmacklem uint64_t pbm_word : 1; /**< PBM_WORD Memory Bist Status. */ 825192585Srmacklem uint64_t pwq1 : 1; /**< PWQ1 Memory Bist Status. */ 826192585Srmacklem uint64_t pwq0 : 1; /**< PWQ0 Memory Bist Status. */ 827192585Srmacklem uint64_t prc_off : 1; /**< PRC_OFF Memory Bist Status. */ 828192585Srmacklem uint64_t ipd_old : 1; /**< IPD_OLD Memory Bist Status. */ 829192585Srmacklem uint64_t ipd_new : 1; /**< IPD_NEW Memory Bist Status. */ 830192585Srmacklem uint64_t pwp : 1; /**< PWP Memory Bist Status. */ 831192585Srmacklem#else 832192585Srmacklem uint64_t pwp : 1; 833192585Srmacklem uint64_t ipd_new : 1; 834192585Srmacklem uint64_t ipd_old : 1; 835192585Srmacklem uint64_t prc_off : 1; 836192585Srmacklem uint64_t pwq0 : 1; 837192585Srmacklem uint64_t pwq1 : 1; 838192585Srmacklem uint64_t pbm_word : 1; 839192585Srmacklem uint64_t pbm0 : 1; 840192585Srmacklem uint64_t pbm1 : 1; 841192585Srmacklem uint64_t pbm2 : 1; 842192585Srmacklem uint64_t pbm3 : 1; 843192585Srmacklem uint64_t ipq_pbe0 : 1; 844192585Srmacklem uint64_t ipq_pbe1 : 1; 845192585Srmacklem uint64_t pwq_pow : 1; 846192585Srmacklem uint64_t pwq_wp1 : 1; 847192585Srmacklem uint64_t pwq_wqed : 1; 848192585Srmacklem uint64_t csr_ncmd : 1; 849192585Srmacklem uint64_t csr_mem : 1; 850192585Srmacklem uint64_t reserved_18_63 : 46; 851192585Srmacklem#endif 852192585Srmacklem } cn52xx; 853192585Srmacklem struct cvmx_ipd_bist_status_cn52xx cn52xxp1; 854192585Srmacklem struct cvmx_ipd_bist_status_cn52xx cn56xx; 855192585Srmacklem struct cvmx_ipd_bist_status_cn52xx cn56xxp1; 856192585Srmacklem struct cvmx_ipd_bist_status_cn30xx cn58xx; 857192585Srmacklem struct cvmx_ipd_bist_status_cn30xx cn58xxp1; 858192585Srmacklem struct cvmx_ipd_bist_status_cn52xx cn61xx; 859192585Srmacklem struct cvmx_ipd_bist_status_cn52xx cn63xx; 860192585Srmacklem struct cvmx_ipd_bist_status_cn52xx cn63xxp1; 861192585Srmacklem struct cvmx_ipd_bist_status_cn52xx cn66xx; 862192585Srmacklem struct cvmx_ipd_bist_status_s cn68xx; 863192585Srmacklem struct cvmx_ipd_bist_status_s cn68xxp1; 864192585Srmacklem struct cvmx_ipd_bist_status_cn52xx cnf71xx; 865192585Srmacklem}; 866192585Srmacklemtypedef union cvmx_ipd_bist_status cvmx_ipd_bist_status_t; 867192585Srmacklem 868192585Srmacklem/** 869192585Srmacklem * cvmx_ipd_bp_prt_red_end 870192585Srmacklem * 871192585Srmacklem * IPD_BP_PRT_RED_END = IPD Backpressure Port RED Enable 872192585Srmacklem * 873192585Srmacklem * When IPD applies backpressure to a PORT and the corresponding bit in this register is set, 874192585Srmacklem * the RED Unit will drop packets for that port. 875192585Srmacklem */ 876192585Srmacklemunion cvmx_ipd_bp_prt_red_end { 877192585Srmacklem uint64_t u64; 878192585Srmacklem struct cvmx_ipd_bp_prt_red_end_s { 879192585Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 880192585Srmacklem uint64_t reserved_48_63 : 16; 881192585Srmacklem uint64_t prt_enb : 48; /**< The port corresponding to the bit position in this 882192585Srmacklem field will drop all NON-RAW packets to that port 883192585Srmacklem when port level backpressure is applied to that 884192585Srmacklem port. The applying of port-level backpressure for 885192585Srmacklem this dropping does not take into consideration the 886192585Srmacklem value of IPD_PORTX_BP_PAGE_CNT[BP_ENB], nor 887192585Srmacklem IPD_RED_PORT_ENABLE[PRT_ENB]. */ 888192585Srmacklem#else 889192585Srmacklem uint64_t prt_enb : 48; 890192585Srmacklem uint64_t reserved_48_63 : 16; 891192585Srmacklem#endif 892192585Srmacklem } s; 893192585Srmacklem struct cvmx_ipd_bp_prt_red_end_cn30xx { 894192585Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 895192585Srmacklem uint64_t reserved_36_63 : 28; 896203303Srmacklem uint64_t prt_enb : 36; /**< The port corresponding to the bit position in this 897203303Srmacklem field, will allow RED to drop back when port level 898203303Srmacklem backpressure is applied to the port. The applying 899203303Srmacklem of port-level backpressure for this RED dropping 900203303Srmacklem does not take into consideration the value of 901203303Srmacklem IPD_PORTX_BP_PAGE_CNT[BP_ENB]. */ 902203303Srmacklem#else 903203303Srmacklem uint64_t prt_enb : 36; 904203303Srmacklem uint64_t reserved_36_63 : 28; 905203303Srmacklem#endif 906192585Srmacklem } cn30xx; 907192585Srmacklem struct cvmx_ipd_bp_prt_red_end_cn30xx cn31xx; 908192585Srmacklem struct cvmx_ipd_bp_prt_red_end_cn30xx cn38xx; 909191783Srmacklem struct cvmx_ipd_bp_prt_red_end_cn30xx cn38xxp2; 910191783Srmacklem struct cvmx_ipd_bp_prt_red_end_cn30xx cn50xx; 911191783Srmacklem struct cvmx_ipd_bp_prt_red_end_cn52xx { 912191783Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 913191783Srmacklem uint64_t reserved_40_63 : 24; 914191783Srmacklem uint64_t prt_enb : 40; /**< The port corresponding to the bit position in this 915191783Srmacklem field, will allow RED to drop back when port level 916191783Srmacklem backpressure is applied to the port. The applying 917191783Srmacklem of port-level backpressure for this RED dropping 918191783Srmacklem does not take into consideration the value of 919191783Srmacklem IPD_PORTX_BP_PAGE_CNT[BP_ENB]. */ 920191783Srmacklem#else 921191783Srmacklem uint64_t prt_enb : 40; 922191783Srmacklem uint64_t reserved_40_63 : 24; 923191783Srmacklem#endif 924191783Srmacklem } cn52xx; 925191783Srmacklem struct cvmx_ipd_bp_prt_red_end_cn52xx cn52xxp1; 926191783Srmacklem struct cvmx_ipd_bp_prt_red_end_cn52xx cn56xx; 927191783Srmacklem struct cvmx_ipd_bp_prt_red_end_cn52xx cn56xxp1; 928191783Srmacklem struct cvmx_ipd_bp_prt_red_end_cn30xx cn58xx; 929191783Srmacklem struct cvmx_ipd_bp_prt_red_end_cn30xx cn58xxp1; 930191783Srmacklem struct cvmx_ipd_bp_prt_red_end_s cn61xx; 931191783Srmacklem struct cvmx_ipd_bp_prt_red_end_cn63xx { 932191783Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 933191783Srmacklem uint64_t reserved_44_63 : 20; 934191783Srmacklem uint64_t prt_enb : 44; /**< The port corresponding to the bit position in this 935191783Srmacklem field will drop all NON-RAW packets to that port 936191783Srmacklem when port level backpressure is applied to that 937191783Srmacklem port. The applying of port-level backpressure for 938191783Srmacklem this dropping does not take into consideration the 939191783Srmacklem value of IPD_PORTX_BP_PAGE_CNT[BP_ENB], nor 940191783Srmacklem IPD_RED_PORT_ENABLE[PRT_ENB]. */ 941191783Srmacklem#else 942191783Srmacklem uint64_t prt_enb : 44; 943191783Srmacklem uint64_t reserved_44_63 : 20; 944191783Srmacklem#endif 945191783Srmacklem } cn63xx; 946191783Srmacklem struct cvmx_ipd_bp_prt_red_end_cn63xx cn63xxp1; 947191783Srmacklem struct cvmx_ipd_bp_prt_red_end_s cn66xx; 948191783Srmacklem struct cvmx_ipd_bp_prt_red_end_s cnf71xx; 949191783Srmacklem}; 950191783Srmacklemtypedef union cvmx_ipd_bp_prt_red_end cvmx_ipd_bp_prt_red_end_t; 951192585Srmacklem 952192585Srmacklem/** 953192585Srmacklem * cvmx_ipd_bpid#_mbuf_th 954192585Srmacklem * 955192585Srmacklem * 0x2000 2FFF 956191783Srmacklem * 957191783Srmacklem * IPD_BPIDX_MBUF_TH = IPD BPID MBUFF Threshold 958191783Srmacklem * 959192585Srmacklem * The number of MBUFFs in use by the BPID, that when exceeded, backpressure will be applied to the BPID. 960191783Srmacklem */ 961192585Srmacklemunion cvmx_ipd_bpidx_mbuf_th { 962192585Srmacklem uint64_t u64; 963192585Srmacklem struct cvmx_ipd_bpidx_mbuf_th_s { 964192585Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 965192585Srmacklem uint64_t reserved_18_63 : 46; 966192585Srmacklem uint64_t bp_enb : 1; /**< When set '1' BP will be applied, if '0' BP will 967192585Srmacklem not be applied to bpid. */ 968192585Srmacklem uint64_t page_cnt : 17; /**< The number of page pointers assigned to 969192585Srmacklem the BPID, that when exceeded will cause 970192585Srmacklem back-pressure to be applied to the BPID. 971192585Srmacklem This value is in 256 page-pointer increments, 972192585Srmacklem (i.e. 0 = 0-page-ptrs, 1 = 256-page-ptrs,..) */ 973192585Srmacklem#else 974192585Srmacklem uint64_t page_cnt : 17; 975192585Srmacklem uint64_t bp_enb : 1; 976192585Srmacklem uint64_t reserved_18_63 : 46; 977192585Srmacklem#endif 978192585Srmacklem } s; 979192585Srmacklem struct cvmx_ipd_bpidx_mbuf_th_s cn68xx; 980192585Srmacklem struct cvmx_ipd_bpidx_mbuf_th_s cn68xxp1; 981192585Srmacklem}; 982192585Srmacklemtypedef union cvmx_ipd_bpidx_mbuf_th cvmx_ipd_bpidx_mbuf_th_t; 983191783Srmacklem 984192585Srmacklem/** 985192585Srmacklem * cvmx_ipd_bpid_bp_counter# 986192585Srmacklem * 987192585Srmacklem * RESERVE SPACE UPTO 0x2FFF 988192585Srmacklem * 989191783Srmacklem * 0x3000 0x3ffff 990192585Srmacklem * 991192585Srmacklem * IPD_BPID_BP_COUNTERX = MBUF BPID Counters used to generate Back Pressure Per BPID. 992192585Srmacklem */ 993192585Srmacklemunion cvmx_ipd_bpid_bp_counterx { 994192585Srmacklem uint64_t u64; 995192585Srmacklem struct cvmx_ipd_bpid_bp_counterx_s { 996191783Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 997191783Srmacklem uint64_t reserved_25_63 : 39; 998192585Srmacklem uint64_t cnt_val : 25; /**< Number of MBUFs being used by data on this BPID. */ 999192585Srmacklem#else 1000192585Srmacklem uint64_t cnt_val : 25; 1001191783Srmacklem uint64_t reserved_25_63 : 39; 1002192585Srmacklem#endif 1003191783Srmacklem } s; 1004191783Srmacklem struct cvmx_ipd_bpid_bp_counterx_s cn68xx; 1005203303Srmacklem struct cvmx_ipd_bpid_bp_counterx_s cn68xxp1; 1006191783Srmacklem}; 1007191783Srmacklemtypedef union cvmx_ipd_bpid_bp_counterx cvmx_ipd_bpid_bp_counterx_t; 1008191783Srmacklem 1009191783Srmacklem/** 1010191783Srmacklem * cvmx_ipd_clk_count 1011191783Srmacklem * 1012191783Srmacklem * IPD_CLK_COUNT = IPD Clock Count 1013191783Srmacklem * 1014191783Srmacklem * Counts the number of core clocks periods since the de-asserition of reset. 1015191783Srmacklem */ 1016191783Srmacklemunion cvmx_ipd_clk_count { 1017191783Srmacklem uint64_t u64; 1018191783Srmacklem struct cvmx_ipd_clk_count_s { 1019191783Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 1020191783Srmacklem uint64_t clk_cnt : 64; /**< This counter will be zeroed when reset is applied 1021191783Srmacklem and will increment every rising edge of the 1022191783Srmacklem core-clock. */ 1023191783Srmacklem#else 1024191783Srmacklem uint64_t clk_cnt : 64; 1025191783Srmacklem#endif 1026191783Srmacklem } s; 1027191990Sattilio struct cvmx_ipd_clk_count_s cn30xx; 1028191783Srmacklem struct cvmx_ipd_clk_count_s cn31xx; 1029191783Srmacklem struct cvmx_ipd_clk_count_s cn38xx; 1030191783Srmacklem struct cvmx_ipd_clk_count_s cn38xxp2; 1031191783Srmacklem struct cvmx_ipd_clk_count_s cn50xx; 1032191783Srmacklem struct cvmx_ipd_clk_count_s cn52xx; 1033191783Srmacklem struct cvmx_ipd_clk_count_s cn52xxp1; 1034191783Srmacklem struct cvmx_ipd_clk_count_s cn56xx; 1035191783Srmacklem struct cvmx_ipd_clk_count_s cn56xxp1; 1036191783Srmacklem struct cvmx_ipd_clk_count_s cn58xx; 1037191783Srmacklem struct cvmx_ipd_clk_count_s cn58xxp1; 1038191783Srmacklem struct cvmx_ipd_clk_count_s cn61xx; 1039191783Srmacklem struct cvmx_ipd_clk_count_s cn63xx; 1040191783Srmacklem struct cvmx_ipd_clk_count_s cn63xxp1; 1041191783Srmacklem struct cvmx_ipd_clk_count_s cn66xx; 1042191783Srmacklem struct cvmx_ipd_clk_count_s cn68xx; 1043191783Srmacklem struct cvmx_ipd_clk_count_s cn68xxp1; 1044191783Srmacklem struct cvmx_ipd_clk_count_s cnf71xx; 1045191783Srmacklem}; 1046191783Srmacklemtypedef union cvmx_ipd_clk_count cvmx_ipd_clk_count_t; 1047191783Srmacklem 1048203303Srmacklem/** 1049203303Srmacklem * cvmx_ipd_credits 1050191783Srmacklem * 1051191783Srmacklem * IPD_CREDITS = IPD Credits 1052191783Srmacklem * 1053195762Srmacklem * The credits allowed for IPD. 1054191783Srmacklem */ 1055191783Srmacklemunion cvmx_ipd_credits { 1056191783Srmacklem uint64_t u64; 1057191783Srmacklem struct cvmx_ipd_credits_s { 1058191783Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 1059191783Srmacklem uint64_t reserved_16_63 : 48; 1060191783Srmacklem uint64_t iob_wrc : 8; /**< The present number of credits available for 1061191783Srmacklem stores to the IOB. */ 1062191783Srmacklem uint64_t iob_wr : 8; /**< The number of command credits the IPD has to send 1063191783Srmacklem stores to the IOB. Legal values for this field 1064191783Srmacklem are 1-8 (a value of 0 will be treated as a 1 and 1065191783Srmacklem a value greater than 8 will be treated as an 8. */ 1066191783Srmacklem#else 1067191783Srmacklem uint64_t iob_wr : 8; 1068191783Srmacklem uint64_t iob_wrc : 8; 1069191783Srmacklem uint64_t reserved_16_63 : 48; 1070191783Srmacklem#endif 1071191783Srmacklem } s; 1072191783Srmacklem struct cvmx_ipd_credits_s cn68xx; 1073191783Srmacklem struct cvmx_ipd_credits_s cn68xxp1; 1074191783Srmacklem}; 1075192675Srmacklemtypedef union cvmx_ipd_credits cvmx_ipd_credits_t; 1076191783Srmacklem 1077192675Srmacklem/** 1078192675Srmacklem * cvmx_ipd_ctl_status 1079192675Srmacklem * 1080192675Srmacklem * IPD_CTL_STATUS = IPD's Control Status Register 1081192675Srmacklem * 1082192675Srmacklem * The number of words in a MBUFF used for packet data store. 1083192675Srmacklem */ 1084191783Srmacklemunion cvmx_ipd_ctl_status { 1085192675Srmacklem uint64_t u64; 1086191783Srmacklem struct cvmx_ipd_ctl_status_s { 1087191783Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 1088192675Srmacklem uint64_t reserved_18_63 : 46; 1089191783Srmacklem uint64_t use_sop : 1; /**< When '1' the SOP sent by the MAC will be used in 1090191783Srmacklem place of the SOP generated by the IPD. */ 1091191783Srmacklem uint64_t rst_done : 1; /**< When '0' IPD has finished reset. No access 1092191783Srmacklem except the reading of this bit should occur to the 1093191783Srmacklem IPD until this is asserted. Or a 1000 core clock 1094191783Srmacklem cycles has passed after the de-assertion of reset. */ 1095191783Srmacklem uint64_t clken : 1; /**< Controls the conditional clocking within IPD 1096191783Srmacklem 0=Allow HW to control the clocks 1097191783Srmacklem 1=Force the clocks to be always on */ 1098191783Srmacklem uint64_t no_wptr : 1; /**< When set '1' the WQE pointers will not be used and 1099191783Srmacklem the WQE will be located at the front of the packet. 1100191783Srmacklem When set: 1101191783Srmacklem - IPD_WQE_FPA_QUEUE[WQE_QUE] is not used 1102191783Srmacklem - IPD_1ST_MBUFF_SKIP[SKIP_SZ] must be at least 16 1103191783Srmacklem - If 16 <= IPD_1ST_MBUFF_SKIP[SKIP_SZ] <= 31 then 1104191783Srmacklem the WQE will be written into the first 128B 1105191783Srmacklem cache block in the first buffer that contains 1106191783Srmacklem the packet. 1107191783Srmacklem - If IPD_1ST_MBUFF_SKIP[SKIP_SZ] == 32 then 1108191783Srmacklem the WQE will be written into the second 128B 1109191783Srmacklem cache block in the first buffer that contains 1110191783Srmacklem the packet. */ 1111191783Srmacklem uint64_t pq_apkt : 1; /**< When set IPD_PORT_QOS_X_CNT WILL be incremented 1112191783Srmacklem by one for every work queue entry that is sent to 1113191783Srmacklem POW. */ 1114191783Srmacklem uint64_t pq_nabuf : 1; /**< When set IPD_PORT_QOS_X_CNT WILL NOT be 1115191783Srmacklem incremented when IPD allocates a buffer for a 1116191783Srmacklem packet. */ 1117203303Srmacklem uint64_t ipd_full : 1; /**< When clear '0' the IPD acts normaly. 1118191783Srmacklem When set '1' the IPD drive the IPD_BUFF_FULL line to 1119192585Srmacklem the IOB-arbiter, telling it to not give grants to 1120192585Srmacklem NCB devices sending packet data. */ 1121191783Srmacklem uint64_t pkt_off : 1; /**< When clear '0' the IPD working normaly, 1122191783Srmacklem buffering the received packet data. When set '1' 1123191783Srmacklem the IPD will not buffer the received packet data. */ 1124191783Srmacklem uint64_t len_m8 : 1; /**< Setting of this bit will subtract 8 from the 1125191783Srmacklem data-length field in the header written to the 1126191783Srmacklem POW and the top of a MBUFF. 1127191783Srmacklem OCTEAN generates a length that includes the 1128191783Srmacklem length of the data + 8 for the header-field. By 1129191783Srmacklem setting this bit the 8 for the instr-field will 1130191783Srmacklem not be included in the length field of the header. 1131191783Srmacklem NOTE: IPD is compliant with the spec when this 1132191783Srmacklem field is '1'. */ 1133191783Srmacklem uint64_t reset : 1; /**< When set '1' causes a reset of the IPD, except 1134191783Srmacklem RSL. */ 1135191783Srmacklem uint64_t addpkt : 1; /**< When IPD_CTL_STATUS[ADDPKT] is set, 1136191783Srmacklem IPD_PORT_BP_COUNTERS_PAIR(port)[CNT_VAL], 1137191783Srmacklem IPD_PORT_BP_COUNTERS2_PAIR(port)[CNT_VAL] and 1138191783Srmacklem IPD_PORT_BP_COUNTERS3_PAIR(port)[CNT_VAL] 1139191783Srmacklem WILL be incremented by one for every work 1140191783Srmacklem queue entry that is sent to POW. */ 1141191783Srmacklem uint64_t naddbuf : 1; /**< When IPD_CTL_STATUS[NADDBUF] is set, 1142191783Srmacklem IPD_PORT_BP_COUNTERS_PAIR(port)[CNT_VAL], 1143191783Srmacklem IPD_PORT_BP_COUNTERS2_PAIR(port)[CNT_VAL] and 1144191783Srmacklem IPD_PORT_BP_COUNTERS3_PAIR(port)[CNT_VAL] 1145191783Srmacklem WILL NOT be incremented when IPD allocates a 1146191783Srmacklem buffer for a packet on the port. */ 1147191783Srmacklem uint64_t pkt_lend : 1; /**< Changes PKT to little endian writes to L2C */ 1148191783Srmacklem uint64_t wqe_lend : 1; /**< Changes WQE to little endian writes to L2C */ 1149191783Srmacklem uint64_t pbp_en : 1; /**< Port back pressure enable. When set '1' enables 1150191783Srmacklem the sending of port level backpressure to the 1151191783Srmacklem Octane input-ports. The application should NOT 1152191783Srmacklem de-assert this bit after asserting it. The 1153191783Srmacklem receivers of this bit may have been put into 1154191783Srmacklem backpressure mode and can only be released by 1155191783Srmacklem IPD informing them that the backpressure has 1156191783Srmacklem been released. 1157191783Srmacklem GMXX_INF_MODE[EN] must be set to '1' for each 1158191783Srmacklem packet interface which requires port back pressure 1159191783Srmacklem prior to setting PBP_EN to '1'. */ 1160191783Srmacklem cvmx_ipd_mode_t opc_mode : 2; /**< 0 ==> All packet data (and next buffer pointers) 1161191783Srmacklem is written through to memory. 1162191783Srmacklem 1 ==> All packet data (and next buffer pointers) is 1163191783Srmacklem written into the cache. 1164191783Srmacklem 2 ==> The first aligned cache block holding the 1165191783Srmacklem packet data (and initial next buffer pointer) is 1166191783Srmacklem written to the L2 cache, all remaining cache blocks 1167191783Srmacklem are not written to the L2 cache. 1168191783Srmacklem 3 ==> The first two aligned cache blocks holding 1169191783Srmacklem the packet data (and initial next buffer pointer) 1170191783Srmacklem are written to the L2 cache, all remaining cache 1171191783Srmacklem blocks are not written to the L2 cache. */ 1172191783Srmacklem uint64_t ipd_en : 1; /**< When set '1' enable the operation of the IPD. 1173191783Srmacklem When clear '0', the IPD will appear to the 1174191783Srmacklem IOB-arbiter to be applying backpressure, this 1175191783Srmacklem causes the IOB-Arbiter to not send grants to NCB 1176191783Srmacklem devices requesting to send packet data to the IPD. */ 1177191783Srmacklem#else 1178191783Srmacklem uint64_t ipd_en : 1; 1179191783Srmacklem cvmx_ipd_mode_t opc_mode : 2; 1180191783Srmacklem uint64_t pbp_en : 1; 1181191783Srmacklem uint64_t wqe_lend : 1; 1182191783Srmacklem uint64_t pkt_lend : 1; 1183191783Srmacklem uint64_t naddbuf : 1; 1184191783Srmacklem uint64_t addpkt : 1; 1185191783Srmacklem uint64_t reset : 1; 1186191783Srmacklem uint64_t len_m8 : 1; 1187191783Srmacklem uint64_t pkt_off : 1; 1188191783Srmacklem uint64_t ipd_full : 1; 1189191783Srmacklem uint64_t pq_nabuf : 1; 1190191783Srmacklem uint64_t pq_apkt : 1; 1191191783Srmacklem uint64_t no_wptr : 1; 1192191783Srmacklem uint64_t clken : 1; 1193191783Srmacklem uint64_t rst_done : 1; 1194191783Srmacklem uint64_t use_sop : 1; 1195191783Srmacklem uint64_t reserved_18_63 : 46; 1196191783Srmacklem#endif 1197191783Srmacklem } s; 1198191783Srmacklem struct cvmx_ipd_ctl_status_cn30xx { 1199195762Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 1200195762Srmacklem uint64_t reserved_10_63 : 54; 1201195762Srmacklem uint64_t len_m8 : 1; /**< Setting of this bit will subtract 8 from the 1202195762Srmacklem data-length field in the header written wo the 1203195762Srmacklem POW and the top of a MBUFF. 1204195762Srmacklem OCTEAN generates a length that includes the 1205191783Srmacklem length of the data + 8 for the header-field. By 1206191783Srmacklem setting this bit the 8 for the instr-field will 1207191783Srmacklem not be included in the length field of the header. 1208191783Srmacklem NOTE: IPD is compliant with the spec when this 1209191783Srmacklem field is '1'. */ 1210191783Srmacklem uint64_t reset : 1; /**< When set '1' causes a reset of the IPD, except 1211191783Srmacklem RSL. */ 1212191783Srmacklem uint64_t addpkt : 1; /**< When IPD_CTL_STATUS[ADDPKT] is set, 1213191783Srmacklem IPD_PORT_BP_COUNTERS_PAIR(port)[CNT_VAL] 1214191783Srmacklem WILL be incremented by one for every work 1215191783Srmacklem queue entry that is sent to POW. */ 1216191783Srmacklem uint64_t naddbuf : 1; /**< When IPD_CTL_STATUS[NADDBUF] is set, 1217191783Srmacklem IPD_PORT_BP_COUNTERS_PAIR(port)[CNT_VAL] 1218191783Srmacklem WILL NOT be incremented when IPD allocates a 1219191783Srmacklem buffer for a packet on the port. */ 1220191783Srmacklem uint64_t pkt_lend : 1; /**< Changes PKT to little endian writes to L2C */ 1221191783Srmacklem uint64_t wqe_lend : 1; /**< Changes WQE to little endian writes to L2C */ 1222191783Srmacklem uint64_t pbp_en : 1; /**< Port back pressure enable. When set '1' enables 1223191783Srmacklem the sending of port level backpressure to the 1224191783Srmacklem Octane input-ports. Once enabled the sending of 1225191783Srmacklem port-level-backpressure can not be disabled by 1226191783Srmacklem changing the value of this bit. 1227191783Srmacklem GMXX_INF_MODE[EN] must be set to '1' for each 1228191783Srmacklem packet interface which requires port back pressure 1229191783Srmacklem prior to setting PBP_EN to '1'. */ 1230191783Srmacklem cvmx_ipd_mode_t opc_mode : 2; /**< 0 ==> All packet data (and next buffer pointers) 1231191783Srmacklem is written through to memory. 1232191783Srmacklem 1 ==> All packet data (and next buffer pointers) is 1233191783Srmacklem written into the cache. 1234191783Srmacklem 2 ==> The first aligned cache block holding the 1235191783Srmacklem packet data (and initial next buffer pointer) is 1236191783Srmacklem written to the L2 cache, all remaining cache blocks 1237191783Srmacklem are not written to the L2 cache. 1238191783Srmacklem 3 ==> The first two aligned cache blocks holding 1239191783Srmacklem the packet data (and initial next buffer pointer) 1240191783Srmacklem are written to the L2 cache, all remaining cache 1241191783Srmacklem blocks are not written to the L2 cache. */ 1242191783Srmacklem uint64_t ipd_en : 1; /**< When set '1' enable the operation of the IPD. */ 1243191783Srmacklem#else 1244191783Srmacklem uint64_t ipd_en : 1; 1245191783Srmacklem cvmx_ipd_mode_t opc_mode : 2; 1246191783Srmacklem uint64_t pbp_en : 1; 1247191783Srmacklem uint64_t wqe_lend : 1; 1248191783Srmacklem uint64_t pkt_lend : 1; 1249191783Srmacklem uint64_t naddbuf : 1; 1250191783Srmacklem uint64_t addpkt : 1; 1251191783Srmacklem uint64_t reset : 1; 1252191783Srmacklem uint64_t len_m8 : 1; 1253191783Srmacklem uint64_t reserved_10_63 : 54; 1254191783Srmacklem#endif 1255191783Srmacklem } cn30xx; 1256191783Srmacklem struct cvmx_ipd_ctl_status_cn30xx cn31xx; 1257191783Srmacklem struct cvmx_ipd_ctl_status_cn30xx cn38xx; 1258191990Sattilio struct cvmx_ipd_ctl_status_cn38xxp2 { 1259191783Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 1260191990Sattilio uint64_t reserved_9_63 : 55; 1261191783Srmacklem uint64_t reset : 1; /**< When set '1' causes a reset of the IPD, except 1262191783Srmacklem RSL. */ 1263191783Srmacklem uint64_t addpkt : 1; /**< When IPD_CTL_STATUS[ADDPKT] is set, 1264191990Sattilio IPD_PORT_BP_COUNTERS_PAIR(port)[CNT_VAL] 1265191990Sattilio WILL be incremented by one for every work 1266191783Srmacklem queue entry that is sent to POW. 1267191783Srmacklem PASS-2 Field. */ 1268191783Srmacklem uint64_t naddbuf : 1; /**< When IPD_CTL_STATUS[NADDBUF] is set, 1269191783Srmacklem IPD_PORT_BP_COUNTERS_PAIR(port)[CNT_VAL] 1270191783Srmacklem WILL NOT be incremented when IPD allocates a 1271191783Srmacklem buffer for a packet on the port. 1272191783Srmacklem PASS-2 Field. */ 1273191783Srmacklem uint64_t pkt_lend : 1; /**< Changes PKT to little endian writes to L2C */ 1274191783Srmacklem uint64_t wqe_lend : 1; /**< Changes WQE to little endian writes to L2C */ 1275191783Srmacklem uint64_t pbp_en : 1; /**< Port back pressure enable. When set '1' enables 1276191783Srmacklem the sending of port level backpressure to the 1277191783Srmacklem Octane input-ports. Once enabled the sending of 1278191783Srmacklem port-level-backpressure can not be disabled by 1279191783Srmacklem changing the value of this bit. */ 1280191783Srmacklem cvmx_ipd_mode_t opc_mode : 2; /**< 0 ==> All packet data (and next buffer pointers) 1281191783Srmacklem is written through to memory. 1282191783Srmacklem 1 ==> All packet data (and next buffer pointers) is 1283191783Srmacklem written into the cache. 1284191783Srmacklem 2 ==> The first aligned cache block holding the 1285191783Srmacklem packet data (and initial next buffer pointer) is 1286191783Srmacklem written to the L2 cache, all remaining cache blocks 1287191783Srmacklem are not written to the L2 cache. 1288191783Srmacklem 3 ==> The first two aligned cache blocks holding 1289191783Srmacklem the packet data (and initial next buffer pointer) 1290191783Srmacklem are written to the L2 cache, all remaining cache 1291191783Srmacklem blocks are not written to the L2 cache. */ 1292191783Srmacklem uint64_t ipd_en : 1; /**< When set '1' enable the operation of the IPD. */ 1293191783Srmacklem#else 1294191783Srmacklem uint64_t ipd_en : 1; 1295191783Srmacklem cvmx_ipd_mode_t opc_mode : 2; 1296191783Srmacklem uint64_t pbp_en : 1; 1297191783Srmacklem uint64_t wqe_lend : 1; 1298191783Srmacklem uint64_t pkt_lend : 1; 1299191783Srmacklem uint64_t naddbuf : 1; 1300191783Srmacklem uint64_t addpkt : 1; 1301191783Srmacklem uint64_t reset : 1; 1302191783Srmacklem uint64_t reserved_9_63 : 55; 1303191783Srmacklem#endif 1304191783Srmacklem } cn38xxp2; 1305191783Srmacklem struct cvmx_ipd_ctl_status_cn50xx { 1306191783Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 1307191783Srmacklem uint64_t reserved_15_63 : 49; 1308191783Srmacklem uint64_t no_wptr : 1; /**< When set '1' the WQE pointers will not be used and 1309191783Srmacklem the WQE will be located at the front of the packet. */ 1310191783Srmacklem uint64_t pq_apkt : 1; /**< Reserved. */ 1311191783Srmacklem uint64_t pq_nabuf : 1; /**< Reserved. */ 1312191990Sattilio uint64_t ipd_full : 1; /**< When clear '0' the IPD acts normaly. 1313191783Srmacklem When set '1' the IPD drive the IPD_BUFF_FULL line to 1314191783Srmacklem the IOB-arbiter, telling it to not give grants to 1315191783Srmacklem NCB devices sending packet data. */ 1316191783Srmacklem uint64_t pkt_off : 1; /**< When clear '0' the IPD working normaly, 1317191783Srmacklem buffering the received packet data. When set '1' 1318191783Srmacklem the IPD will not buffer the received packet data. */ 1319191783Srmacklem uint64_t len_m8 : 1; /**< Setting of this bit will subtract 8 from the 1320191783Srmacklem data-length field in the header written wo the 1321191783Srmacklem POW and the top of a MBUFF. 1322191783Srmacklem OCTEAN generates a length that includes the 1323191783Srmacklem length of the data + 8 for the header-field. By 1324191783Srmacklem setting this bit the 8 for the instr-field will 1325191783Srmacklem not be included in the length field of the header. 1326191783Srmacklem NOTE: IPD is compliant with the spec when this 1327191783Srmacklem field is '1'. */ 1328191783Srmacklem uint64_t reset : 1; /**< When set '1' causes a reset of the IPD, except 1329191783Srmacklem RSL. */ 1330191783Srmacklem uint64_t addpkt : 1; /**< When IPD_CTL_STATUS[ADDPKT] is set, 1331191783Srmacklem IPD_PORT_BP_COUNTERS_PAIR(port)[CNT_VAL] 1332191783Srmacklem WILL be incremented by one for every work 1333191783Srmacklem queue entry that is sent to POW. */ 1334191783Srmacklem uint64_t naddbuf : 1; /**< When IPD_CTL_STATUS[NADDBUF] is set, 1335191783Srmacklem IPD_PORT_BP_COUNTERS_PAIR(port)[CNT_VAL] 1336191783Srmacklem WILL NOT be incremented when IPD allocates a 1337191783Srmacklem buffer for a packet on the port. */ 1338191783Srmacklem uint64_t pkt_lend : 1; /**< Changes PKT to little endian writes to L2C */ 1339191783Srmacklem uint64_t wqe_lend : 1; /**< Changes WQE to little endian writes to L2C */ 1340191783Srmacklem uint64_t pbp_en : 1; /**< Port back pressure enable. When set '1' enables 1341191783Srmacklem the sending of port level backpressure to the 1342191783Srmacklem Octane input-ports. Once enabled the sending of 1343191783Srmacklem port-level-backpressure can not be disabled by 1344191783Srmacklem changing the value of this bit. 1345191990Sattilio GMXX_INF_MODE[EN] must be set to '1' for each 1346191783Srmacklem packet interface which requires port back pressure 1347191783Srmacklem prior to setting PBP_EN to '1'. */ 1348191990Sattilio cvmx_ipd_mode_t opc_mode : 2; /**< 0 ==> All packet data (and next buffer pointers) 1349191783Srmacklem is written through to memory. 1350191783Srmacklem 1 ==> All packet data (and next buffer pointers) is 1351191990Sattilio written into the cache. 1352191990Sattilio 2 ==> The first aligned cache block holding the 1353191783Srmacklem packet data (and initial next buffer pointer) is 1354191783Srmacklem written to the L2 cache, all remaining cache blocks 1355191783Srmacklem are not written to the L2 cache. 1356191783Srmacklem 3 ==> The first two aligned cache blocks holding 1357191783Srmacklem the packet data (and initial next buffer pointer) 1358191783Srmacklem are written to the L2 cache, all remaining cache 1359191783Srmacklem blocks are not written to the L2 cache. */ 1360191783Srmacklem uint64_t ipd_en : 1; /**< When set '1' enable the operation of the IPD. 1361191783Srmacklem When clear '0', the IPD will appear to the 1362191783Srmacklem IOB-arbiter to be applying backpressure, this 1363191783Srmacklem causes the IOB-Arbiter to not send grants to NCB 1364191783Srmacklem devices requesting to send packet data to the IPD. */ 1365191783Srmacklem#else 1366191783Srmacklem uint64_t ipd_en : 1; 1367191783Srmacklem cvmx_ipd_mode_t opc_mode : 2; 1368191783Srmacklem uint64_t pbp_en : 1; 1369191783Srmacklem uint64_t wqe_lend : 1; 1370191783Srmacklem uint64_t pkt_lend : 1; 1371191783Srmacklem uint64_t naddbuf : 1; 1372191783Srmacklem uint64_t addpkt : 1; 1373191783Srmacklem uint64_t reset : 1; 1374191783Srmacklem uint64_t len_m8 : 1; 1375191783Srmacklem uint64_t pkt_off : 1; 1376191783Srmacklem uint64_t ipd_full : 1; 1377191783Srmacklem uint64_t pq_nabuf : 1; 1378191783Srmacklem uint64_t pq_apkt : 1; 1379191783Srmacklem uint64_t no_wptr : 1; 1380191783Srmacklem uint64_t reserved_15_63 : 49; 1381191783Srmacklem#endif 1382191783Srmacklem } cn50xx; 1383191783Srmacklem struct cvmx_ipd_ctl_status_cn50xx cn52xx; 1384191783Srmacklem struct cvmx_ipd_ctl_status_cn50xx cn52xxp1; 1385191783Srmacklem struct cvmx_ipd_ctl_status_cn50xx cn56xx; 1386191783Srmacklem struct cvmx_ipd_ctl_status_cn50xx cn56xxp1; 1387191783Srmacklem struct cvmx_ipd_ctl_status_cn58xx { 1388191783Srmacklem#ifdef __BIG_ENDIAN_BITFIELD 1389191783Srmacklem uint64_t reserved_12_63 : 52; 1390191783Srmacklem uint64_t ipd_full : 1; /**< When clear '0' the IPD acts normaly. 1391191783Srmacklem When set '1' the IPD drive the IPD_BUFF_FULL line to 1392191783Srmacklem the IOB-arbiter, telling it to not give grants to 1393191783Srmacklem NCB devices sending packet data. */ 1394191783Srmacklem uint64_t pkt_off : 1; /**< When clear '0' the IPD working normaly, 1395191783Srmacklem buffering the received packet data. When set '1' 1396191783Srmacklem the IPD will not buffer the received packet data. */ 1397191783Srmacklem uint64_t len_m8 : 1; /**< Setting of this bit will subtract 8 from the 1398191783Srmacklem data-length field in the header written wo the 1399191783Srmacklem POW and the top of a MBUFF. 1400191783Srmacklem OCTEAN PASS2 generates a length that includes the 1401191783Srmacklem length of the data + 8 for the header-field. By 1402191783Srmacklem setting this bit the 8 for the instr-field will 1403191783Srmacklem not be included in the length field of the header. 1404191783Srmacklem NOTE: IPD is compliant with the spec when this 1405191783Srmacklem field is '1'. */ 1406191783Srmacklem uint64_t reset : 1; /**< When set '1' causes a reset of the IPD, except 1407191783Srmacklem RSL. */ 1408191783Srmacklem uint64_t addpkt : 1; /**< When IPD_CTL_STATUS[ADDPKT] is set, 1409191783Srmacklem IPD_PORT_BP_COUNTERS_PAIR(port)[CNT_VAL] 1410191783Srmacklem WILL be incremented by one for every work 1411191783Srmacklem queue entry that is sent to POW. 1412191783Srmacklem PASS-2 Field. */ 1413191783Srmacklem uint64_t naddbuf : 1; /**< When IPD_CTL_STATUS[NADDBUF] is set, 1414191783Srmacklem IPD_PORT_BP_COUNTERS_PAIR(port)[CNT_VAL] 1415191783Srmacklem WILL NOT be incremented when IPD allocates a 1416191783Srmacklem buffer for a packet on the port. 1417191783Srmacklem PASS-2 Field. */ 1418191783Srmacklem uint64_t pkt_lend : 1; /**< Changes PKT to little endian writes to L2C */ 1419191783Srmacklem uint64_t wqe_lend : 1; /**< Changes WQE to little endian writes to L2C */ 1420191783Srmacklem uint64_t pbp_en : 1; /**< Port back pressure enable. When set '1' enables 1421191783Srmacklem the sending of port level backpressure to the 1422191783Srmacklem Octane input-ports. Once enabled the sending of 1423191783Srmacklem port-level-backpressure can not be disabled by 1424191783Srmacklem changing the value of this bit. */ 1425191783Srmacklem cvmx_ipd_mode_t opc_mode : 2; /**< 0 ==> All packet data (and next buffer pointers) 1426191783Srmacklem is written through to memory. 1427191783Srmacklem 1 ==> All packet data (and next buffer pointers) is 1428191783Srmacklem written into the cache. 1429191783Srmacklem 2 ==> The first aligned cache block holding the 1430191783Srmacklem packet data (and initial next buffer pointer) is 1431191783Srmacklem written to the L2 cache, all remaining cache blocks 1432191783Srmacklem are not written to the L2 cache. 1433191783Srmacklem 3 ==> The first two aligned cache blocks holding 1434191783Srmacklem the packet data (and initial next buffer pointer) 1435191783Srmacklem are written to the L2 cache, all remaining cache 1436191783Srmacklem blocks are not written to the L2 cache. */ 1437191783Srmacklem uint64_t ipd_en : 1; /**< When set '1' enable the operation of the IPD. 1438191783Srmacklem When clear '0', the IPD will appear to the 1439191783Srmacklem IOB-arbiter to be applying backpressure, this 1440191783Srmacklem causes the IOB-Arbiter to not send grants to NCB 1441191783Srmacklem devices requesting to send packet data to the IPD. */ 1442191783Srmacklem#else 1443191783Srmacklem uint64_t ipd_en : 1; 1444191783Srmacklem cvmx_ipd_mode_t opc_mode : 2; 1445191783Srmacklem uint64_t pbp_en : 1; 1446191783Srmacklem uint64_t wqe_lend : 1; 1447191783Srmacklem uint64_t pkt_lend : 1; 1448191783Srmacklem uint64_t naddbuf : 1; 1449191783Srmacklem uint64_t addpkt : 1; 1450 uint64_t reset : 1; 1451 uint64_t len_m8 : 1; 1452 uint64_t pkt_off : 1; 1453 uint64_t ipd_full : 1; 1454 uint64_t reserved_12_63 : 52; 1455#endif 1456 } cn58xx; 1457 struct cvmx_ipd_ctl_status_cn58xx cn58xxp1; 1458 struct cvmx_ipd_ctl_status_s cn61xx; 1459 struct cvmx_ipd_ctl_status_s cn63xx; 1460 struct cvmx_ipd_ctl_status_cn63xxp1 { 1461#ifdef __BIG_ENDIAN_BITFIELD 1462 uint64_t reserved_16_63 : 48; 1463 uint64_t clken : 1; /**< Controls the conditional clocking within IPD 1464 0=Allow HW to control the clocks 1465 1=Force the clocks to be always on */ 1466 uint64_t no_wptr : 1; /**< When set '1' the WQE pointers will not be used and 1467 the WQE will be located at the front of the packet. 1468 When set: 1469 - IPD_WQE_FPA_QUEUE[WQE_QUE] is not used 1470 - IPD_1ST_MBUFF_SKIP[SKIP_SZ] must be at least 16 1471 - If 16 <= IPD_1ST_MBUFF_SKIP[SKIP_SZ] <= 31 then 1472 the WQE will be written into the first 128B 1473 cache block in the first buffer that contains 1474 the packet. 1475 - If IPD_1ST_MBUFF_SKIP[SKIP_SZ] == 32 then 1476 the WQE will be written into the second 128B 1477 cache block in the first buffer that contains 1478 the packet. */ 1479 uint64_t pq_apkt : 1; /**< When set IPD_PORT_QOS_X_CNT WILL be incremented 1480 by one for every work queue entry that is sent to 1481 POW. */ 1482 uint64_t pq_nabuf : 1; /**< When set IPD_PORT_QOS_X_CNT WILL NOT be 1483 incremented when IPD allocates a buffer for a 1484 packet. */ 1485 uint64_t ipd_full : 1; /**< When clear '0' the IPD acts normaly. 1486 When set '1' the IPD drive the IPD_BUFF_FULL line to 1487 the IOB-arbiter, telling it to not give grants to 1488 NCB devices sending packet data. */ 1489 uint64_t pkt_off : 1; /**< When clear '0' the IPD working normaly, 1490 buffering the received packet data. When set '1' 1491 the IPD will not buffer the received packet data. */ 1492 uint64_t len_m8 : 1; /**< Setting of this bit will subtract 8 from the 1493 data-length field in the header written to the 1494 POW and the top of a MBUFF. 1495 OCTEAN generates a length that includes the 1496 length of the data + 8 for the header-field. By 1497 setting this bit the 8 for the instr-field will 1498 not be included in the length field of the header. 1499 NOTE: IPD is compliant with the spec when this 1500 field is '1'. */ 1501 uint64_t reset : 1; /**< When set '1' causes a reset of the IPD, except 1502 RSL. */ 1503 uint64_t addpkt : 1; /**< When IPD_CTL_STATUS[ADDPKT] is set, 1504 IPD_PORT_BP_COUNTERS_PAIR(port)[CNT_VAL], 1505 IPD_PORT_BP_COUNTERS2_PAIR(port)[CNT_VAL] and 1506 IPD_PORT_BP_COUNTERS3_PAIR(port)[CNT_VAL] 1507 WILL be incremented by one for every work 1508 queue entry that is sent to POW. */ 1509 uint64_t naddbuf : 1; /**< When IPD_CTL_STATUS[NADDBUF] is set, 1510 IPD_PORT_BP_COUNTERS_PAIR(port)[CNT_VAL], 1511 IPD_PORT_BP_COUNTERS2_PAIR(port)[CNT_VAL] and 1512 IPD_PORT_BP_COUNTERS3_PAIR(port)[CNT_VAL] 1513 WILL NOT be incremented when IPD allocates a 1514 buffer for a packet on the port. */ 1515 uint64_t pkt_lend : 1; /**< Changes PKT to little endian writes to L2C */ 1516 uint64_t wqe_lend : 1; /**< Changes WQE to little endian writes to L2C */ 1517 uint64_t pbp_en : 1; /**< Port back pressure enable. When set '1' enables 1518 the sending of port level backpressure to the 1519 Octane input-ports. The application should NOT 1520 de-assert this bit after asserting it. The 1521 receivers of this bit may have been put into 1522 backpressure mode and can only be released by 1523 IPD informing them that the backpressure has 1524 been released. 1525 GMXX_INF_MODE[EN] must be set to '1' for each 1526 packet interface which requires port back pressure 1527 prior to setting PBP_EN to '1'. */ 1528 cvmx_ipd_mode_t opc_mode : 2; /**< 0 ==> All packet data (and next buffer pointers) 1529 is written through to memory. 1530 1 ==> All packet data (and next buffer pointers) is 1531 written into the cache. 1532 2 ==> The first aligned cache block holding the 1533 packet data (and initial next buffer pointer) is 1534 written to the L2 cache, all remaining cache blocks 1535 are not written to the L2 cache. 1536 3 ==> The first two aligned cache blocks holding 1537 the packet data (and initial next buffer pointer) 1538 are written to the L2 cache, all remaining cache 1539 blocks are not written to the L2 cache. */ 1540 uint64_t ipd_en : 1; /**< When set '1' enable the operation of the IPD. 1541 When clear '0', the IPD will appear to the 1542 IOB-arbiter to be applying backpressure, this 1543 causes the IOB-Arbiter to not send grants to NCB 1544 devices requesting to send packet data to the IPD. */ 1545#else 1546 uint64_t ipd_en : 1; 1547 cvmx_ipd_mode_t opc_mode : 2; 1548 uint64_t pbp_en : 1; 1549 uint64_t wqe_lend : 1; 1550 uint64_t pkt_lend : 1; 1551 uint64_t naddbuf : 1; 1552 uint64_t addpkt : 1; 1553 uint64_t reset : 1; 1554 uint64_t len_m8 : 1; 1555 uint64_t pkt_off : 1; 1556 uint64_t ipd_full : 1; 1557 uint64_t pq_nabuf : 1; 1558 uint64_t pq_apkt : 1; 1559 uint64_t no_wptr : 1; 1560 uint64_t clken : 1; 1561 uint64_t reserved_16_63 : 48; 1562#endif 1563 } cn63xxp1; 1564 struct cvmx_ipd_ctl_status_s cn66xx; 1565 struct cvmx_ipd_ctl_status_s cn68xx; 1566 struct cvmx_ipd_ctl_status_s cn68xxp1; 1567 struct cvmx_ipd_ctl_status_s cnf71xx; 1568}; 1569typedef union cvmx_ipd_ctl_status cvmx_ipd_ctl_status_t; 1570 1571/** 1572 * cvmx_ipd_ecc_ctl 1573 * 1574 * IPD_ECC_CTL = IPD ECC Control 1575 * 1576 * Allows inserting ECC errors for testing. 1577 */ 1578union cvmx_ipd_ecc_ctl { 1579 uint64_t u64; 1580 struct cvmx_ipd_ecc_ctl_s { 1581#ifdef __BIG_ENDIAN_BITFIELD 1582 uint64_t reserved_8_63 : 56; 1583 uint64_t pm3_syn : 2; /**< Flip the syndrom to generate 1-bit/2-bits error 1584 for testing of Packet Memory 3. 1585 2'b00 : No Error Generation 1586 2'b10, 2'b01: Flip 1 bit 1587 2'b11 : Flip 2 bits */ 1588 uint64_t pm2_syn : 2; /**< Flip the syndrom to generate 1-bit/2-bits error 1589 for testing of Packet Memory 2. 1590 2'b00 : No Error Generation 1591 2'b10, 2'b01: Flip 1 bit 1592 2'b11 : Flip 2 bits */ 1593 uint64_t pm1_syn : 2; /**< Flip the syndrom to generate 1-bit/2-bits error 1594 for testing of Packet Memory 1. 1595 2'b00 : No Error Generation 1596 2'b10, 2'b01: Flip 1 bit 1597 2'b11 : Flip 2 bits */ 1598 uint64_t pm0_syn : 2; /**< Flip the syndrom to generate 1-bit/2-bits error 1599 for testing of Packet Memory 0. 1600 2'b00 : No Error Generation 1601 2'b10, 2'b01: Flip 1 bit 1602 2'b11 : Flip 2 bits */ 1603#else 1604 uint64_t pm0_syn : 2; 1605 uint64_t pm1_syn : 2; 1606 uint64_t pm2_syn : 2; 1607 uint64_t pm3_syn : 2; 1608 uint64_t reserved_8_63 : 56; 1609#endif 1610 } s; 1611 struct cvmx_ipd_ecc_ctl_s cn68xx; 1612 struct cvmx_ipd_ecc_ctl_s cn68xxp1; 1613}; 1614typedef union cvmx_ipd_ecc_ctl cvmx_ipd_ecc_ctl_t; 1615 1616/** 1617 * cvmx_ipd_free_ptr_fifo_ctl 1618 * 1619 * IPD_FREE_PTR_FIFO_CTL = IPD's FREE Pointer FIFO Control 1620 * 1621 * Allows reading of the Page-Pointers stored in the IPD's FREE Fifo. 1622 * See also the IPD_FREE_PTR_VALUE 1623 */ 1624union cvmx_ipd_free_ptr_fifo_ctl { 1625 uint64_t u64; 1626 struct cvmx_ipd_free_ptr_fifo_ctl_s { 1627#ifdef __BIG_ENDIAN_BITFIELD 1628 uint64_t reserved_32_63 : 32; 1629 uint64_t max_cnts : 7; /**< Maximum number of Packet-Pointers or WQE-Pointers 1630 that COULD be in the FIFO. 1631 When IPD_CTL_STATUS[NO_WPTR] is set '1' this field 1632 only represents the Max number of Packet-Pointers, 1633 WQE-Pointers are not used in this mode. */ 1634 uint64_t wraddr : 8; /**< Present FIFO WQE Read address. */ 1635 uint64_t praddr : 8; /**< Present FIFO Packet Read address. */ 1636 uint64_t cena : 1; /**< Active low Chip Enable to the read the 1637 pwp_fifo. This bit also controls the MUX-select 1638 that steers [RADDR] to the pwp_fifo. 1639 *WARNING - Setting this field to '0' will allow 1640 reading of the memories thorugh the PTR field, 1641 but will cause unpredictable operation of the IPD 1642 under normal operation. */ 1643 uint64_t raddr : 8; /**< Sets the address to read from in the pwp_fifo. 1644 Addresses 0 through 63 contain Packet-Pointers and 1645 addresses 64 through 127 contain WQE-Pointers. 1646 When IPD_CTL_STATUS[NO_WPTR] is set '1' addresses 1647 64 through 127 are not valid. */ 1648#else 1649 uint64_t raddr : 8; 1650 uint64_t cena : 1; 1651 uint64_t praddr : 8; 1652 uint64_t wraddr : 8; 1653 uint64_t max_cnts : 7; 1654 uint64_t reserved_32_63 : 32; 1655#endif 1656 } s; 1657 struct cvmx_ipd_free_ptr_fifo_ctl_s cn68xx; 1658 struct cvmx_ipd_free_ptr_fifo_ctl_s cn68xxp1; 1659}; 1660typedef union cvmx_ipd_free_ptr_fifo_ctl cvmx_ipd_free_ptr_fifo_ctl_t; 1661 1662/** 1663 * cvmx_ipd_free_ptr_value 1664 * 1665 * IPD_FREE_PTR_VALUE = IPD's FREE Pointer Value 1666 * 1667 * The value of the pointer selected through the IPD_FREE_PTR_FIFO_CTL 1668 */ 1669union cvmx_ipd_free_ptr_value { 1670 uint64_t u64; 1671 struct cvmx_ipd_free_ptr_value_s { 1672#ifdef __BIG_ENDIAN_BITFIELD 1673 uint64_t reserved_33_63 : 31; 1674 uint64_t ptr : 33; /**< The output of the pwp_fifo. */ 1675#else 1676 uint64_t ptr : 33; 1677 uint64_t reserved_33_63 : 31; 1678#endif 1679 } s; 1680 struct cvmx_ipd_free_ptr_value_s cn68xx; 1681 struct cvmx_ipd_free_ptr_value_s cn68xxp1; 1682}; 1683typedef union cvmx_ipd_free_ptr_value cvmx_ipd_free_ptr_value_t; 1684 1685/** 1686 * cvmx_ipd_hold_ptr_fifo_ctl 1687 * 1688 * IPD_HOLD_PTR_FIFO_CTL = IPD's Holding Pointer FIFO Control 1689 * 1690 * Allows reading of the Page-Pointers stored in the IPD's Holding Fifo. 1691 */ 1692union cvmx_ipd_hold_ptr_fifo_ctl { 1693 uint64_t u64; 1694 struct cvmx_ipd_hold_ptr_fifo_ctl_s { 1695#ifdef __BIG_ENDIAN_BITFIELD 1696 uint64_t reserved_43_63 : 21; 1697 uint64_t ptr : 33; /**< The output of the holding-fifo. */ 1698 uint64_t max_pkt : 3; /**< Maximum number of Packet-Pointers that COULD be 1699 in the FIFO. */ 1700 uint64_t praddr : 3; /**< Present Packet-Pointer read address. */ 1701 uint64_t cena : 1; /**< Active low Chip Enable that controls the 1702 MUX-select that steers [RADDR] to the fifo. 1703 *WARNING - Setting this field to '0' will allow 1704 reading of the memories thorugh the PTR field, 1705 but will cause unpredictable operation of the IPD 1706 under normal operation. */ 1707 uint64_t raddr : 3; /**< Sets the address to read from in the holding. 1708 fifo in the IPD. This FIFO holds Packet-Pointers 1709 to be used for packet data storage. */ 1710#else 1711 uint64_t raddr : 3; 1712 uint64_t cena : 1; 1713 uint64_t praddr : 3; 1714 uint64_t max_pkt : 3; 1715 uint64_t ptr : 33; 1716 uint64_t reserved_43_63 : 21; 1717#endif 1718 } s; 1719 struct cvmx_ipd_hold_ptr_fifo_ctl_s cn68xx; 1720 struct cvmx_ipd_hold_ptr_fifo_ctl_s cn68xxp1; 1721}; 1722typedef union cvmx_ipd_hold_ptr_fifo_ctl cvmx_ipd_hold_ptr_fifo_ctl_t; 1723 1724/** 1725 * cvmx_ipd_int_enb 1726 * 1727 * IPD_INTERRUPT_ENB = IPD Interrupt Enable Register 1728 * 1729 * Used to enable the various interrupting conditions of IPD 1730 */ 1731union cvmx_ipd_int_enb { 1732 uint64_t u64; 1733 struct cvmx_ipd_int_enb_s { 1734#ifdef __BIG_ENDIAN_BITFIELD 1735 uint64_t reserved_23_63 : 41; 1736 uint64_t pw3_dbe : 1; /**< Allows an interrupt to be sent when the 1737 corresponding bit in the IPD_INT_SUM is set. */ 1738 uint64_t pw3_sbe : 1; /**< Allows an interrupt to be sent when the 1739 corresponding bit in the IPD_INT_SUM is set. */ 1740 uint64_t pw2_dbe : 1; /**< Allows an interrupt to be sent when the 1741 corresponding bit in the IPD_INT_SUM is set. */ 1742 uint64_t pw2_sbe : 1; /**< Allows an interrupt to be sent when the 1743 corresponding bit in the IPD_INT_SUM is set. */ 1744 uint64_t pw1_dbe : 1; /**< Allows an interrupt to be sent when the 1745 corresponding bit in the IPD_INT_SUM is set. */ 1746 uint64_t pw1_sbe : 1; /**< Allows an interrupt to be sent when the 1747 corresponding bit in the IPD_INT_SUM is set. */ 1748 uint64_t pw0_dbe : 1; /**< Allows an interrupt to be sent when the 1749 corresponding bit in the IPD_INT_SUM is set. */ 1750 uint64_t pw0_sbe : 1; /**< Allows an interrupt to be sent when the 1751 corresponding bit in the IPD_INT_SUM is set. */ 1752 uint64_t dat : 1; /**< Allows an interrupt to be sent when the 1753 corresponding bit in the IPD_INT_SUM is set. */ 1754 uint64_t eop : 1; /**< Allows an interrupt to be sent when the 1755 corresponding bit in the IPD_INT_SUM is set. */ 1756 uint64_t sop : 1; /**< Allows an interrupt to be sent when the 1757 corresponding bit in the IPD_INT_SUM is set. */ 1758 uint64_t pq_sub : 1; /**< Allows an interrupt to be sent when the 1759 corresponding bit in the IPD_INT_SUM is set. */ 1760 uint64_t pq_add : 1; /**< Allows an interrupt to be sent when the 1761 corresponding bit in the IPD_INT_SUM is set. */ 1762 uint64_t bc_ovr : 1; /**< Allows an interrupt to be sent when the 1763 corresponding bit in the IPD_INT_SUM is set. */ 1764 uint64_t d_coll : 1; /**< Allows an interrupt to be sent when the 1765 corresponding bit in the IPD_INT_SUM is set. */ 1766 uint64_t c_coll : 1; /**< Allows an interrupt to be sent when the 1767 corresponding bit in the IPD_INT_SUM is set. */ 1768 uint64_t cc_ovr : 1; /**< Allows an interrupt to be sent when the 1769 corresponding bit in the IPD_INT_SUM is set. */ 1770 uint64_t dc_ovr : 1; /**< Allows an interrupt to be sent when the 1771 corresponding bit in the IPD_INT_SUM is set. */ 1772 uint64_t bp_sub : 1; /**< Enables interrupts when a backpressure subtract 1773 has an illegal value. */ 1774 uint64_t prc_par3 : 1; /**< Enable parity error interrupts for bits 1775 [127:96] of the PBM memory. */ 1776 uint64_t prc_par2 : 1; /**< Enable parity error interrupts for bits 1777 [95:64] of the PBM memory. */ 1778 uint64_t prc_par1 : 1; /**< Enable parity error interrupts for bits 1779 [63:32] of the PBM memory. */ 1780 uint64_t prc_par0 : 1; /**< Enable parity error interrupts for bits 1781 [31:0] of the PBM memory. */ 1782#else 1783 uint64_t prc_par0 : 1; 1784 uint64_t prc_par1 : 1; 1785 uint64_t prc_par2 : 1; 1786 uint64_t prc_par3 : 1; 1787 uint64_t bp_sub : 1; 1788 uint64_t dc_ovr : 1; 1789 uint64_t cc_ovr : 1; 1790 uint64_t c_coll : 1; 1791 uint64_t d_coll : 1; 1792 uint64_t bc_ovr : 1; 1793 uint64_t pq_add : 1; 1794 uint64_t pq_sub : 1; 1795 uint64_t sop : 1; 1796 uint64_t eop : 1; 1797 uint64_t dat : 1; 1798 uint64_t pw0_sbe : 1; 1799 uint64_t pw0_dbe : 1; 1800 uint64_t pw1_sbe : 1; 1801 uint64_t pw1_dbe : 1; 1802 uint64_t pw2_sbe : 1; 1803 uint64_t pw2_dbe : 1; 1804 uint64_t pw3_sbe : 1; 1805 uint64_t pw3_dbe : 1; 1806 uint64_t reserved_23_63 : 41; 1807#endif 1808 } s; 1809 struct cvmx_ipd_int_enb_cn30xx { 1810#ifdef __BIG_ENDIAN_BITFIELD 1811 uint64_t reserved_5_63 : 59; 1812 uint64_t bp_sub : 1; /**< Enables interrupts when a backpressure subtract 1813 has an illegal value. */ 1814 uint64_t prc_par3 : 1; /**< Enable parity error interrupts for bits 1815 [127:96] of the PBM memory. */ 1816 uint64_t prc_par2 : 1; /**< Enable parity error interrupts for bits 1817 [95:64] of the PBM memory. */ 1818 uint64_t prc_par1 : 1; /**< Enable parity error interrupts for bits 1819 [63:32] of the PBM memory. */ 1820 uint64_t prc_par0 : 1; /**< Enable parity error interrupts for bits 1821 [31:0] of the PBM memory. */ 1822#else 1823 uint64_t prc_par0 : 1; 1824 uint64_t prc_par1 : 1; 1825 uint64_t prc_par2 : 1; 1826 uint64_t prc_par3 : 1; 1827 uint64_t bp_sub : 1; 1828 uint64_t reserved_5_63 : 59; 1829#endif 1830 } cn30xx; 1831 struct cvmx_ipd_int_enb_cn30xx cn31xx; 1832 struct cvmx_ipd_int_enb_cn38xx { 1833#ifdef __BIG_ENDIAN_BITFIELD 1834 uint64_t reserved_10_63 : 54; 1835 uint64_t bc_ovr : 1; /**< Allows an interrupt to be sent when the 1836 corresponding bit in the IPD_INT_SUM is set. 1837 This is a PASS-3 Field. */ 1838 uint64_t d_coll : 1; /**< Allows an interrupt to be sent when the 1839 corresponding bit in the IPD_INT_SUM is set. 1840 This is a PASS-3 Field. */ 1841 uint64_t c_coll : 1; /**< Allows an interrupt to be sent when the 1842 corresponding bit in the IPD_INT_SUM is set. 1843 This is a PASS-3 Field. */ 1844 uint64_t cc_ovr : 1; /**< Allows an interrupt to be sent when the 1845 corresponding bit in the IPD_INT_SUM is set. 1846 This is a PASS-3 Field. */ 1847 uint64_t dc_ovr : 1; /**< Allows an interrupt to be sent when the 1848 corresponding bit in the IPD_INT_SUM is set. 1849 This is a PASS-3 Field. */ 1850 uint64_t bp_sub : 1; /**< Enables interrupts when a backpressure subtract 1851 has an illegal value. */ 1852 uint64_t prc_par3 : 1; /**< Enable parity error interrupts for bits 1853 [127:96] of the PBM memory. */ 1854 uint64_t prc_par2 : 1; /**< Enable parity error interrupts for bits 1855 [95:64] of the PBM memory. */ 1856 uint64_t prc_par1 : 1; /**< Enable parity error interrupts for bits 1857 [63:32] of the PBM memory. */ 1858 uint64_t prc_par0 : 1; /**< Enable parity error interrupts for bits 1859 [31:0] of the PBM memory. */ 1860#else 1861 uint64_t prc_par0 : 1; 1862 uint64_t prc_par1 : 1; 1863 uint64_t prc_par2 : 1; 1864 uint64_t prc_par3 : 1; 1865 uint64_t bp_sub : 1; 1866 uint64_t dc_ovr : 1; 1867 uint64_t cc_ovr : 1; 1868 uint64_t c_coll : 1; 1869 uint64_t d_coll : 1; 1870 uint64_t bc_ovr : 1; 1871 uint64_t reserved_10_63 : 54; 1872#endif 1873 } cn38xx; 1874 struct cvmx_ipd_int_enb_cn30xx cn38xxp2; 1875 struct cvmx_ipd_int_enb_cn38xx cn50xx; 1876 struct cvmx_ipd_int_enb_cn52xx { 1877#ifdef __BIG_ENDIAN_BITFIELD 1878 uint64_t reserved_12_63 : 52; 1879 uint64_t pq_sub : 1; /**< Allows an interrupt to be sent when the 1880 corresponding bit in the IPD_INT_SUM is set. */ 1881 uint64_t pq_add : 1; /**< Allows an interrupt to be sent when the 1882 corresponding bit in the IPD_INT_SUM is set. */ 1883 uint64_t bc_ovr : 1; /**< Allows an interrupt to be sent when the 1884 corresponding bit in the IPD_INT_SUM is set. */ 1885 uint64_t d_coll : 1; /**< Allows an interrupt to be sent when the 1886 corresponding bit in the IPD_INT_SUM is set. */ 1887 uint64_t c_coll : 1; /**< Allows an interrupt to be sent when the 1888 corresponding bit in the IPD_INT_SUM is set. */ 1889 uint64_t cc_ovr : 1; /**< Allows an interrupt to be sent when the 1890 corresponding bit in the IPD_INT_SUM is set. */ 1891 uint64_t dc_ovr : 1; /**< Allows an interrupt to be sent when the 1892 corresponding bit in the IPD_INT_SUM is set. */ 1893 uint64_t bp_sub : 1; /**< Enables interrupts when a backpressure subtract 1894 has an illegal value. */ 1895 uint64_t prc_par3 : 1; /**< Enable parity error interrupts for bits 1896 [127:96] of the PBM memory. */ 1897 uint64_t prc_par2 : 1; /**< Enable parity error interrupts for bits 1898 [95:64] of the PBM memory. */ 1899 uint64_t prc_par1 : 1; /**< Enable parity error interrupts for bits 1900 [63:32] of the PBM memory. */ 1901 uint64_t prc_par0 : 1; /**< Enable parity error interrupts for bits 1902 [31:0] of the PBM memory. */ 1903#else 1904 uint64_t prc_par0 : 1; 1905 uint64_t prc_par1 : 1; 1906 uint64_t prc_par2 : 1; 1907 uint64_t prc_par3 : 1; 1908 uint64_t bp_sub : 1; 1909 uint64_t dc_ovr : 1; 1910 uint64_t cc_ovr : 1; 1911 uint64_t c_coll : 1; 1912 uint64_t d_coll : 1; 1913 uint64_t bc_ovr : 1; 1914 uint64_t pq_add : 1; 1915 uint64_t pq_sub : 1; 1916 uint64_t reserved_12_63 : 52; 1917#endif 1918 } cn52xx; 1919 struct cvmx_ipd_int_enb_cn52xx cn52xxp1; 1920 struct cvmx_ipd_int_enb_cn52xx cn56xx; 1921 struct cvmx_ipd_int_enb_cn52xx cn56xxp1; 1922 struct cvmx_ipd_int_enb_cn38xx cn58xx; 1923 struct cvmx_ipd_int_enb_cn38xx cn58xxp1; 1924 struct cvmx_ipd_int_enb_cn52xx cn61xx; 1925 struct cvmx_ipd_int_enb_cn52xx cn63xx; 1926 struct cvmx_ipd_int_enb_cn52xx cn63xxp1; 1927 struct cvmx_ipd_int_enb_cn52xx cn66xx; 1928 struct cvmx_ipd_int_enb_s cn68xx; 1929 struct cvmx_ipd_int_enb_s cn68xxp1; 1930 struct cvmx_ipd_int_enb_cn52xx cnf71xx; 1931}; 1932typedef union cvmx_ipd_int_enb cvmx_ipd_int_enb_t; 1933 1934/** 1935 * cvmx_ipd_int_sum 1936 * 1937 * IPD_INTERRUPT_SUM = IPD Interrupt Summary Register 1938 * 1939 * Set when an interrupt condition occurs, write '1' to clear. 1940 */ 1941union cvmx_ipd_int_sum { 1942 uint64_t u64; 1943 struct cvmx_ipd_int_sum_s { 1944#ifdef __BIG_ENDIAN_BITFIELD 1945 uint64_t reserved_23_63 : 41; 1946 uint64_t pw3_dbe : 1; /**< Packet memory 3 had ECC DBE. */ 1947 uint64_t pw3_sbe : 1; /**< Packet memory 3 had ECC SBE. */ 1948 uint64_t pw2_dbe : 1; /**< Packet memory 2 had ECC DBE. */ 1949 uint64_t pw2_sbe : 1; /**< Packet memory 2 had ECC SBE. */ 1950 uint64_t pw1_dbe : 1; /**< Packet memory 1 had ECC DBE. */ 1951 uint64_t pw1_sbe : 1; /**< Packet memory 1 had ECC SBE. */ 1952 uint64_t pw0_dbe : 1; /**< Packet memory 0 had ECC DBE. */ 1953 uint64_t pw0_sbe : 1; /**< Packet memory 0 had ECC SBE. */ 1954 uint64_t dat : 1; /**< Set when a data arrives before a SOP for the same 1955 reasm-id for a packet. 1956 The first detected error associated with bits [14:12] 1957 of this register will only be set here. A new bit 1958 can be set when the previous reported bit is cleared. 1959 Also see IPD_PKT_ERR. */ 1960 uint64_t eop : 1; /**< Set when a EOP is followed by an EOP for the same 1961 reasm-id for a packet. 1962 The first detected error associated with bits [14:12] 1963 of this register will only be set here. A new bit 1964 can be set when the previous reported bit is cleared. 1965 Also see IPD_PKT_ERR. */ 1966 uint64_t sop : 1; /**< Set when a SOP is followed by an SOP for the same 1967 reasm-id for a packet. 1968 The first detected error associated with bits [14:12] 1969 of this register will only be set here. A new bit 1970 can be set when the previous reported bit is cleared. 1971 Also see IPD_PKT_ERR. */ 1972 uint64_t pq_sub : 1; /**< Set when a port-qos does an sub to the count 1973 that causes the counter to wrap. */ 1974 uint64_t pq_add : 1; /**< Set when a port-qos does an add to the count 1975 that causes the counter to wrap. */ 1976 uint64_t bc_ovr : 1; /**< Set when the byte-count to send to IOB overflows. */ 1977 uint64_t d_coll : 1; /**< Set when the packet/WQE data to be sent to IOB 1978 collides. */ 1979 uint64_t c_coll : 1; /**< Set when the packet/WQE commands to be sent to IOB 1980 collides. */ 1981 uint64_t cc_ovr : 1; /**< Set when the command credits to the IOB overflow. */ 1982 uint64_t dc_ovr : 1; /**< Set when the data credits to the IOB overflow. */ 1983 uint64_t bp_sub : 1; /**< Set when a backpressure subtract is done with a 1984 supplied illegal value. */ 1985 uint64_t prc_par3 : 1; /**< Set when a parity error is dected for bits 1986 [127:96] of the PBM memory. */ 1987 uint64_t prc_par2 : 1; /**< Set when a parity error is dected for bits 1988 [95:64] of the PBM memory. */ 1989 uint64_t prc_par1 : 1; /**< Set when a parity error is dected for bits 1990 [63:32] of the PBM memory. */ 1991 uint64_t prc_par0 : 1; /**< Set when a parity error is dected for bits 1992 [31:0] of the PBM memory. */ 1993#else 1994 uint64_t prc_par0 : 1; 1995 uint64_t prc_par1 : 1; 1996 uint64_t prc_par2 : 1; 1997 uint64_t prc_par3 : 1; 1998 uint64_t bp_sub : 1; 1999 uint64_t dc_ovr : 1; 2000 uint64_t cc_ovr : 1; 2001 uint64_t c_coll : 1; 2002 uint64_t d_coll : 1; 2003 uint64_t bc_ovr : 1; 2004 uint64_t pq_add : 1; 2005 uint64_t pq_sub : 1; 2006 uint64_t sop : 1; 2007 uint64_t eop : 1; 2008 uint64_t dat : 1; 2009 uint64_t pw0_sbe : 1; 2010 uint64_t pw0_dbe : 1; 2011 uint64_t pw1_sbe : 1; 2012 uint64_t pw1_dbe : 1; 2013 uint64_t pw2_sbe : 1; 2014 uint64_t pw2_dbe : 1; 2015 uint64_t pw3_sbe : 1; 2016 uint64_t pw3_dbe : 1; 2017 uint64_t reserved_23_63 : 41; 2018#endif 2019 } s; 2020 struct cvmx_ipd_int_sum_cn30xx { 2021#ifdef __BIG_ENDIAN_BITFIELD 2022 uint64_t reserved_5_63 : 59; 2023 uint64_t bp_sub : 1; /**< Set when a backpressure subtract is done with a 2024 supplied illegal value. */ 2025 uint64_t prc_par3 : 1; /**< Set when a parity error is dected for bits 2026 [127:96] of the PBM memory. */ 2027 uint64_t prc_par2 : 1; /**< Set when a parity error is dected for bits 2028 [95:64] of the PBM memory. */ 2029 uint64_t prc_par1 : 1; /**< Set when a parity error is dected for bits 2030 [63:32] of the PBM memory. */ 2031 uint64_t prc_par0 : 1; /**< Set when a parity error is dected for bits 2032 [31:0] of the PBM memory. */ 2033#else 2034 uint64_t prc_par0 : 1; 2035 uint64_t prc_par1 : 1; 2036 uint64_t prc_par2 : 1; 2037 uint64_t prc_par3 : 1; 2038 uint64_t bp_sub : 1; 2039 uint64_t reserved_5_63 : 59; 2040#endif 2041 } cn30xx; 2042 struct cvmx_ipd_int_sum_cn30xx cn31xx; 2043 struct cvmx_ipd_int_sum_cn38xx { 2044#ifdef __BIG_ENDIAN_BITFIELD 2045 uint64_t reserved_10_63 : 54; 2046 uint64_t bc_ovr : 1; /**< Set when the byte-count to send to IOB overflows. 2047 This is a PASS-3 Field. */ 2048 uint64_t d_coll : 1; /**< Set when the packet/WQE data to be sent to IOB 2049 collides. 2050 This is a PASS-3 Field. */ 2051 uint64_t c_coll : 1; /**< Set when the packet/WQE commands to be sent to IOB 2052 collides. 2053 This is a PASS-3 Field. */ 2054 uint64_t cc_ovr : 1; /**< Set when the command credits to the IOB overflow. 2055 This is a PASS-3 Field. */ 2056 uint64_t dc_ovr : 1; /**< Set when the data credits to the IOB overflow. 2057 This is a PASS-3 Field. */ 2058 uint64_t bp_sub : 1; /**< Set when a backpressure subtract is done with a 2059 supplied illegal value. */ 2060 uint64_t prc_par3 : 1; /**< Set when a parity error is dected for bits 2061 [127:96] of the PBM memory. */ 2062 uint64_t prc_par2 : 1; /**< Set when a parity error is dected for bits 2063 [95:64] of the PBM memory. */ 2064 uint64_t prc_par1 : 1; /**< Set when a parity error is dected for bits 2065 [63:32] of the PBM memory. */ 2066 uint64_t prc_par0 : 1; /**< Set when a parity error is dected for bits 2067 [31:0] of the PBM memory. */ 2068#else 2069 uint64_t prc_par0 : 1; 2070 uint64_t prc_par1 : 1; 2071 uint64_t prc_par2 : 1; 2072 uint64_t prc_par3 : 1; 2073 uint64_t bp_sub : 1; 2074 uint64_t dc_ovr : 1; 2075 uint64_t cc_ovr : 1; 2076 uint64_t c_coll : 1; 2077 uint64_t d_coll : 1; 2078 uint64_t bc_ovr : 1; 2079 uint64_t reserved_10_63 : 54; 2080#endif 2081 } cn38xx; 2082 struct cvmx_ipd_int_sum_cn30xx cn38xxp2; 2083 struct cvmx_ipd_int_sum_cn38xx cn50xx; 2084 struct cvmx_ipd_int_sum_cn52xx { 2085#ifdef __BIG_ENDIAN_BITFIELD 2086 uint64_t reserved_12_63 : 52; 2087 uint64_t pq_sub : 1; /**< Set when a port-qos does an sub to the count 2088 that causes the counter to wrap. */ 2089 uint64_t pq_add : 1; /**< Set when a port-qos does an add to the count 2090 that causes the counter to wrap. */ 2091 uint64_t bc_ovr : 1; /**< Set when the byte-count to send to IOB overflows. */ 2092 uint64_t d_coll : 1; /**< Set when the packet/WQE data to be sent to IOB 2093 collides. */ 2094 uint64_t c_coll : 1; /**< Set when the packet/WQE commands to be sent to IOB 2095 collides. */ 2096 uint64_t cc_ovr : 1; /**< Set when the command credits to the IOB overflow. */ 2097 uint64_t dc_ovr : 1; /**< Set when the data credits to the IOB overflow. */ 2098 uint64_t bp_sub : 1; /**< Set when a backpressure subtract is done with a 2099 supplied illegal value. */ 2100 uint64_t prc_par3 : 1; /**< Set when a parity error is dected for bits 2101 [127:96] of the PBM memory. */ 2102 uint64_t prc_par2 : 1; /**< Set when a parity error is dected for bits 2103 [95:64] of the PBM memory. */ 2104 uint64_t prc_par1 : 1; /**< Set when a parity error is dected for bits 2105 [63:32] of the PBM memory. */ 2106 uint64_t prc_par0 : 1; /**< Set when a parity error is dected for bits 2107 [31:0] of the PBM memory. */ 2108#else 2109 uint64_t prc_par0 : 1; 2110 uint64_t prc_par1 : 1; 2111 uint64_t prc_par2 : 1; 2112 uint64_t prc_par3 : 1; 2113 uint64_t bp_sub : 1; 2114 uint64_t dc_ovr : 1; 2115 uint64_t cc_ovr : 1; 2116 uint64_t c_coll : 1; 2117 uint64_t d_coll : 1; 2118 uint64_t bc_ovr : 1; 2119 uint64_t pq_add : 1; 2120 uint64_t pq_sub : 1; 2121 uint64_t reserved_12_63 : 52; 2122#endif 2123 } cn52xx; 2124 struct cvmx_ipd_int_sum_cn52xx cn52xxp1; 2125 struct cvmx_ipd_int_sum_cn52xx cn56xx; 2126 struct cvmx_ipd_int_sum_cn52xx cn56xxp1; 2127 struct cvmx_ipd_int_sum_cn38xx cn58xx; 2128 struct cvmx_ipd_int_sum_cn38xx cn58xxp1; 2129 struct cvmx_ipd_int_sum_cn52xx cn61xx; 2130 struct cvmx_ipd_int_sum_cn52xx cn63xx; 2131 struct cvmx_ipd_int_sum_cn52xx cn63xxp1; 2132 struct cvmx_ipd_int_sum_cn52xx cn66xx; 2133 struct cvmx_ipd_int_sum_s cn68xx; 2134 struct cvmx_ipd_int_sum_s cn68xxp1; 2135 struct cvmx_ipd_int_sum_cn52xx cnf71xx; 2136}; 2137typedef union cvmx_ipd_int_sum cvmx_ipd_int_sum_t; 2138 2139/** 2140 * cvmx_ipd_next_pkt_ptr 2141 * 2142 * IPD_NEXT_PKT_PTR = IPD's Next Packet Pointer 2143 * 2144 * The value of the packet-pointer fetched and in the valid register. 2145 */ 2146union cvmx_ipd_next_pkt_ptr { 2147 uint64_t u64; 2148 struct cvmx_ipd_next_pkt_ptr_s { 2149#ifdef __BIG_ENDIAN_BITFIELD 2150 uint64_t reserved_33_63 : 31; 2151 uint64_t ptr : 33; /**< Pointer value. */ 2152#else 2153 uint64_t ptr : 33; 2154 uint64_t reserved_33_63 : 31; 2155#endif 2156 } s; 2157 struct cvmx_ipd_next_pkt_ptr_s cn68xx; 2158 struct cvmx_ipd_next_pkt_ptr_s cn68xxp1; 2159}; 2160typedef union cvmx_ipd_next_pkt_ptr cvmx_ipd_next_pkt_ptr_t; 2161 2162/** 2163 * cvmx_ipd_next_wqe_ptr 2164 * 2165 * IPD_NEXT_WQE_PTR = IPD's NEXT_WQE Pointer 2166 * 2167 * The value of the WQE-pointer fetched and in the valid register. 2168 */ 2169union cvmx_ipd_next_wqe_ptr { 2170 uint64_t u64; 2171 struct cvmx_ipd_next_wqe_ptr_s { 2172#ifdef __BIG_ENDIAN_BITFIELD 2173 uint64_t reserved_33_63 : 31; 2174 uint64_t ptr : 33; /**< Pointer value. 2175 When IPD_CTL_STATUS[NO_WPTR] is set '1' this field 2176 represents a Packet-Pointer NOT a WQE pointer. */ 2177#else 2178 uint64_t ptr : 33; 2179 uint64_t reserved_33_63 : 31; 2180#endif 2181 } s; 2182 struct cvmx_ipd_next_wqe_ptr_s cn68xx; 2183 struct cvmx_ipd_next_wqe_ptr_s cn68xxp1; 2184}; 2185typedef union cvmx_ipd_next_wqe_ptr cvmx_ipd_next_wqe_ptr_t; 2186 2187/** 2188 * cvmx_ipd_not_1st_mbuff_skip 2189 * 2190 * IPD_NOT_1ST_MBUFF_SKIP = IPD Not First MBUFF Word Skip Size 2191 * 2192 * The number of words that the IPD will skip when writing any MBUFF that is not the first. 2193 */ 2194union cvmx_ipd_not_1st_mbuff_skip { 2195 uint64_t u64; 2196 struct cvmx_ipd_not_1st_mbuff_skip_s { 2197#ifdef __BIG_ENDIAN_BITFIELD 2198 uint64_t reserved_6_63 : 58; 2199 uint64_t skip_sz : 6; /**< The number of 8-byte words from the top of any 2200 MBUFF, that is not the 1st MBUFF, that the IPD 2201 will write the next-pointer. 2202 Legal values are 0 to 32, where the MAX value 2203 is also limited to: 2204 IPD_PACKET_MBUFF_SIZE[MB_SIZE] - 16. */ 2205#else 2206 uint64_t skip_sz : 6; 2207 uint64_t reserved_6_63 : 58; 2208#endif 2209 } s; 2210 struct cvmx_ipd_not_1st_mbuff_skip_s cn30xx; 2211 struct cvmx_ipd_not_1st_mbuff_skip_s cn31xx; 2212 struct cvmx_ipd_not_1st_mbuff_skip_s cn38xx; 2213 struct cvmx_ipd_not_1st_mbuff_skip_s cn38xxp2; 2214 struct cvmx_ipd_not_1st_mbuff_skip_s cn50xx; 2215 struct cvmx_ipd_not_1st_mbuff_skip_s cn52xx; 2216 struct cvmx_ipd_not_1st_mbuff_skip_s cn52xxp1; 2217 struct cvmx_ipd_not_1st_mbuff_skip_s cn56xx; 2218 struct cvmx_ipd_not_1st_mbuff_skip_s cn56xxp1; 2219 struct cvmx_ipd_not_1st_mbuff_skip_s cn58xx; 2220 struct cvmx_ipd_not_1st_mbuff_skip_s cn58xxp1; 2221 struct cvmx_ipd_not_1st_mbuff_skip_s cn61xx; 2222 struct cvmx_ipd_not_1st_mbuff_skip_s cn63xx; 2223 struct cvmx_ipd_not_1st_mbuff_skip_s cn63xxp1; 2224 struct cvmx_ipd_not_1st_mbuff_skip_s cn66xx; 2225 struct cvmx_ipd_not_1st_mbuff_skip_s cn68xx; 2226 struct cvmx_ipd_not_1st_mbuff_skip_s cn68xxp1; 2227 struct cvmx_ipd_not_1st_mbuff_skip_s cnf71xx; 2228}; 2229typedef union cvmx_ipd_not_1st_mbuff_skip cvmx_ipd_not_1st_mbuff_skip_t; 2230 2231/** 2232 * cvmx_ipd_on_bp_drop_pkt# 2233 * 2234 * RESERVE SPACE UPTO 0x3FFF 2235 * 2236 * 2237 * RESERVED FOR FORMER IPD_SUB_PKIND_FCS - MOVED TO PIP 2238 * 2239 * RESERVE 4008 - 40FF 2240 * 2241 * 2242 * IPD_ON_BP_DROP_PKT = IPD On Backpressure Drop Packet 2243 * 2244 * When IPD applies backpressure to a BPID and the corresponding bit in this register is set, 2245 * then previously received packets will be dropped when processed. 2246 */ 2247union cvmx_ipd_on_bp_drop_pktx { 2248 uint64_t u64; 2249 struct cvmx_ipd_on_bp_drop_pktx_s { 2250#ifdef __BIG_ENDIAN_BITFIELD 2251 uint64_t prt_enb : 64; /**< The BPID corresponding to the bit position in this 2252 field will drop all NON-RAW packets to that BPID 2253 when BPID level backpressure is applied to that 2254 BPID. The applying of BPID-level backpressure for 2255 this dropping does not take into consideration the 2256 value of IPD_BPIDX_MBUF_TH[BP_ENB], nor 2257 IPD_RED_BPID_ENABLE[PRT_ENB]. */ 2258#else 2259 uint64_t prt_enb : 64; 2260#endif 2261 } s; 2262 struct cvmx_ipd_on_bp_drop_pktx_s cn68xx; 2263 struct cvmx_ipd_on_bp_drop_pktx_s cn68xxp1; 2264}; 2265typedef union cvmx_ipd_on_bp_drop_pktx cvmx_ipd_on_bp_drop_pktx_t; 2266 2267/** 2268 * cvmx_ipd_packet_mbuff_size 2269 * 2270 * IPD_PACKET_MBUFF_SIZE = IPD's PACKET MUBUF Size In Words 2271 * 2272 * The number of words in a MBUFF used for packet data store. 2273 */ 2274union cvmx_ipd_packet_mbuff_size { 2275 uint64_t u64; 2276 struct cvmx_ipd_packet_mbuff_size_s { 2277#ifdef __BIG_ENDIAN_BITFIELD 2278 uint64_t reserved_12_63 : 52; 2279 uint64_t mb_size : 12; /**< The number of 8-byte words in a MBUF. 2280 This must be a number in the range of 32 to 2281 2048. 2282 This is also the size of the FPA's 2283 Queue-0 Free-Page. */ 2284#else 2285 uint64_t mb_size : 12; 2286 uint64_t reserved_12_63 : 52; 2287#endif 2288 } s; 2289 struct cvmx_ipd_packet_mbuff_size_s cn30xx; 2290 struct cvmx_ipd_packet_mbuff_size_s cn31xx; 2291 struct cvmx_ipd_packet_mbuff_size_s cn38xx; 2292 struct cvmx_ipd_packet_mbuff_size_s cn38xxp2; 2293 struct cvmx_ipd_packet_mbuff_size_s cn50xx; 2294 struct cvmx_ipd_packet_mbuff_size_s cn52xx; 2295 struct cvmx_ipd_packet_mbuff_size_s cn52xxp1; 2296 struct cvmx_ipd_packet_mbuff_size_s cn56xx; 2297 struct cvmx_ipd_packet_mbuff_size_s cn56xxp1; 2298 struct cvmx_ipd_packet_mbuff_size_s cn58xx; 2299 struct cvmx_ipd_packet_mbuff_size_s cn58xxp1; 2300 struct cvmx_ipd_packet_mbuff_size_s cn61xx; 2301 struct cvmx_ipd_packet_mbuff_size_s cn63xx; 2302 struct cvmx_ipd_packet_mbuff_size_s cn63xxp1; 2303 struct cvmx_ipd_packet_mbuff_size_s cn66xx; 2304 struct cvmx_ipd_packet_mbuff_size_s cn68xx; 2305 struct cvmx_ipd_packet_mbuff_size_s cn68xxp1; 2306 struct cvmx_ipd_packet_mbuff_size_s cnf71xx; 2307}; 2308typedef union cvmx_ipd_packet_mbuff_size cvmx_ipd_packet_mbuff_size_t; 2309 2310/** 2311 * cvmx_ipd_pkt_err 2312 * 2313 * IPD_PKT_ERR = IPD Packet Error Register 2314 * 2315 * Provides status about the failing packet recevie error. 2316 */ 2317union cvmx_ipd_pkt_err { 2318 uint64_t u64; 2319 struct cvmx_ipd_pkt_err_s { 2320#ifdef __BIG_ENDIAN_BITFIELD 2321 uint64_t reserved_6_63 : 58; 2322 uint64_t reasm : 6; /**< When IPD_INT_SUM[14:12] bit is set, this field 2323 latches the failing reasm number associated with 2324 the IPD_INT_SUM[14:12] bit set. 2325 Values 0-62 can be seen here, reasm-id 63 is not 2326 used. */ 2327#else 2328 uint64_t reasm : 6; 2329 uint64_t reserved_6_63 : 58; 2330#endif 2331 } s; 2332 struct cvmx_ipd_pkt_err_s cn68xx; 2333 struct cvmx_ipd_pkt_err_s cn68xxp1; 2334}; 2335typedef union cvmx_ipd_pkt_err cvmx_ipd_pkt_err_t; 2336 2337/** 2338 * cvmx_ipd_pkt_ptr_valid 2339 * 2340 * IPD_PKT_PTR_VALID = IPD's Packet Pointer Valid 2341 * 2342 * The value of the packet-pointer fetched and in the valid register. 2343 */ 2344union cvmx_ipd_pkt_ptr_valid { 2345 uint64_t u64; 2346 struct cvmx_ipd_pkt_ptr_valid_s { 2347#ifdef __BIG_ENDIAN_BITFIELD 2348 uint64_t reserved_29_63 : 35; 2349 uint64_t ptr : 29; /**< Pointer value. */ 2350#else 2351 uint64_t ptr : 29; 2352 uint64_t reserved_29_63 : 35; 2353#endif 2354 } s; 2355 struct cvmx_ipd_pkt_ptr_valid_s cn30xx; 2356 struct cvmx_ipd_pkt_ptr_valid_s cn31xx; 2357 struct cvmx_ipd_pkt_ptr_valid_s cn38xx; 2358 struct cvmx_ipd_pkt_ptr_valid_s cn50xx; 2359 struct cvmx_ipd_pkt_ptr_valid_s cn52xx; 2360 struct cvmx_ipd_pkt_ptr_valid_s cn52xxp1; 2361 struct cvmx_ipd_pkt_ptr_valid_s cn56xx; 2362 struct cvmx_ipd_pkt_ptr_valid_s cn56xxp1; 2363 struct cvmx_ipd_pkt_ptr_valid_s cn58xx; 2364 struct cvmx_ipd_pkt_ptr_valid_s cn58xxp1; 2365 struct cvmx_ipd_pkt_ptr_valid_s cn61xx; 2366 struct cvmx_ipd_pkt_ptr_valid_s cn63xx; 2367 struct cvmx_ipd_pkt_ptr_valid_s cn63xxp1; 2368 struct cvmx_ipd_pkt_ptr_valid_s cn66xx; 2369 struct cvmx_ipd_pkt_ptr_valid_s cnf71xx; 2370}; 2371typedef union cvmx_ipd_pkt_ptr_valid cvmx_ipd_pkt_ptr_valid_t; 2372 2373/** 2374 * cvmx_ipd_port#_bp_page_cnt 2375 * 2376 * IPD_PORTX_BP_PAGE_CNT = IPD Port Backpressure Page Count 2377 * 2378 * The number of pages in use by the port that when exceeded, backpressure will be applied to the port. 2379 * See also IPD_PORTX_BP_PAGE_CNT2 2380 * See also IPD_PORTX_BP_PAGE_CNT3 2381 */ 2382union cvmx_ipd_portx_bp_page_cnt { 2383 uint64_t u64; 2384 struct cvmx_ipd_portx_bp_page_cnt_s { 2385#ifdef __BIG_ENDIAN_BITFIELD 2386 uint64_t reserved_18_63 : 46; 2387 uint64_t bp_enb : 1; /**< When set '1' BP will be applied, if '0' BP will 2388 not be applied to port. */ 2389 uint64_t page_cnt : 17; /**< The number of page pointers assigned to 2390 the port, that when exceeded will cause 2391 back-pressure to be applied to the port. 2392 This value is in 256 page-pointer increments, 2393 (i.e. 0 = 0-page-ptrs, 1 = 256-page-ptrs,..) */ 2394#else 2395 uint64_t page_cnt : 17; 2396 uint64_t bp_enb : 1; 2397 uint64_t reserved_18_63 : 46; 2398#endif 2399 } s; 2400 struct cvmx_ipd_portx_bp_page_cnt_s cn30xx; 2401 struct cvmx_ipd_portx_bp_page_cnt_s cn31xx; 2402 struct cvmx_ipd_portx_bp_page_cnt_s cn38xx; 2403 struct cvmx_ipd_portx_bp_page_cnt_s cn38xxp2; 2404 struct cvmx_ipd_portx_bp_page_cnt_s cn50xx; 2405 struct cvmx_ipd_portx_bp_page_cnt_s cn52xx; 2406 struct cvmx_ipd_portx_bp_page_cnt_s cn52xxp1; 2407 struct cvmx_ipd_portx_bp_page_cnt_s cn56xx; 2408 struct cvmx_ipd_portx_bp_page_cnt_s cn56xxp1; 2409 struct cvmx_ipd_portx_bp_page_cnt_s cn58xx; 2410 struct cvmx_ipd_portx_bp_page_cnt_s cn58xxp1; 2411 struct cvmx_ipd_portx_bp_page_cnt_s cn61xx; 2412 struct cvmx_ipd_portx_bp_page_cnt_s cn63xx; 2413 struct cvmx_ipd_portx_bp_page_cnt_s cn63xxp1; 2414 struct cvmx_ipd_portx_bp_page_cnt_s cn66xx; 2415 struct cvmx_ipd_portx_bp_page_cnt_s cnf71xx; 2416}; 2417typedef union cvmx_ipd_portx_bp_page_cnt cvmx_ipd_portx_bp_page_cnt_t; 2418 2419/** 2420 * cvmx_ipd_port#_bp_page_cnt2 2421 * 2422 * IPD_PORTX_BP_PAGE_CNT2 = IPD Port Backpressure Page Count 2423 * 2424 * The number of pages in use by the port that when exceeded, backpressure will be applied to the port. 2425 * See also IPD_PORTX_BP_PAGE_CNT 2426 * See also IPD_PORTX_BP_PAGE_CNT3 2427 * 0x368-0x380 2428 */ 2429union cvmx_ipd_portx_bp_page_cnt2 { 2430 uint64_t u64; 2431 struct cvmx_ipd_portx_bp_page_cnt2_s { 2432#ifdef __BIG_ENDIAN_BITFIELD 2433 uint64_t reserved_18_63 : 46; 2434 uint64_t bp_enb : 1; /**< When set '1' BP will be applied, if '0' BP will 2435 not be applied to port. */ 2436 uint64_t page_cnt : 17; /**< The number of page pointers assigned to 2437 the port, that when exceeded will cause 2438 back-pressure to be applied to the port. 2439 This value is in 256 page-pointer increments, 2440 (i.e. 0 = 0-page-ptrs, 1 = 256-page-ptrs,..) */ 2441#else 2442 uint64_t page_cnt : 17; 2443 uint64_t bp_enb : 1; 2444 uint64_t reserved_18_63 : 46; 2445#endif 2446 } s; 2447 struct cvmx_ipd_portx_bp_page_cnt2_s cn52xx; 2448 struct cvmx_ipd_portx_bp_page_cnt2_s cn52xxp1; 2449 struct cvmx_ipd_portx_bp_page_cnt2_s cn56xx; 2450 struct cvmx_ipd_portx_bp_page_cnt2_s cn56xxp1; 2451 struct cvmx_ipd_portx_bp_page_cnt2_s cn61xx; 2452 struct cvmx_ipd_portx_bp_page_cnt2_s cn63xx; 2453 struct cvmx_ipd_portx_bp_page_cnt2_s cn63xxp1; 2454 struct cvmx_ipd_portx_bp_page_cnt2_s cn66xx; 2455 struct cvmx_ipd_portx_bp_page_cnt2_s cnf71xx; 2456}; 2457typedef union cvmx_ipd_portx_bp_page_cnt2 cvmx_ipd_portx_bp_page_cnt2_t; 2458 2459/** 2460 * cvmx_ipd_port#_bp_page_cnt3 2461 * 2462 * IPD_PORTX_BP_PAGE_CNT3 = IPD Port Backpressure Page Count 2463 * 2464 * The number of pages in use by the port that when exceeded, backpressure will be applied to the port. 2465 * See also IPD_PORTX_BP_PAGE_CNT 2466 * See also IPD_PORTX_BP_PAGE_CNT2 2467 * 0x3d0-408 2468 */ 2469union cvmx_ipd_portx_bp_page_cnt3 { 2470 uint64_t u64; 2471 struct cvmx_ipd_portx_bp_page_cnt3_s { 2472#ifdef __BIG_ENDIAN_BITFIELD 2473 uint64_t reserved_18_63 : 46; 2474 uint64_t bp_enb : 1; /**< When set '1' BP will be applied, if '0' BP will 2475 not be applied to port. */ 2476 uint64_t page_cnt : 17; /**< The number of page pointers assigned to 2477 the port, that when exceeded will cause 2478 back-pressure to be applied to the port. 2479 This value is in 256 page-pointer increments, 2480 (i.e. 0 = 0-page-ptrs, 1 = 256-page-ptrs,..) */ 2481#else 2482 uint64_t page_cnt : 17; 2483 uint64_t bp_enb : 1; 2484 uint64_t reserved_18_63 : 46; 2485#endif 2486 } s; 2487 struct cvmx_ipd_portx_bp_page_cnt3_s cn61xx; 2488 struct cvmx_ipd_portx_bp_page_cnt3_s cn63xx; 2489 struct cvmx_ipd_portx_bp_page_cnt3_s cn63xxp1; 2490 struct cvmx_ipd_portx_bp_page_cnt3_s cn66xx; 2491 struct cvmx_ipd_portx_bp_page_cnt3_s cnf71xx; 2492}; 2493typedef union cvmx_ipd_portx_bp_page_cnt3 cvmx_ipd_portx_bp_page_cnt3_t; 2494 2495/** 2496 * cvmx_ipd_port_bp_counters2_pair# 2497 * 2498 * IPD_PORT_BP_COUNTERS2_PAIRX = MBUF Counters port Ports used to generate Back Pressure Per Port. 2499 * See also IPD_PORT_BP_COUNTERS_PAIRX 2500 * See also IPD_PORT_BP_COUNTERS3_PAIRX 2501 * 0x388-0x3a0 2502 */ 2503union cvmx_ipd_port_bp_counters2_pairx { 2504 uint64_t u64; 2505 struct cvmx_ipd_port_bp_counters2_pairx_s { 2506#ifdef __BIG_ENDIAN_BITFIELD 2507 uint64_t reserved_25_63 : 39; 2508 uint64_t cnt_val : 25; /**< Number of MBUFs being used by data on this port. */ 2509#else 2510 uint64_t cnt_val : 25; 2511 uint64_t reserved_25_63 : 39; 2512#endif 2513 } s; 2514 struct cvmx_ipd_port_bp_counters2_pairx_s cn52xx; 2515 struct cvmx_ipd_port_bp_counters2_pairx_s cn52xxp1; 2516 struct cvmx_ipd_port_bp_counters2_pairx_s cn56xx; 2517 struct cvmx_ipd_port_bp_counters2_pairx_s cn56xxp1; 2518 struct cvmx_ipd_port_bp_counters2_pairx_s cn61xx; 2519 struct cvmx_ipd_port_bp_counters2_pairx_s cn63xx; 2520 struct cvmx_ipd_port_bp_counters2_pairx_s cn63xxp1; 2521 struct cvmx_ipd_port_bp_counters2_pairx_s cn66xx; 2522 struct cvmx_ipd_port_bp_counters2_pairx_s cnf71xx; 2523}; 2524typedef union cvmx_ipd_port_bp_counters2_pairx cvmx_ipd_port_bp_counters2_pairx_t; 2525 2526/** 2527 * cvmx_ipd_port_bp_counters3_pair# 2528 * 2529 * IPD_PORT_BP_COUNTERS3_PAIRX = MBUF Counters port Ports used to generate Back Pressure Per Port. 2530 * See also IPD_PORT_BP_COUNTERS_PAIRX 2531 * See also IPD_PORT_BP_COUNTERS2_PAIRX 2532 * 0x3b0-0x3c8 2533 */ 2534union cvmx_ipd_port_bp_counters3_pairx { 2535 uint64_t u64; 2536 struct cvmx_ipd_port_bp_counters3_pairx_s { 2537#ifdef __BIG_ENDIAN_BITFIELD 2538 uint64_t reserved_25_63 : 39; 2539 uint64_t cnt_val : 25; /**< Number of MBUFs being used by data on this port. */ 2540#else 2541 uint64_t cnt_val : 25; 2542 uint64_t reserved_25_63 : 39; 2543#endif 2544 } s; 2545 struct cvmx_ipd_port_bp_counters3_pairx_s cn61xx; 2546 struct cvmx_ipd_port_bp_counters3_pairx_s cn63xx; 2547 struct cvmx_ipd_port_bp_counters3_pairx_s cn63xxp1; 2548 struct cvmx_ipd_port_bp_counters3_pairx_s cn66xx; 2549 struct cvmx_ipd_port_bp_counters3_pairx_s cnf71xx; 2550}; 2551typedef union cvmx_ipd_port_bp_counters3_pairx cvmx_ipd_port_bp_counters3_pairx_t; 2552 2553/** 2554 * cvmx_ipd_port_bp_counters4_pair# 2555 * 2556 * IPD_PORT_BP_COUNTERS4_PAIRX = MBUF Counters port Ports used to generate Back Pressure Per Port. 2557 * See also IPD_PORT_BP_COUNTERS_PAIRX 2558 * See also IPD_PORT_BP_COUNTERS2_PAIRX 2559 * 0x410-0x3c8 2560 */ 2561union cvmx_ipd_port_bp_counters4_pairx { 2562 uint64_t u64; 2563 struct cvmx_ipd_port_bp_counters4_pairx_s { 2564#ifdef __BIG_ENDIAN_BITFIELD 2565 uint64_t reserved_25_63 : 39; 2566 uint64_t cnt_val : 25; /**< Number of MBUFs being used by data on this port. */ 2567#else 2568 uint64_t cnt_val : 25; 2569 uint64_t reserved_25_63 : 39; 2570#endif 2571 } s; 2572 struct cvmx_ipd_port_bp_counters4_pairx_s cn61xx; 2573 struct cvmx_ipd_port_bp_counters4_pairx_s cn66xx; 2574 struct cvmx_ipd_port_bp_counters4_pairx_s cnf71xx; 2575}; 2576typedef union cvmx_ipd_port_bp_counters4_pairx cvmx_ipd_port_bp_counters4_pairx_t; 2577 2578/** 2579 * cvmx_ipd_port_bp_counters_pair# 2580 * 2581 * IPD_PORT_BP_COUNTERS_PAIRX = MBUF Counters port Ports used to generate Back Pressure Per Port. 2582 * See also IPD_PORT_BP_COUNTERS2_PAIRX 2583 * See also IPD_PORT_BP_COUNTERS3_PAIRX 2584 * 0x1b8-0x2d0 2585 */ 2586union cvmx_ipd_port_bp_counters_pairx { 2587 uint64_t u64; 2588 struct cvmx_ipd_port_bp_counters_pairx_s { 2589#ifdef __BIG_ENDIAN_BITFIELD 2590 uint64_t reserved_25_63 : 39; 2591 uint64_t cnt_val : 25; /**< Number of MBUFs being used by data on this port. */ 2592#else 2593 uint64_t cnt_val : 25; 2594 uint64_t reserved_25_63 : 39; 2595#endif 2596 } s; 2597 struct cvmx_ipd_port_bp_counters_pairx_s cn30xx; 2598 struct cvmx_ipd_port_bp_counters_pairx_s cn31xx; 2599 struct cvmx_ipd_port_bp_counters_pairx_s cn38xx; 2600 struct cvmx_ipd_port_bp_counters_pairx_s cn38xxp2; 2601 struct cvmx_ipd_port_bp_counters_pairx_s cn50xx; 2602 struct cvmx_ipd_port_bp_counters_pairx_s cn52xx; 2603 struct cvmx_ipd_port_bp_counters_pairx_s cn52xxp1; 2604 struct cvmx_ipd_port_bp_counters_pairx_s cn56xx; 2605 struct cvmx_ipd_port_bp_counters_pairx_s cn56xxp1; 2606 struct cvmx_ipd_port_bp_counters_pairx_s cn58xx; 2607 struct cvmx_ipd_port_bp_counters_pairx_s cn58xxp1; 2608 struct cvmx_ipd_port_bp_counters_pairx_s cn61xx; 2609 struct cvmx_ipd_port_bp_counters_pairx_s cn63xx; 2610 struct cvmx_ipd_port_bp_counters_pairx_s cn63xxp1; 2611 struct cvmx_ipd_port_bp_counters_pairx_s cn66xx; 2612 struct cvmx_ipd_port_bp_counters_pairx_s cnf71xx; 2613}; 2614typedef union cvmx_ipd_port_bp_counters_pairx cvmx_ipd_port_bp_counters_pairx_t; 2615 2616/** 2617 * cvmx_ipd_port_ptr_fifo_ctl 2618 * 2619 * IPD_PORT_PTR_FIFO_CTL = IPD's Reasm-Id Pointer FIFO Control 2620 * 2621 * Allows reading of the Page-Pointers stored in the IPD's Reasm-Id Fifo. 2622 */ 2623union cvmx_ipd_port_ptr_fifo_ctl { 2624 uint64_t u64; 2625 struct cvmx_ipd_port_ptr_fifo_ctl_s { 2626#ifdef __BIG_ENDIAN_BITFIELD 2627 uint64_t reserved_48_63 : 16; 2628 uint64_t ptr : 33; /**< The output of the reasm-id-ptr-fifo. */ 2629 uint64_t max_pkt : 7; /**< Maximum number of Packet-Pointers that are in 2630 in the FIFO. */ 2631 uint64_t cena : 1; /**< Active low Chip Enable to the read the 2632 pwp_fifo. This bit also controls the MUX-select 2633 that steers [RADDR] to the pwp_fifo. 2634 *WARNING - Setting this field to '0' will allow 2635 reading of the memories thorugh the PTR field, 2636 but will cause unpredictable operation of the IPD 2637 under normal operation. */ 2638 uint64_t raddr : 7; /**< Sets the address to read from in the reasm-id 2639 fifo in the IPD. This FIFO holds Packet-Pointers 2640 to be used for packet data storage. */ 2641#else 2642 uint64_t raddr : 7; 2643 uint64_t cena : 1; 2644 uint64_t max_pkt : 7; 2645 uint64_t ptr : 33; 2646 uint64_t reserved_48_63 : 16; 2647#endif 2648 } s; 2649 struct cvmx_ipd_port_ptr_fifo_ctl_s cn68xx; 2650 struct cvmx_ipd_port_ptr_fifo_ctl_s cn68xxp1; 2651}; 2652typedef union cvmx_ipd_port_ptr_fifo_ctl cvmx_ipd_port_ptr_fifo_ctl_t; 2653 2654/** 2655 * cvmx_ipd_port_qos_#_cnt 2656 * 2657 * IPD_PORT_QOS_X_CNT = IPD PortX QOS-0 Count 2658 * 2659 * A counter per port/qos. Counter are originzed in sequence where the first 8 counter (0-7) belong to Port-0 2660 * QOS 0-7 respectively followed by port 1 at (8-15), etc 2661 * Ports 0-3, 32-43 2662 */ 2663union cvmx_ipd_port_qos_x_cnt { 2664 uint64_t u64; 2665 struct cvmx_ipd_port_qos_x_cnt_s { 2666#ifdef __BIG_ENDIAN_BITFIELD 2667 uint64_t wmark : 32; /**< When the field CNT after being modified is equal to 2668 or crosses this value (i.e. value was greater than 2669 then becomes less then, or value was less than and 2670 becomes greater than) the corresponding bit in 2671 IPD_PORT_QOS_INTX is set. */ 2672 uint64_t cnt : 32; /**< The packet related count that is incremented as 2673 specified by IPD_SUB_PORT_QOS_CNT. */ 2674#else 2675 uint64_t cnt : 32; 2676 uint64_t wmark : 32; 2677#endif 2678 } s; 2679 struct cvmx_ipd_port_qos_x_cnt_s cn52xx; 2680 struct cvmx_ipd_port_qos_x_cnt_s cn52xxp1; 2681 struct cvmx_ipd_port_qos_x_cnt_s cn56xx; 2682 struct cvmx_ipd_port_qos_x_cnt_s cn56xxp1; 2683 struct cvmx_ipd_port_qos_x_cnt_s cn61xx; 2684 struct cvmx_ipd_port_qos_x_cnt_s cn63xx; 2685 struct cvmx_ipd_port_qos_x_cnt_s cn63xxp1; 2686 struct cvmx_ipd_port_qos_x_cnt_s cn66xx; 2687 struct cvmx_ipd_port_qos_x_cnt_s cn68xx; 2688 struct cvmx_ipd_port_qos_x_cnt_s cn68xxp1; 2689 struct cvmx_ipd_port_qos_x_cnt_s cnf71xx; 2690}; 2691typedef union cvmx_ipd_port_qos_x_cnt cvmx_ipd_port_qos_x_cnt_t; 2692 2693/** 2694 * cvmx_ipd_port_qos_int# 2695 * 2696 * IPD_PORT_QOS_INTX = IPD PORT-QOS Interrupt 2697 * 2698 * See the description for IPD_PORT_QOS_X_CNT 2699 * 2700 * 0=P0-7; 1=P8-15; 2=P16-23; 3=P24-31; 4=P32-39; 5=P40-47; 6=P48-55; 7=P56-63 2701 * 2702 * Only ports used are: P0-3, P32-39, and P40-47. Therefore only IPD_PORT_QOS_INT0, IPD_PORT_QOS_INT4, 2703 * and IPD_PORT_QOS_INT5 exist and, furthermore: <63:32> of IPD_PORT_QOS_INT0, 2704 * are reserved. 2705 */ 2706union cvmx_ipd_port_qos_intx { 2707 uint64_t u64; 2708 struct cvmx_ipd_port_qos_intx_s { 2709#ifdef __BIG_ENDIAN_BITFIELD 2710 uint64_t intr : 64; /**< Interrupt bits. */ 2711#else 2712 uint64_t intr : 64; 2713#endif 2714 } s; 2715 struct cvmx_ipd_port_qos_intx_s cn52xx; 2716 struct cvmx_ipd_port_qos_intx_s cn52xxp1; 2717 struct cvmx_ipd_port_qos_intx_s cn56xx; 2718 struct cvmx_ipd_port_qos_intx_s cn56xxp1; 2719 struct cvmx_ipd_port_qos_intx_s cn61xx; 2720 struct cvmx_ipd_port_qos_intx_s cn63xx; 2721 struct cvmx_ipd_port_qos_intx_s cn63xxp1; 2722 struct cvmx_ipd_port_qos_intx_s cn66xx; 2723 struct cvmx_ipd_port_qos_intx_s cn68xx; 2724 struct cvmx_ipd_port_qos_intx_s cn68xxp1; 2725 struct cvmx_ipd_port_qos_intx_s cnf71xx; 2726}; 2727typedef union cvmx_ipd_port_qos_intx cvmx_ipd_port_qos_intx_t; 2728 2729/** 2730 * cvmx_ipd_port_qos_int_enb# 2731 * 2732 * IPD_PORT_QOS_INT_ENBX = IPD PORT-QOS Interrupt Enable 2733 * 2734 * When the IPD_PORT_QOS_INTX[\#] is '1' and IPD_PORT_QOS_INT_ENBX[\#] is '1' a interrupt will be generated. 2735 */ 2736union cvmx_ipd_port_qos_int_enbx { 2737 uint64_t u64; 2738 struct cvmx_ipd_port_qos_int_enbx_s { 2739#ifdef __BIG_ENDIAN_BITFIELD 2740 uint64_t enb : 64; /**< Enable bits. */ 2741#else 2742 uint64_t enb : 64; 2743#endif 2744 } s; 2745 struct cvmx_ipd_port_qos_int_enbx_s cn52xx; 2746 struct cvmx_ipd_port_qos_int_enbx_s cn52xxp1; 2747 struct cvmx_ipd_port_qos_int_enbx_s cn56xx; 2748 struct cvmx_ipd_port_qos_int_enbx_s cn56xxp1; 2749 struct cvmx_ipd_port_qos_int_enbx_s cn61xx; 2750 struct cvmx_ipd_port_qos_int_enbx_s cn63xx; 2751 struct cvmx_ipd_port_qos_int_enbx_s cn63xxp1; 2752 struct cvmx_ipd_port_qos_int_enbx_s cn66xx; 2753 struct cvmx_ipd_port_qos_int_enbx_s cn68xx; 2754 struct cvmx_ipd_port_qos_int_enbx_s cn68xxp1; 2755 struct cvmx_ipd_port_qos_int_enbx_s cnf71xx; 2756}; 2757typedef union cvmx_ipd_port_qos_int_enbx cvmx_ipd_port_qos_int_enbx_t; 2758 2759/** 2760 * cvmx_ipd_port_sop# 2761 * 2762 * IPD_PORT_SOP = IPD Reasm-Id SOP 2763 * 2764 * Set when a SOP is detected on a reasm-num. Where the reasm-num value set the bit vector of this register. 2765 */ 2766union cvmx_ipd_port_sopx { 2767 uint64_t u64; 2768 struct cvmx_ipd_port_sopx_s { 2769#ifdef __BIG_ENDIAN_BITFIELD 2770 uint64_t sop : 64; /**< When set '1' a SOP was detected on a reasm-num, 2771 When clear '0' no SOP was yet received or an EOP 2772 was received on the reasm-num. 2773 IPD only supports 63 reasm-nums, so bit [63] 2774 should never be set. */ 2775#else 2776 uint64_t sop : 64; 2777#endif 2778 } s; 2779 struct cvmx_ipd_port_sopx_s cn68xx; 2780 struct cvmx_ipd_port_sopx_s cn68xxp1; 2781}; 2782typedef union cvmx_ipd_port_sopx cvmx_ipd_port_sopx_t; 2783 2784/** 2785 * cvmx_ipd_prc_hold_ptr_fifo_ctl 2786 * 2787 * IPD_PRC_HOLD_PTR_FIFO_CTL = IPD's PRC Holding Pointer FIFO Control 2788 * 2789 * Allows reading of the Page-Pointers stored in the IPD's PRC Holding Fifo. 2790 */ 2791union cvmx_ipd_prc_hold_ptr_fifo_ctl { 2792 uint64_t u64; 2793 struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s { 2794#ifdef __BIG_ENDIAN_BITFIELD 2795 uint64_t reserved_39_63 : 25; 2796 uint64_t max_pkt : 3; /**< Maximum number of Packet-Pointers that COULD be 2797 in the FIFO. */ 2798 uint64_t praddr : 3; /**< Present Packet-Pointer read address. */ 2799 uint64_t ptr : 29; /**< The output of the prc-holding-fifo. */ 2800 uint64_t cena : 1; /**< Active low Chip Enable that controls the 2801 MUX-select that steers [RADDR] to the fifo. 2802 *WARNING - Setting this field to '0' will allow 2803 reading of the memories thorugh the PTR field, 2804 but will cause unpredictable operation of the IPD 2805 under normal operation. */ 2806 uint64_t raddr : 3; /**< Sets the address to read from in the holding. 2807 fifo in the PRC. This FIFO holds Packet-Pointers 2808 to be used for packet data storage. */ 2809#else 2810 uint64_t raddr : 3; 2811 uint64_t cena : 1; 2812 uint64_t ptr : 29; 2813 uint64_t praddr : 3; 2814 uint64_t max_pkt : 3; 2815 uint64_t reserved_39_63 : 25; 2816#endif 2817 } s; 2818 struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn30xx; 2819 struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn31xx; 2820 struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn38xx; 2821 struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn50xx; 2822 struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn52xx; 2823 struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn52xxp1; 2824 struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn56xx; 2825 struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn56xxp1; 2826 struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn58xx; 2827 struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn58xxp1; 2828 struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn61xx; 2829 struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn63xx; 2830 struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn63xxp1; 2831 struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cn66xx; 2832 struct cvmx_ipd_prc_hold_ptr_fifo_ctl_s cnf71xx; 2833}; 2834typedef union cvmx_ipd_prc_hold_ptr_fifo_ctl cvmx_ipd_prc_hold_ptr_fifo_ctl_t; 2835 2836/** 2837 * cvmx_ipd_prc_port_ptr_fifo_ctl 2838 * 2839 * IPD_PRC_PORT_PTR_FIFO_CTL = IPD's PRC PORT Pointer FIFO Control 2840 * 2841 * Allows reading of the Page-Pointers stored in the IPD's PRC PORT Fifo. 2842 */ 2843union cvmx_ipd_prc_port_ptr_fifo_ctl { 2844 uint64_t u64; 2845 struct cvmx_ipd_prc_port_ptr_fifo_ctl_s { 2846#ifdef __BIG_ENDIAN_BITFIELD 2847 uint64_t reserved_44_63 : 20; 2848 uint64_t max_pkt : 7; /**< Maximum number of Packet-Pointers that are in 2849 in the FIFO. */ 2850 uint64_t ptr : 29; /**< The output of the prc-port-ptr-fifo. */ 2851 uint64_t cena : 1; /**< Active low Chip Enable to the read port of the 2852 pwp_fifo. This bit also controls the MUX-select 2853 that steers [RADDR] to the pwp_fifo. 2854 *WARNING - Setting this field to '0' will allow 2855 reading of the memories thorugh the PTR field, 2856 but will cause unpredictable operation of the IPD 2857 under normal operation. */ 2858 uint64_t raddr : 7; /**< Sets the address to read from in the port 2859 fifo in the PRC. This FIFO holds Packet-Pointers 2860 to be used for packet data storage. */ 2861#else 2862 uint64_t raddr : 7; 2863 uint64_t cena : 1; 2864 uint64_t ptr : 29; 2865 uint64_t max_pkt : 7; 2866 uint64_t reserved_44_63 : 20; 2867#endif 2868 } s; 2869 struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn30xx; 2870 struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn31xx; 2871 struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn38xx; 2872 struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn50xx; 2873 struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn52xx; 2874 struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn52xxp1; 2875 struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn56xx; 2876 struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn56xxp1; 2877 struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn58xx; 2878 struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn58xxp1; 2879 struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn61xx; 2880 struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn63xx; 2881 struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn63xxp1; 2882 struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cn66xx; 2883 struct cvmx_ipd_prc_port_ptr_fifo_ctl_s cnf71xx; 2884}; 2885typedef union cvmx_ipd_prc_port_ptr_fifo_ctl cvmx_ipd_prc_port_ptr_fifo_ctl_t; 2886 2887/** 2888 * cvmx_ipd_ptr_count 2889 * 2890 * IPD_PTR_COUNT = IPD Page Pointer Count 2891 * 2892 * Shows the number of WQE and Packet Page Pointers stored in the IPD. 2893 */ 2894union cvmx_ipd_ptr_count { 2895 uint64_t u64; 2896 struct cvmx_ipd_ptr_count_s { 2897#ifdef __BIG_ENDIAN_BITFIELD 2898 uint64_t reserved_19_63 : 45; 2899 uint64_t pktv_cnt : 1; /**< PKT Ptr Valid. */ 2900 uint64_t wqev_cnt : 1; /**< WQE Ptr Valid. This value is '1' when a WQE 2901 is being for use by the IPD. The value of this 2902 field should be added to tha value of the 2903 WQE_PCNT field, of this register, for a total 2904 count of the WQE Page Pointers being held by IPD. 2905 When IPD_CTL_STATUS[NO_WPTR] is set '1' this field 2906 represents a Packet-Pointer NOT a WQE pointer. */ 2907 uint64_t pfif_cnt : 3; /**< See PKT_PCNT. */ 2908 uint64_t pkt_pcnt : 7; /**< This value plus PFIF_CNT plus 2909 IPD_PRC_PORT_PTR_FIFO_CTL[MAX_PKT] is the number 2910 of PKT Page Pointers in IPD. */ 2911 uint64_t wqe_pcnt : 7; /**< Number of page pointers for WQE storage that are 2912 buffered in the IPD. The total count is the value 2913 of this buffer plus the field [WQEV_CNT]. For 2914 PASS-1 (which does not have the WQEV_CNT field) 2915 when the value of this register is '0' there still 2916 may be 1 pointer being held by IPD. */ 2917#else 2918 uint64_t wqe_pcnt : 7; 2919 uint64_t pkt_pcnt : 7; 2920 uint64_t pfif_cnt : 3; 2921 uint64_t wqev_cnt : 1; 2922 uint64_t pktv_cnt : 1; 2923 uint64_t reserved_19_63 : 45; 2924#endif 2925 } s; 2926 struct cvmx_ipd_ptr_count_s cn30xx; 2927 struct cvmx_ipd_ptr_count_s cn31xx; 2928 struct cvmx_ipd_ptr_count_s cn38xx; 2929 struct cvmx_ipd_ptr_count_s cn38xxp2; 2930 struct cvmx_ipd_ptr_count_s cn50xx; 2931 struct cvmx_ipd_ptr_count_s cn52xx; 2932 struct cvmx_ipd_ptr_count_s cn52xxp1; 2933 struct cvmx_ipd_ptr_count_s cn56xx; 2934 struct cvmx_ipd_ptr_count_s cn56xxp1; 2935 struct cvmx_ipd_ptr_count_s cn58xx; 2936 struct cvmx_ipd_ptr_count_s cn58xxp1; 2937 struct cvmx_ipd_ptr_count_s cn61xx; 2938 struct cvmx_ipd_ptr_count_s cn63xx; 2939 struct cvmx_ipd_ptr_count_s cn63xxp1; 2940 struct cvmx_ipd_ptr_count_s cn66xx; 2941 struct cvmx_ipd_ptr_count_s cn68xx; 2942 struct cvmx_ipd_ptr_count_s cn68xxp1; 2943 struct cvmx_ipd_ptr_count_s cnf71xx; 2944}; 2945typedef union cvmx_ipd_ptr_count cvmx_ipd_ptr_count_t; 2946 2947/** 2948 * cvmx_ipd_pwp_ptr_fifo_ctl 2949 * 2950 * IPD_PWP_PTR_FIFO_CTL = IPD's PWP Pointer FIFO Control 2951 * 2952 * Allows reading of the Page-Pointers stored in the IPD's PWP Fifo. 2953 */ 2954union cvmx_ipd_pwp_ptr_fifo_ctl { 2955 uint64_t u64; 2956 struct cvmx_ipd_pwp_ptr_fifo_ctl_s { 2957#ifdef __BIG_ENDIAN_BITFIELD 2958 uint64_t reserved_61_63 : 3; 2959 uint64_t max_cnts : 7; /**< Maximum number of Packet-Pointers or WQE-Pointers 2960 that COULD be in the FIFO. 2961 When IPD_CTL_STATUS[NO_WPTR] is set '1' this field 2962 only represents the Max number of Packet-Pointers, 2963 WQE-Pointers are not used in this mode. */ 2964 uint64_t wraddr : 8; /**< Present FIFO WQE Read address. */ 2965 uint64_t praddr : 8; /**< Present FIFO Packet Read address. */ 2966 uint64_t ptr : 29; /**< The output of the pwp_fifo. */ 2967 uint64_t cena : 1; /**< Active low Chip Enable to the read port of the 2968 pwp_fifo. This bit also controls the MUX-select 2969 that steers [RADDR] to the pwp_fifo. 2970 *WARNING - Setting this field to '0' will allow 2971 reading of the memories thorugh the PTR field, 2972 but will cause unpredictable operation of the IPD 2973 under normal operation. */ 2974 uint64_t raddr : 8; /**< Sets the address to read from in the pwp_fifo. 2975 Addresses 0 through 63 contain Packet-Pointers and 2976 addresses 64 through 127 contain WQE-Pointers. 2977 When IPD_CTL_STATUS[NO_WPTR] is set '1' addresses 2978 64 through 127 are not valid. */ 2979#else 2980 uint64_t raddr : 8; 2981 uint64_t cena : 1; 2982 uint64_t ptr : 29; 2983 uint64_t praddr : 8; 2984 uint64_t wraddr : 8; 2985 uint64_t max_cnts : 7; 2986 uint64_t reserved_61_63 : 3; 2987#endif 2988 } s; 2989 struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn30xx; 2990 struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn31xx; 2991 struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn38xx; 2992 struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn50xx; 2993 struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn52xx; 2994 struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn52xxp1; 2995 struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn56xx; 2996 struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn56xxp1; 2997 struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn58xx; 2998 struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn58xxp1; 2999 struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn61xx; 3000 struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn63xx; 3001 struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn63xxp1; 3002 struct cvmx_ipd_pwp_ptr_fifo_ctl_s cn66xx; 3003 struct cvmx_ipd_pwp_ptr_fifo_ctl_s cnf71xx; 3004}; 3005typedef union cvmx_ipd_pwp_ptr_fifo_ctl cvmx_ipd_pwp_ptr_fifo_ctl_t; 3006 3007/** 3008 * cvmx_ipd_qos#_red_marks 3009 * 3010 * IPD_QOS0_RED_MARKS = IPD QOS 0 Marks Red High Low 3011 * 3012 * Set the pass-drop marks for qos level. 3013 */ 3014union cvmx_ipd_qosx_red_marks { 3015 uint64_t u64; 3016 struct cvmx_ipd_qosx_red_marks_s { 3017#ifdef __BIG_ENDIAN_BITFIELD 3018 uint64_t drop : 32; /**< Packets will be dropped when the average value of 3019 IPD_QUE0_FREE_PAGE_CNT is equal to or less than 3020 this value. */ 3021 uint64_t pass : 32; /**< Packets will be passed when the average value of 3022 IPD_QUE0_FREE_PAGE_CNT is larger than this value. */ 3023#else 3024 uint64_t pass : 32; 3025 uint64_t drop : 32; 3026#endif 3027 } s; 3028 struct cvmx_ipd_qosx_red_marks_s cn30xx; 3029 struct cvmx_ipd_qosx_red_marks_s cn31xx; 3030 struct cvmx_ipd_qosx_red_marks_s cn38xx; 3031 struct cvmx_ipd_qosx_red_marks_s cn38xxp2; 3032 struct cvmx_ipd_qosx_red_marks_s cn50xx; 3033 struct cvmx_ipd_qosx_red_marks_s cn52xx; 3034 struct cvmx_ipd_qosx_red_marks_s cn52xxp1; 3035 struct cvmx_ipd_qosx_red_marks_s cn56xx; 3036 struct cvmx_ipd_qosx_red_marks_s cn56xxp1; 3037 struct cvmx_ipd_qosx_red_marks_s cn58xx; 3038 struct cvmx_ipd_qosx_red_marks_s cn58xxp1; 3039 struct cvmx_ipd_qosx_red_marks_s cn61xx; 3040 struct cvmx_ipd_qosx_red_marks_s cn63xx; 3041 struct cvmx_ipd_qosx_red_marks_s cn63xxp1; 3042 struct cvmx_ipd_qosx_red_marks_s cn66xx; 3043 struct cvmx_ipd_qosx_red_marks_s cn68xx; 3044 struct cvmx_ipd_qosx_red_marks_s cn68xxp1; 3045 struct cvmx_ipd_qosx_red_marks_s cnf71xx; 3046}; 3047typedef union cvmx_ipd_qosx_red_marks cvmx_ipd_qosx_red_marks_t; 3048 3049/** 3050 * cvmx_ipd_que0_free_page_cnt 3051 * 3052 * IPD_QUE0_FREE_PAGE_CNT = IPD Queue0 Free Page Count 3053 * 3054 * Number of Free-Page Pointer that are available for use in the FPA for Queue-0. 3055 */ 3056union cvmx_ipd_que0_free_page_cnt { 3057 uint64_t u64; 3058 struct cvmx_ipd_que0_free_page_cnt_s { 3059#ifdef __BIG_ENDIAN_BITFIELD 3060 uint64_t reserved_32_63 : 32; 3061 uint64_t q0_pcnt : 32; /**< Number of Queue-0 Page Pointers Available. */ 3062#else 3063 uint64_t q0_pcnt : 32; 3064 uint64_t reserved_32_63 : 32; 3065#endif 3066 } s; 3067 struct cvmx_ipd_que0_free_page_cnt_s cn30xx; 3068 struct cvmx_ipd_que0_free_page_cnt_s cn31xx; 3069 struct cvmx_ipd_que0_free_page_cnt_s cn38xx; 3070 struct cvmx_ipd_que0_free_page_cnt_s cn38xxp2; 3071 struct cvmx_ipd_que0_free_page_cnt_s cn50xx; 3072 struct cvmx_ipd_que0_free_page_cnt_s cn52xx; 3073 struct cvmx_ipd_que0_free_page_cnt_s cn52xxp1; 3074 struct cvmx_ipd_que0_free_page_cnt_s cn56xx; 3075 struct cvmx_ipd_que0_free_page_cnt_s cn56xxp1; 3076 struct cvmx_ipd_que0_free_page_cnt_s cn58xx; 3077 struct cvmx_ipd_que0_free_page_cnt_s cn58xxp1; 3078 struct cvmx_ipd_que0_free_page_cnt_s cn61xx; 3079 struct cvmx_ipd_que0_free_page_cnt_s cn63xx; 3080 struct cvmx_ipd_que0_free_page_cnt_s cn63xxp1; 3081 struct cvmx_ipd_que0_free_page_cnt_s cn66xx; 3082 struct cvmx_ipd_que0_free_page_cnt_s cn68xx; 3083 struct cvmx_ipd_que0_free_page_cnt_s cn68xxp1; 3084 struct cvmx_ipd_que0_free_page_cnt_s cnf71xx; 3085}; 3086typedef union cvmx_ipd_que0_free_page_cnt cvmx_ipd_que0_free_page_cnt_t; 3087 3088/** 3089 * cvmx_ipd_red_bpid_enable# 3090 * 3091 * IPD_RED_BPID_ENABLE = IPD RED BPID Enable 3092 * 3093 * Set the pass-drop marks for qos level. 3094 */ 3095union cvmx_ipd_red_bpid_enablex { 3096 uint64_t u64; 3097 struct cvmx_ipd_red_bpid_enablex_s { 3098#ifdef __BIG_ENDIAN_BITFIELD 3099 uint64_t prt_enb : 64; /**< The bit position will enable the corresponding 3100 BPIDs ability to have packets dropped by RED 3101 probability. */ 3102#else 3103 uint64_t prt_enb : 64; 3104#endif 3105 } s; 3106 struct cvmx_ipd_red_bpid_enablex_s cn68xx; 3107 struct cvmx_ipd_red_bpid_enablex_s cn68xxp1; 3108}; 3109typedef union cvmx_ipd_red_bpid_enablex cvmx_ipd_red_bpid_enablex_t; 3110 3111/** 3112 * cvmx_ipd_red_delay 3113 * 3114 * IPD_RED_DELAY = IPD RED BPID Enable 3115 * 3116 * Set the pass-drop marks for qos level. 3117 */ 3118union cvmx_ipd_red_delay { 3119 uint64_t u64; 3120 struct cvmx_ipd_red_delay_s { 3121#ifdef __BIG_ENDIAN_BITFIELD 3122 uint64_t reserved_28_63 : 36; 3123 uint64_t prb_dly : 14; /**< Number (core clocks periods + 68) * 8 to wait 3124 before calculating the new packet drop 3125 probability for each QOS level. */ 3126 uint64_t avg_dly : 14; /**< Number (core clocks periods + 10) * 8 to wait 3127 before calculating the moving average for each 3128 QOS level. 3129 Larger AVG_DLY values cause the moving averages 3130 of ALL QOS levels to track changes in the actual 3131 free space more slowly. Smaller NEW_CON (and 3132 larger AVG_CON) values can have a similar effect, 3133 but only affect an individual QOS level, rather 3134 than all. */ 3135#else 3136 uint64_t avg_dly : 14; 3137 uint64_t prb_dly : 14; 3138 uint64_t reserved_28_63 : 36; 3139#endif 3140 } s; 3141 struct cvmx_ipd_red_delay_s cn68xx; 3142 struct cvmx_ipd_red_delay_s cn68xxp1; 3143}; 3144typedef union cvmx_ipd_red_delay cvmx_ipd_red_delay_t; 3145 3146/** 3147 * cvmx_ipd_red_port_enable 3148 * 3149 * IPD_RED_PORT_ENABLE = IPD RED Port Enable 3150 * 3151 * Set the pass-drop marks for qos level. 3152 */ 3153union cvmx_ipd_red_port_enable { 3154 uint64_t u64; 3155 struct cvmx_ipd_red_port_enable_s { 3156#ifdef __BIG_ENDIAN_BITFIELD 3157 uint64_t prb_dly : 14; /**< Number (core clocks periods + 68) * 8 to wait 3158 before calculating the new packet drop 3159 probability for each QOS level. */ 3160 uint64_t avg_dly : 14; /**< Number (core clocks periods + 10) * 8 to wait 3161 before calculating the moving average for each 3162 QOS level. 3163 Larger AVG_DLY values cause the moving averages 3164 of ALL QOS levels to track changes in the actual 3165 free space more slowly. Smaller NEW_CON (and 3166 larger AVG_CON) values can have a similar effect, 3167 but only affect an individual QOS level, rather 3168 than all. */ 3169 uint64_t prt_enb : 36; /**< The bit position will enable the corresponding 3170 Ports ability to have packets dropped by RED 3171 probability. */ 3172#else 3173 uint64_t prt_enb : 36; 3174 uint64_t avg_dly : 14; 3175 uint64_t prb_dly : 14; 3176#endif 3177 } s; 3178 struct cvmx_ipd_red_port_enable_s cn30xx; 3179 struct cvmx_ipd_red_port_enable_s cn31xx; 3180 struct cvmx_ipd_red_port_enable_s cn38xx; 3181 struct cvmx_ipd_red_port_enable_s cn38xxp2; 3182 struct cvmx_ipd_red_port_enable_s cn50xx; 3183 struct cvmx_ipd_red_port_enable_s cn52xx; 3184 struct cvmx_ipd_red_port_enable_s cn52xxp1; 3185 struct cvmx_ipd_red_port_enable_s cn56xx; 3186 struct cvmx_ipd_red_port_enable_s cn56xxp1; 3187 struct cvmx_ipd_red_port_enable_s cn58xx; 3188 struct cvmx_ipd_red_port_enable_s cn58xxp1; 3189 struct cvmx_ipd_red_port_enable_s cn61xx; 3190 struct cvmx_ipd_red_port_enable_s cn63xx; 3191 struct cvmx_ipd_red_port_enable_s cn63xxp1; 3192 struct cvmx_ipd_red_port_enable_s cn66xx; 3193 struct cvmx_ipd_red_port_enable_s cnf71xx; 3194}; 3195typedef union cvmx_ipd_red_port_enable cvmx_ipd_red_port_enable_t; 3196 3197/** 3198 * cvmx_ipd_red_port_enable2 3199 * 3200 * IPD_RED_PORT_ENABLE2 = IPD RED Port Enable2 3201 * 3202 * Set the pass-drop marks for qos level. 3203 */ 3204union cvmx_ipd_red_port_enable2 { 3205 uint64_t u64; 3206 struct cvmx_ipd_red_port_enable2_s { 3207#ifdef __BIG_ENDIAN_BITFIELD 3208 uint64_t reserved_12_63 : 52; 3209 uint64_t prt_enb : 12; /**< Bits 11-0 corresponds to ports 47-36. These bits 3210 have the same meaning as the PRT_ENB field of 3211 IPD_RED_PORT_ENABLE. */ 3212#else 3213 uint64_t prt_enb : 12; 3214 uint64_t reserved_12_63 : 52; 3215#endif 3216 } s; 3217 struct cvmx_ipd_red_port_enable2_cn52xx { 3218#ifdef __BIG_ENDIAN_BITFIELD 3219 uint64_t reserved_4_63 : 60; 3220 uint64_t prt_enb : 4; /**< Bits 3-0 cooresponds to ports 39-36. These bits 3221 have the same meaning as the PRT_ENB field of 3222 IPD_RED_PORT_ENABLE. */ 3223#else 3224 uint64_t prt_enb : 4; 3225 uint64_t reserved_4_63 : 60; 3226#endif 3227 } cn52xx; 3228 struct cvmx_ipd_red_port_enable2_cn52xx cn52xxp1; 3229 struct cvmx_ipd_red_port_enable2_cn52xx cn56xx; 3230 struct cvmx_ipd_red_port_enable2_cn52xx cn56xxp1; 3231 struct cvmx_ipd_red_port_enable2_s cn61xx; 3232 struct cvmx_ipd_red_port_enable2_cn63xx { 3233#ifdef __BIG_ENDIAN_BITFIELD 3234 uint64_t reserved_8_63 : 56; 3235 uint64_t prt_enb : 8; /**< Bits 7-0 corresponds to ports 43-36. These bits 3236 have the same meaning as the PRT_ENB field of 3237 IPD_RED_PORT_ENABLE. */ 3238#else 3239 uint64_t prt_enb : 8; 3240 uint64_t reserved_8_63 : 56; 3241#endif 3242 } cn63xx; 3243 struct cvmx_ipd_red_port_enable2_cn63xx cn63xxp1; 3244 struct cvmx_ipd_red_port_enable2_s cn66xx; 3245 struct cvmx_ipd_red_port_enable2_s cnf71xx; 3246}; 3247typedef union cvmx_ipd_red_port_enable2 cvmx_ipd_red_port_enable2_t; 3248 3249/** 3250 * cvmx_ipd_red_que#_param 3251 * 3252 * IPD_RED_QUE0_PARAM = IPD RED Queue-0 Parameters 3253 * 3254 * Value control the Passing and Dropping of packets by the red engine for QOS Level-0. 3255 */ 3256union cvmx_ipd_red_quex_param { 3257 uint64_t u64; 3258 struct cvmx_ipd_red_quex_param_s { 3259#ifdef __BIG_ENDIAN_BITFIELD 3260 uint64_t reserved_49_63 : 15; 3261 uint64_t use_pcnt : 1; /**< When set '1' red will use the actual Packet-Page 3262 Count in place of the Average for RED calculations. */ 3263 uint64_t new_con : 8; /**< This value is used control how much of the present 3264 Actual Queue Size is used to calculate the new 3265 Average Queue Size. The value is a number from 0 3266 256, which represents NEW_CON/256 of the Actual 3267 Queue Size that will be used in the calculation. 3268 The number in this field plus the value of 3269 AVG_CON must be equal to 256. 3270 Larger AVG_DLY values cause the moving averages 3271 of ALL QOS levels to track changes in the actual 3272 free space more slowly. Smaller NEW_CON (and 3273 larger AVG_CON) values can have a similar effect, 3274 but only affect an individual QOS level, rather 3275 than all. */ 3276 uint64_t avg_con : 8; /**< This value is used control how much of the present 3277 Average Queue Size is used to calculate the new 3278 Average Queue Size. The value is a number from 0 3279 256, which represents AVG_CON/256 of the Average 3280 Queue Size that will be used in the calculation. 3281 The number in this field plus the value of 3282 NEW_CON must be equal to 256. 3283 Larger AVG_DLY values cause the moving averages 3284 of ALL QOS levels to track changes in the actual 3285 free space more slowly. Smaller NEW_CON (and 3286 larger AVG_CON) values can have a similar effect, 3287 but only affect an individual QOS level, rather 3288 than all. */ 3289 uint64_t prb_con : 32; /**< Used in computing the probability of a packet being 3290 passed or drop by the WRED engine. The field is 3291 calculated to be (255 * 2^24)/(PASS-DROP). Where 3292 PASS and DROP are the field from the 3293 IPD_QOS0_RED_MARKS CSR. */ 3294#else 3295 uint64_t prb_con : 32; 3296 uint64_t avg_con : 8; 3297 uint64_t new_con : 8; 3298 uint64_t use_pcnt : 1; 3299 uint64_t reserved_49_63 : 15; 3300#endif 3301 } s; 3302 struct cvmx_ipd_red_quex_param_s cn30xx; 3303 struct cvmx_ipd_red_quex_param_s cn31xx; 3304 struct cvmx_ipd_red_quex_param_s cn38xx; 3305 struct cvmx_ipd_red_quex_param_s cn38xxp2; 3306 struct cvmx_ipd_red_quex_param_s cn50xx; 3307 struct cvmx_ipd_red_quex_param_s cn52xx; 3308 struct cvmx_ipd_red_quex_param_s cn52xxp1; 3309 struct cvmx_ipd_red_quex_param_s cn56xx; 3310 struct cvmx_ipd_red_quex_param_s cn56xxp1; 3311 struct cvmx_ipd_red_quex_param_s cn58xx; 3312 struct cvmx_ipd_red_quex_param_s cn58xxp1; 3313 struct cvmx_ipd_red_quex_param_s cn61xx; 3314 struct cvmx_ipd_red_quex_param_s cn63xx; 3315 struct cvmx_ipd_red_quex_param_s cn63xxp1; 3316 struct cvmx_ipd_red_quex_param_s cn66xx; 3317 struct cvmx_ipd_red_quex_param_s cn68xx; 3318 struct cvmx_ipd_red_quex_param_s cn68xxp1; 3319 struct cvmx_ipd_red_quex_param_s cnf71xx; 3320}; 3321typedef union cvmx_ipd_red_quex_param cvmx_ipd_red_quex_param_t; 3322 3323/** 3324 * cvmx_ipd_req_wgt 3325 * 3326 * IPD_REQ_WGT = IPD REQ weights 3327 * 3328 * There are 8 devices that can request to send packet traffic to the IPD. These weights are used for the Weighted Round Robin 3329 * grant generated by the IPD to requestors. 3330 */ 3331union cvmx_ipd_req_wgt { 3332 uint64_t u64; 3333 struct cvmx_ipd_req_wgt_s { 3334#ifdef __BIG_ENDIAN_BITFIELD 3335 uint64_t wgt7 : 8; /**< Weight for ILK REQ */ 3336 uint64_t wgt6 : 8; /**< Weight for PKO REQ */ 3337 uint64_t wgt5 : 8; /**< Weight for DPI REQ */ 3338 uint64_t wgt4 : 8; /**< Weight for AGX4 REQ */ 3339 uint64_t wgt3 : 8; /**< Weight for AGX3 REQ */ 3340 uint64_t wgt2 : 8; /**< Weight for AGX2 REQ */ 3341 uint64_t wgt1 : 8; /**< Weight for AGX1 REQ */ 3342 uint64_t wgt0 : 8; /**< Weight for AGX0 REQ */ 3343#else 3344 uint64_t wgt0 : 8; 3345 uint64_t wgt1 : 8; 3346 uint64_t wgt2 : 8; 3347 uint64_t wgt3 : 8; 3348 uint64_t wgt4 : 8; 3349 uint64_t wgt5 : 8; 3350 uint64_t wgt6 : 8; 3351 uint64_t wgt7 : 8; 3352#endif 3353 } s; 3354 struct cvmx_ipd_req_wgt_s cn68xx; 3355}; 3356typedef union cvmx_ipd_req_wgt cvmx_ipd_req_wgt_t; 3357 3358/** 3359 * cvmx_ipd_sub_port_bp_page_cnt 3360 * 3361 * IPD_SUB_PORT_BP_PAGE_CNT = IPD Subtract Port Backpressure Page Count 3362 * 3363 * Will add the value to the indicated port count register, the number of pages supplied. The value added should 3364 * be the 2's complement of the value that needs to be subtracted. Users add 2's complement values to the 3365 * port-mbuf-count register to return (lower the count) mbufs to the counter in order to avoid port-level 3366 * backpressure being applied to the port. Backpressure is applied when the MBUF used count of a port exceeds the 3367 * value in the IPD_PORTX_BP_PAGE_CNT, IPD_PORTX_BP_PAGE_CNT2, and IPD_PORTX_BP_PAGE_CNT3. 3368 * 3369 * This register can't be written from the PCI via a window write. 3370 */ 3371union cvmx_ipd_sub_port_bp_page_cnt { 3372 uint64_t u64; 3373 struct cvmx_ipd_sub_port_bp_page_cnt_s { 3374#ifdef __BIG_ENDIAN_BITFIELD 3375 uint64_t reserved_31_63 : 33; 3376 uint64_t port : 6; /**< The port to add the PAGE_CNT field to. */ 3377 uint64_t page_cnt : 25; /**< The number of page pointers to add to 3378 the port counter pointed to by the 3379 PORT Field. */ 3380#else 3381 uint64_t page_cnt : 25; 3382 uint64_t port : 6; 3383 uint64_t reserved_31_63 : 33; 3384#endif 3385 } s; 3386 struct cvmx_ipd_sub_port_bp_page_cnt_s cn30xx; 3387 struct cvmx_ipd_sub_port_bp_page_cnt_s cn31xx; 3388 struct cvmx_ipd_sub_port_bp_page_cnt_s cn38xx; 3389 struct cvmx_ipd_sub_port_bp_page_cnt_s cn38xxp2; 3390 struct cvmx_ipd_sub_port_bp_page_cnt_s cn50xx; 3391 struct cvmx_ipd_sub_port_bp_page_cnt_s cn52xx; 3392 struct cvmx_ipd_sub_port_bp_page_cnt_s cn52xxp1; 3393 struct cvmx_ipd_sub_port_bp_page_cnt_s cn56xx; 3394 struct cvmx_ipd_sub_port_bp_page_cnt_s cn56xxp1; 3395 struct cvmx_ipd_sub_port_bp_page_cnt_s cn58xx; 3396 struct cvmx_ipd_sub_port_bp_page_cnt_s cn58xxp1; 3397 struct cvmx_ipd_sub_port_bp_page_cnt_s cn61xx; 3398 struct cvmx_ipd_sub_port_bp_page_cnt_s cn63xx; 3399 struct cvmx_ipd_sub_port_bp_page_cnt_s cn63xxp1; 3400 struct cvmx_ipd_sub_port_bp_page_cnt_s cn66xx; 3401 struct cvmx_ipd_sub_port_bp_page_cnt_s cn68xx; 3402 struct cvmx_ipd_sub_port_bp_page_cnt_s cn68xxp1; 3403 struct cvmx_ipd_sub_port_bp_page_cnt_s cnf71xx; 3404}; 3405typedef union cvmx_ipd_sub_port_bp_page_cnt cvmx_ipd_sub_port_bp_page_cnt_t; 3406 3407/** 3408 * cvmx_ipd_sub_port_fcs 3409 * 3410 * IPD_SUB_PORT_FCS = IPD Subtract Ports FCS Register 3411 * 3412 * When set '1' the port corresponding to the bit set will subtract 4 bytes from the end of 3413 * the packet. 3414 */ 3415union cvmx_ipd_sub_port_fcs { 3416 uint64_t u64; 3417 struct cvmx_ipd_sub_port_fcs_s { 3418#ifdef __BIG_ENDIAN_BITFIELD 3419 uint64_t reserved_40_63 : 24; 3420 uint64_t port_bit2 : 4; /**< When set '1', the port corresponding to the bit 3421 position set, will subtract the FCS for packets 3422 on that port. */ 3423 uint64_t reserved_32_35 : 4; 3424 uint64_t port_bit : 32; /**< When set '1', the port corresponding to the bit 3425 position set, will subtract the FCS for packets 3426 on that port. */ 3427#else 3428 uint64_t port_bit : 32; 3429 uint64_t reserved_32_35 : 4; 3430 uint64_t port_bit2 : 4; 3431 uint64_t reserved_40_63 : 24; 3432#endif 3433 } s; 3434 struct cvmx_ipd_sub_port_fcs_cn30xx { 3435#ifdef __BIG_ENDIAN_BITFIELD 3436 uint64_t reserved_3_63 : 61; 3437 uint64_t port_bit : 3; /**< When set '1', the port corresponding to the bit 3438 position set, will subtract the FCS for packets 3439 on that port. */ 3440#else 3441 uint64_t port_bit : 3; 3442 uint64_t reserved_3_63 : 61; 3443#endif 3444 } cn30xx; 3445 struct cvmx_ipd_sub_port_fcs_cn30xx cn31xx; 3446 struct cvmx_ipd_sub_port_fcs_cn38xx { 3447#ifdef __BIG_ENDIAN_BITFIELD 3448 uint64_t reserved_32_63 : 32; 3449 uint64_t port_bit : 32; /**< When set '1', the port corresponding to the bit 3450 position set, will subtract the FCS for packets 3451 on that port. */ 3452#else 3453 uint64_t port_bit : 32; 3454 uint64_t reserved_32_63 : 32; 3455#endif 3456 } cn38xx; 3457 struct cvmx_ipd_sub_port_fcs_cn38xx cn38xxp2; 3458 struct cvmx_ipd_sub_port_fcs_cn30xx cn50xx; 3459 struct cvmx_ipd_sub_port_fcs_s cn52xx; 3460 struct cvmx_ipd_sub_port_fcs_s cn52xxp1; 3461 struct cvmx_ipd_sub_port_fcs_s cn56xx; 3462 struct cvmx_ipd_sub_port_fcs_s cn56xxp1; 3463 struct cvmx_ipd_sub_port_fcs_cn38xx cn58xx; 3464 struct cvmx_ipd_sub_port_fcs_cn38xx cn58xxp1; 3465 struct cvmx_ipd_sub_port_fcs_s cn61xx; 3466 struct cvmx_ipd_sub_port_fcs_s cn63xx; 3467 struct cvmx_ipd_sub_port_fcs_s cn63xxp1; 3468 struct cvmx_ipd_sub_port_fcs_s cn66xx; 3469 struct cvmx_ipd_sub_port_fcs_s cnf71xx; 3470}; 3471typedef union cvmx_ipd_sub_port_fcs cvmx_ipd_sub_port_fcs_t; 3472 3473/** 3474 * cvmx_ipd_sub_port_qos_cnt 3475 * 3476 * IPD_SUB_PORT_QOS_CNT = IPD Subtract Port QOS Count 3477 * 3478 * Will add the value (CNT) to the indicated Port-QOS register (PORT_QOS). The value added must be 3479 * be the 2's complement of the value that needs to be subtracted. 3480 */ 3481union cvmx_ipd_sub_port_qos_cnt { 3482 uint64_t u64; 3483 struct cvmx_ipd_sub_port_qos_cnt_s { 3484#ifdef __BIG_ENDIAN_BITFIELD 3485 uint64_t reserved_41_63 : 23; 3486 uint64_t port_qos : 9; /**< The port to add the CNT field to. */ 3487 uint64_t cnt : 32; /**< The value to be added to the register selected 3488 in the PORT_QOS field. */ 3489#else 3490 uint64_t cnt : 32; 3491 uint64_t port_qos : 9; 3492 uint64_t reserved_41_63 : 23; 3493#endif 3494 } s; 3495 struct cvmx_ipd_sub_port_qos_cnt_s cn52xx; 3496 struct cvmx_ipd_sub_port_qos_cnt_s cn52xxp1; 3497 struct cvmx_ipd_sub_port_qos_cnt_s cn56xx; 3498 struct cvmx_ipd_sub_port_qos_cnt_s cn56xxp1; 3499 struct cvmx_ipd_sub_port_qos_cnt_s cn61xx; 3500 struct cvmx_ipd_sub_port_qos_cnt_s cn63xx; 3501 struct cvmx_ipd_sub_port_qos_cnt_s cn63xxp1; 3502 struct cvmx_ipd_sub_port_qos_cnt_s cn66xx; 3503 struct cvmx_ipd_sub_port_qos_cnt_s cn68xx; 3504 struct cvmx_ipd_sub_port_qos_cnt_s cn68xxp1; 3505 struct cvmx_ipd_sub_port_qos_cnt_s cnf71xx; 3506}; 3507typedef union cvmx_ipd_sub_port_qos_cnt cvmx_ipd_sub_port_qos_cnt_t; 3508 3509/** 3510 * cvmx_ipd_wqe_fpa_queue 3511 * 3512 * IPD_WQE_FPA_QUEUE = IPD Work-Queue-Entry FPA Page Size 3513 * 3514 * Which FPA Queue (0-7) to fetch page-pointers from for WQE's 3515 */ 3516union cvmx_ipd_wqe_fpa_queue { 3517 uint64_t u64; 3518 struct cvmx_ipd_wqe_fpa_queue_s { 3519#ifdef __BIG_ENDIAN_BITFIELD 3520 uint64_t reserved_3_63 : 61; 3521 uint64_t wqe_pool : 3; /**< Which FPA Queue to fetch page-pointers 3522 from for WQE's. 3523 Not used when IPD_CTL_STATUS[NO_WPTR] is set. */ 3524#else 3525 uint64_t wqe_pool : 3; 3526 uint64_t reserved_3_63 : 61; 3527#endif 3528 } s; 3529 struct cvmx_ipd_wqe_fpa_queue_s cn30xx; 3530 struct cvmx_ipd_wqe_fpa_queue_s cn31xx; 3531 struct cvmx_ipd_wqe_fpa_queue_s cn38xx; 3532 struct cvmx_ipd_wqe_fpa_queue_s cn38xxp2; 3533 struct cvmx_ipd_wqe_fpa_queue_s cn50xx; 3534 struct cvmx_ipd_wqe_fpa_queue_s cn52xx; 3535 struct cvmx_ipd_wqe_fpa_queue_s cn52xxp1; 3536 struct cvmx_ipd_wqe_fpa_queue_s cn56xx; 3537 struct cvmx_ipd_wqe_fpa_queue_s cn56xxp1; 3538 struct cvmx_ipd_wqe_fpa_queue_s cn58xx; 3539 struct cvmx_ipd_wqe_fpa_queue_s cn58xxp1; 3540 struct cvmx_ipd_wqe_fpa_queue_s cn61xx; 3541 struct cvmx_ipd_wqe_fpa_queue_s cn63xx; 3542 struct cvmx_ipd_wqe_fpa_queue_s cn63xxp1; 3543 struct cvmx_ipd_wqe_fpa_queue_s cn66xx; 3544 struct cvmx_ipd_wqe_fpa_queue_s cn68xx; 3545 struct cvmx_ipd_wqe_fpa_queue_s cn68xxp1; 3546 struct cvmx_ipd_wqe_fpa_queue_s cnf71xx; 3547}; 3548typedef union cvmx_ipd_wqe_fpa_queue cvmx_ipd_wqe_fpa_queue_t; 3549 3550/** 3551 * cvmx_ipd_wqe_ptr_valid 3552 * 3553 * IPD_WQE_PTR_VALID = IPD's WQE Pointer Valid 3554 * 3555 * The value of the WQE-pointer fetched and in the valid register. 3556 */ 3557union cvmx_ipd_wqe_ptr_valid { 3558 uint64_t u64; 3559 struct cvmx_ipd_wqe_ptr_valid_s { 3560#ifdef __BIG_ENDIAN_BITFIELD 3561 uint64_t reserved_29_63 : 35; 3562 uint64_t ptr : 29; /**< Pointer value. 3563 When IPD_CTL_STATUS[NO_WPTR] is set '1' this field 3564 represents a Packet-Pointer NOT a WQE pointer. */ 3565#else 3566 uint64_t ptr : 29; 3567 uint64_t reserved_29_63 : 35; 3568#endif 3569 } s; 3570 struct cvmx_ipd_wqe_ptr_valid_s cn30xx; 3571 struct cvmx_ipd_wqe_ptr_valid_s cn31xx; 3572 struct cvmx_ipd_wqe_ptr_valid_s cn38xx; 3573 struct cvmx_ipd_wqe_ptr_valid_s cn50xx; 3574 struct cvmx_ipd_wqe_ptr_valid_s cn52xx; 3575 struct cvmx_ipd_wqe_ptr_valid_s cn52xxp1; 3576 struct cvmx_ipd_wqe_ptr_valid_s cn56xx; 3577 struct cvmx_ipd_wqe_ptr_valid_s cn56xxp1; 3578 struct cvmx_ipd_wqe_ptr_valid_s cn58xx; 3579 struct cvmx_ipd_wqe_ptr_valid_s cn58xxp1; 3580 struct cvmx_ipd_wqe_ptr_valid_s cn61xx; 3581 struct cvmx_ipd_wqe_ptr_valid_s cn63xx; 3582 struct cvmx_ipd_wqe_ptr_valid_s cn63xxp1; 3583 struct cvmx_ipd_wqe_ptr_valid_s cn66xx; 3584 struct cvmx_ipd_wqe_ptr_valid_s cnf71xx; 3585}; 3586typedef union cvmx_ipd_wqe_ptr_valid cvmx_ipd_wqe_ptr_valid_t; 3587 3588#endif 3589