1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(C) 2021 Marvell. 3 */ 4 5 #ifndef _ROC_API_H_ 6 #define _ROC_API_H_ 7 8 #include <stdbool.h> 9 #include <stdint.h> 10 #include <string.h> 11 12 /* Alignment */ 13 #define ROC_ALIGN 128 14 15 /* Bits manipulation */ 16 #include "roc_bits.h" 17 18 /* Bitfields manipulation */ 19 #include "roc_bitfield.h" 20 21 /* Constants */ 22 #define PLT_ETHER_ADDR_LEN 6 23 24 /* Platform definition */ 25 #include "roc_platform.h" 26 27 #define ROC_LMT_LINE_SZ 128 28 #define ROC_NUM_LMT_LINES 2048 29 #define ROC_LMT_LINES_PER_CORE_LOG2 5 30 #define ROC_LMT_LINE_SIZE_LOG2 7 31 #define ROC_LMT_BASE_PER_CORE_LOG2 \ 32 (ROC_LMT_LINES_PER_CORE_LOG2 + ROC_LMT_LINE_SIZE_LOG2) 33 34 /* IO */ 35 #if defined(__aarch64__) 36 #include "roc_io.h" 37 #else 38 #include "roc_io_generic.h" 39 #endif 40 41 /* PCI IDs */ 42 #define PCI_VENDOR_ID_CAVIUM 0x177D 43 #define PCI_DEVID_CNXK_RVU_PF 0xA063 44 #define PCI_DEVID_CNXK_RVU_VF 0xA064 45 #define PCI_DEVID_CNXK_RVU_AF 0xA065 46 #define PCI_DEVID_CNXK_RVU_SSO_TIM_PF 0xA0F9 47 #define PCI_DEVID_CNXK_RVU_SSO_TIM_VF 0xA0FA 48 #define PCI_DEVID_CNXK_RVU_NPA_PF 0xA0FB 49 #define PCI_DEVID_CNXK_RVU_NPA_VF 0xA0FC 50 #define PCI_DEVID_CNXK_RVU_AF_VF 0xA0f8 51 #define PCI_DEVID_CNXK_DPI_VF 0xA081 52 #define PCI_DEVID_CNXK_EP_VF 0xB203 53 #define PCI_DEVID_CNXK_RVU_SDP_PF 0xA0f6 54 #define PCI_DEVID_CNXK_RVU_SDP_VF 0xA0f7 55 #define PCI_DEVID_CNXK_BPHY 0xA089 56 57 #define PCI_DEVID_CN9K_CGX 0xA059 58 #define PCI_DEVID_CN10K_RPM 0xA060 59 60 #define PCI_DEVID_CN9K_RVU_CPT_PF 0xA0FD 61 #define PCI_DEVID_CN9K_RVU_CPT_VF 0xA0FE 62 #define PCI_DEVID_CN10K_RVU_CPT_PF 0xA0F2 63 #define PCI_DEVID_CN10K_RVU_CPT_VF 0xA0F3 64 65 #define PCI_SUBSYSTEM_DEVID_CN10KA 0xB900 66 #define PCI_SUBSYSTEM_DEVID_CN10KAS 0xB900 67 68 #define PCI_SUBSYSTEM_DEVID_CN9KA 0x0000 69 #define PCI_SUBSYSTEM_DEVID_CN9KB 0xb400 70 #define PCI_SUBSYSTEM_DEVID_CN9KC 0x0200 71 #define PCI_SUBSYSTEM_DEVID_CN9KD 0xB200 72 #define PCI_SUBSYSTEM_DEVID_CN9KE 0xB100 73 74 /* HW structure definition */ 75 #include "hw/cpt.h" 76 #include "hw/nix.h" 77 #include "hw/npa.h" 78 #include "hw/npc.h" 79 #include "hw/rvu.h" 80 #include "hw/sdp.h" 81 #include "hw/sso.h" 82 #include "hw/ssow.h" 83 #include "hw/tim.h" 84 85 /* Model */ 86 #include "roc_model.h" 87 88 /* Mbox */ 89 #include "roc_mbox.h" 90 91 /* NPA */ 92 #include "roc_npa.h" 93 94 /* NPC */ 95 #include "roc_npc.h" 96 97 /* NIX */ 98 #include "roc_nix.h" 99 100 /* SSO */ 101 #include "roc_sso.h" 102 103 /* TIM */ 104 #include "roc_tim.h" 105 106 /* Utils */ 107 #include "roc_utils.h" 108 109 /* Idev */ 110 #include "roc_idev.h" 111 112 /* Baseband phy cgx */ 113 #include "roc_bphy_cgx.h" 114 115 /* Baseband phy */ 116 #include "roc_bphy.h" 117 118 /* CPT */ 119 #include "roc_cpt.h" 120 121 /* CPT microcode */ 122 #include "roc_ae.h" 123 #include "roc_ae_fpm_tables.h" 124 #include "roc_ie.h" 125 #include "roc_ie_on.h" 126 #include "roc_ie_ot.h" 127 #include "roc_se.h" 128 129 /* HASH computation */ 130 #include "roc_hash.h" 131 132 #endif /* _ROC_API_H_ */ 133