/* SPDX-License-Identifier: GPL-2.0 */
/* Marvell RVU Ethernet driver
*
* Copyright (C) 2020 Marvell.
*
*/
#ifndef OTX2_REG_H
#define OTX2_REG_H
#include <rvu_struct.h>
/* RVU PF registers */
#define RVU_PF_VFX_PFVF_MBOX0 (0 x00000)
#define RVU_PF_VFX_PFVF_MBOX1 (0 x00008)
#define RVU_PF_VFX_PFVF_MBOXX(a, b) (0 x0 | (a) << 12 | (b) << 3 )
#define RVU_PF_VF_BAR4_ADDR (0 x10)
#define RVU_PF_BLOCK_ADDRX_DISC(a) (0 x200 | (a) << 3 )
#define RVU_PF_VFME_STATUSX(a) (0 x800 | (a) << 3 )
#define RVU_PF_VFTRPENDX(a) (0 x820 | (a) << 3 )
#define RVU_PF_VFTRPEND_W1SX(a) (0 x840 | (a) << 3 )
#define RVU_PF_VFPF_MBOX_INTX(a) (0 x880 | (a) << 3 )
#define RVU_PF_VFPF_MBOX_INT_W1SX(a) (0 x8A0 | (a) << 3 )
#define RVU_PF_VFPF_MBOX_INT_ENA_W1SX(a) (0 x8C0 | (a) << 3 )
#define RVU_PF_VFPF_MBOX_INT_ENA_W1CX(a) (0 x8E0 | (a) << 3 )
#define RVU_PF_VFFLR_INTX(a) (0 x900 | (a) << 3 )
#define RVU_PF_VFFLR_INT_W1SX(a) (0 x920 | (a) << 3 )
#define RVU_PF_VFFLR_INT_ENA_W1SX(a) (0 x940 | (a) << 3 )
#define RVU_PF_VFFLR_INT_ENA_W1CX(a) (0 x960 | (a) << 3 )
#define RVU_PF_VFME_INTX(a) (0 x980 | (a) << 3 )
#define RVU_PF_VFME_INT_W1SX(a) (0 x9A0 | (a) << 3 )
#define RVU_PF_VFME_INT_ENA_W1SX(a) (0 x9C0 | (a) << 3 )
#define RVU_PF_VFME_INT_ENA_W1CX(a) (0 x9E0 | (a) << 3 )
#define RVU_PF_PFAF_MBOX0 (0 xC00)
#define RVU_PF_PFAF_MBOX1 (0 xC08)
#define RVU_PF_PFAF_MBOXX(a) (0 xC00 | (a) << 3 )
#define RVU_PF_INT (0 xc20)
#define RVU_PF_INT_W1S (0 xc28)
#define RVU_PF_INT_ENA_W1S (0 xc30)
#define RVU_PF_INT_ENA_W1C (0 xc38)
#define RVU_PF_MSIX_VECX_ADDR(a) (0 x000 | (a) << 4 )
#define RVU_PF_MSIX_VECX_CTL(a) (0 x008 | (a) << 4 )
#define RVU_PF_MSIX_PBAX(a) (0 xF0000 | (a) << 3 )
#define RVU_PF_VF_MBOX_ADDR (0 xC40)
#define RVU_PF_LMTLINE_ADDR (0 xC48)
#define RVU_MBOX_PF_VFX_PFVF_TRIGX(a) (0 x2000 | (a) << 3 )
#define RVU_MBOX_PF_VFPF_INTX(a) (0 x1000 | (a) << 3 )
#define RVU_MBOX_PF_VFPF_INT_W1SX(a) (0 x1020 | (a) << 3 )
#define RVU_MBOX_PF_VFPF_INT_ENA_W1SX(a) (0 x1040 | (a) << 3 )
#define RVU_MBOX_PF_VFPF_INT_ENA_W1CX(a) (0 x1060 | (a) << 3 )
#define RVU_MBOX_PF_VFPF1_INTX(a) (0 x1080 | (a) << 3 )
#define RVU_MBOX_PF_VFPF1_INT_W1SX(a) (0 x10a0 | (a) << 3 )
#define RVU_MBOX_PF_VFPF1_INT_ENA_W1SX(a) (0 x10c0 | (a) << 3 )
#define RVU_MBOX_PF_VFPF1_INT_ENA_W1CX(a) (0 x10e0 | (a) << 3 )
/* RVU VF registers */
#define RVU_VF_VFPF_MBOX0 (0 x00000)
#define RVU_VF_VFPF_MBOX1 (0 x00008)
#define RVU_VF_VFPF_MBOXX(a) (0 x00 | (a) << 3 )
#define RVU_VF_INT (0 x20)
#define RVU_VF_INT_W1S (0 x28)
#define RVU_VF_INT_ENA_W1S (0 x30)
#define RVU_VF_INT_ENA_W1C (0 x38)
#define RVU_VF_BLOCK_ADDRX_DISC(a) (0 x200 | (a) << 3 )
#define RVU_VF_MSIX_VECX_ADDR(a) (0 x000 | (a) << 4 )
#define RVU_VF_MSIX_VECX_CTL(a) (0 x008 | (a) << 4 )
#define RVU_VF_MSIX_PBAX(a) (0 xF0000 | (a) << 3 )
#define RVU_VF_MBOX_REGION (0 xC0000)
/* CN20K RVU_MBOX_E: RVU PF/VF MBOX Address Range Enumeration */
#define RVU_MBOX_AF_PFX_ADDR(a) (0 x5000 | (a) << 4 )
#define RVU_PFX_FUNC_PFAF_MBOX (0 x80000)
#define RVU_PFX_FUNCX_VFAF_MBOX (0 x40000)
#define RVU_FUNC_BLKADDR_SHIFT 20
#define RVU_FUNC_BLKADDR_MASK 0 x1FULL
/* NPA LF registers */
#define NPA_LFBASE (BLKTYPE_NPA << RVU_FUNC_BLKADDR_SHIFT)
#define NPA_LF_AURA_OP_ALLOCX(a) (NPA_LFBASE | 0 x10 | (a) << 3 )
#define NPA_LF_AURA_OP_FREE0 (NPA_LFBASE | 0 x20)
#define NPA_LF_AURA_OP_FREE1 (NPA_LFBASE | 0 x28)
#define NPA_LF_AURA_OP_CNT (NPA_LFBASE | 0 x30)
#define NPA_LF_AURA_OP_LIMIT (NPA_LFBASE | 0 x50)
#define NPA_LF_AURA_OP_INT (NPA_LFBASE | 0 x60)
#define NPA_LF_AURA_OP_THRESH (NPA_LFBASE | 0 x70)
#define NPA_LF_POOL_OP_PC (NPA_LFBASE | 0 x100)
#define NPA_LF_POOL_OP_AVAILABLE (NPA_LFBASE | 0 x110)
#define NPA_LF_POOL_OP_PTR_START0 (NPA_LFBASE | 0 x120)
#define NPA_LF_POOL_OP_PTR_START1 (NPA_LFBASE | 0 x128)
#define NPA_LF_POOL_OP_PTR_END0 (NPA_LFBASE | 0 x130)
#define NPA_LF_POOL_OP_PTR_END1 (NPA_LFBASE | 0 x138)
#define NPA_LF_POOL_OP_INT (NPA_LFBASE | 0 x160)
#define NPA_LF_POOL_OP_THRESH (NPA_LFBASE | 0 x170)
#define NPA_LF_ERR_INT (NPA_LFBASE | 0 x200)
#define NPA_LF_ERR_INT_W1S (NPA_LFBASE | 0 x208)
#define NPA_LF_ERR_INT_ENA_W1C (NPA_LFBASE | 0 x210)
#define NPA_LF_ERR_INT_ENA_W1S (NPA_LFBASE | 0 x218)
#define NPA_LF_RAS (NPA_LFBASE | 0 x220)
#define NPA_LF_RAS_W1S (NPA_LFBASE | 0 x228)
#define NPA_LF_RAS_ENA_W1C (NPA_LFBASE | 0 x230)
#define NPA_LF_RAS_ENA_W1S (NPA_LFBASE | 0 x238)
#define NPA_LF_QINTX_CNT(a) (NPA_LFBASE | 0 x300 | (a) << 12 )
#define NPA_LF_QINTX_INT(a) (NPA_LFBASE | 0 x310 | (a) << 12 )
#define NPA_LF_QINTX_INT_W1S(a) (NPA_LFBASE | 0 x318 | (a) << 12 )
#define NPA_LF_QINTX_ENA_W1S(a) (NPA_LFBASE | 0 x320 | (a) << 12 )
#define NPA_LF_QINTX_ENA_W1C(a) (NPA_LFBASE | 0 x330 | (a) << 12 )
#define NPA_LF_AURA_BATCH_FREE0 (NPA_LFBASE | 0 x400)
/* NIX LF registers */
#define NIX_LFBASE (BLKTYPE_NIX << RVU_FUNC_BLKADDR_SHIFT)
#define NIX_LF_RX_SECRETX(a) (NIX_LFBASE | 0 x0 | (a) << 3 )
#define NIX_LF_CFG (NIX_LFBASE | 0 x100)
#define NIX_LF_GINT (NIX_LFBASE | 0 x200)
#define NIX_LF_GINT_W1S (NIX_LFBASE | 0 x208)
#define NIX_LF_GINT_ENA_W1C (NIX_LFBASE | 0 x210)
#define NIX_LF_GINT_ENA_W1S (NIX_LFBASE | 0 x218)
#define NIX_LF_ERR_INT (NIX_LFBASE | 0 x220)
#define NIX_LF_ERR_INT_W1S (NIX_LFBASE | 0 x228)
#define NIX_LF_ERR_INT_ENA_W1C (NIX_LFBASE | 0 x230)
#define NIX_LF_ERR_INT_ENA_W1S (NIX_LFBASE | 0 x238)
#define NIX_LF_RAS (NIX_LFBASE | 0 x240)
#define NIX_LF_RAS_W1S (NIX_LFBASE | 0 x248)
#define NIX_LF_RAS_ENA_W1C (NIX_LFBASE | 0 x250)
#define NIX_LF_RAS_ENA_W1S (NIX_LFBASE | 0 x258)
#define NIX_LF_SQ_OP_ERR_DBG (NIX_LFBASE | 0 x260)
#define NIX_LF_MNQ_ERR_DBG (NIX_LFBASE | 0 x270)
#define NIX_LF_SEND_ERR_DBG (NIX_LFBASE | 0 x280)
#define NIX_LF_TX_STATX(a) (NIX_LFBASE | 0 x300 | (a) << 3 )
#define NIX_LF_RX_STATX(a) (NIX_LFBASE | 0 x400 | (a) << 3 )
#define NIX_LF_OP_SENDX(a) (NIX_LFBASE | 0 x800 | (a) << 3 )
#define NIX_LF_RQ_OP_INT (NIX_LFBASE | 0 x900)
#define NIX_LF_RQ_OP_OCTS (NIX_LFBASE | 0 x910)
#define NIX_LF_RQ_OP_PKTS (NIX_LFBASE | 0 x920)
#define NIX_LF_OP_IPSEC_DYNO_CN (NIX_LFBASE | 0 x980)
#define NIX_LF_SQ_OP_INT (NIX_LFBASE | 0 xa00)
#define NIX_LF_SQ_OP_OCTS (NIX_LFBASE | 0 xa10)
#define NIX_LF_SQ_OP_PKTS (NIX_LFBASE | 0 xa20)
#define NIX_LF_SQ_OP_STATUS (NIX_LFBASE | 0 xa30)
#define NIX_LF_CQ_OP_INT (NIX_LFBASE | 0 xb00)
#define NIX_LF_CQ_OP_DOOR (NIX_LFBASE | 0 xb30)
#define NIX_LF_CQ_OP_STATUS (NIX_LFBASE | 0 xb40)
#define NIX_LF_QINTX_CNT(a) (NIX_LFBASE | 0 xC00 | (a) << 12 )
#define NIX_LF_QINTX_INT(a) (NIX_LFBASE | 0 xC10 | (a) << 12 )
#define NIX_LF_QINTX_INT_W1S(a) (NIX_LFBASE | 0 xC18 | (a) << 12 )
#define NIX_LF_QINTX_ENA_W1S(a) (NIX_LFBASE | 0 xC20 | (a) << 12 )
#define NIX_LF_QINTX_ENA_W1C(a) (NIX_LFBASE | 0 xC30 | (a) << 12 )
#define NIX_LF_CINTX_CNT(a) (NIX_LFBASE | 0 xD00 | (a) << 12 )
#define NIX_LF_CINTX_WAIT(a) (NIX_LFBASE | 0 xD10 | (a) << 12 )
#define NIX_LF_CINTX_INT(a) (NIX_LFBASE | 0 xD20 | (a) << 12 )
#define NIX_LF_CINTX_INT_W1S(a) (NIX_LFBASE | 0 xD30 | (a) << 12 )
#define NIX_LF_CINTX_ENA_W1S(a) (NIX_LFBASE | 0 xD40 | (a) << 12 )
#define NIX_LF_CINTX_ENA_W1C(a) (NIX_LFBASE | 0 xD50 | (a) << 12 )
/* LMT LF registers */
#define LMT_LFBASE BIT_ULL(RVU_FUNC_BLKADDR_SHIFT)
#define LMT_LF_LMTLINEX(a) (LMT_LFBASE | 0 x000 | (a) << 12 )
#define LMT_LF_LMTCANCEL (LMT_LFBASE | 0 x400)
/* CN20K registers */
#define RVU_PF_DISC (0 x0)
#endif /* OTX2_REG_H */
Messung V0.5 in Prozent C=95 H=91 G=92
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-06-07)
¤
*Bot Zugriff