Skip to content

Commit

Permalink
Upgrade XGS saibcm-modules to 8.4 (#16246) (#17024)
Browse files Browse the repository at this point in the history
  • Loading branch information
mssonicbld authored Oct 26, 2023
1 parent fc8d645 commit 530f756
Show file tree
Hide file tree
Showing 172 changed files with 8,520 additions and 1,966 deletions.
2 changes: 1 addition & 1 deletion platform/broadcom/sai-modules.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Broadcom SAI modules

BRCM_OPENNSL_KERNEL_VERSION = 7.1.0.0
BRCM_OPENNSL_KERNEL_VERSION = 8.4.0.2

BRCM_OPENNSL_KERNEL = opennsl-modules_$(BRCM_OPENNSL_KERNEL_VERSION)_amd64.deb
$(BRCM_OPENNSL_KERNEL)_SRC_PATH = $(PLATFORM_PATH)/saibcm-modules
Expand Down
6 changes: 6 additions & 0 deletions platform/broadcom/saibcm-modules/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
opennsl (8.4.0.2) unstable; urgency=medium

* Update to Broadcom SAI 8.4.0.2

-- Ziting Guo <zitingguo@microsoft.com> Tue, Sep 5 02:25:03 2023 +0000

opennsl (7.1.0.0) unstable; urgency=medium

* Update to Broadcom SAI 7.1.0.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ systems/linux/user/x86-smp_generic_64-2_6/linux-kernel-bde.ko lib/modules/5.10.0
systems/linux/user/x86-smp_generic_64-2_6/linux-user-bde.ko lib/modules/5.10.0-23-2-amd64/extra
systems/linux/user/x86-smp_generic_64-2_6/linux-knet-cb.ko lib/modules/5.10.0-23-2-amd64/extra
systemd/opennsl-modules.service lib/systemd/system
sdklt/linux/bde/linux_ngbde.ko lib/modules/5.10.0-23-2-amd64/extra
sdklt/linux/knet/linux_ngknet.ko lib/modules/5.10.0-23-2-amd64/extra
sdklt/linux/knetcb/linux_ngknetcb.ko lib/modules/5.10.0-23-2-amd64/extra
sdklt/build/bde/linux_ngbde.ko lib/modules/5.10.0-23-2-amd64/extra
sdklt/build/knet/linux_ngknet.ko lib/modules/5.10.0-23-2-amd64/extra
sdklt/build/knetcb/linux_ngknetcb.ko lib/modules/5.10.0-23-2-amd64/extra
18 changes: 18 additions & 0 deletions platform/broadcom/saibcm-modules/include/ibde.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ typedef struct ibde_s {
#define BDE_AXI_DEV_TYPE SAL_AXI_DEV_TYPE /* AXI device */
#define BDE_EMMI_DEV_TYPE SAL_EMMI_DEV_TYPE /* EMMI device */
#define BDE_COMPOSITE_DEV_TYPE SAL_COMPOSITE_DEV_TYPE /* Composite device, composed of sub-devices with buses */
#define BDE_SUB_DEV_TYPE SAL_SUB_DEV_TYPE /* A sub-device (with a bus) of a composite device */
#define BDE_USER_DEV_TYPE SAL_USER_DEV_TYPE /* The user implements his own method of access to the device */
#define BDE_DEV_BUS_ALT SAL_DEV_BUS_ALT /* Alternate Access */
#define BDE_DEV_BUS_MSI SAL_DEV_BUS_MSI /* Message-signaled interrupts */
Expand Down Expand Up @@ -186,6 +187,23 @@ typedef struct ibde_s {
uint64 (*read64)(int d, uint32 addr);
void (*write64)(int d, uint32 addr, uint64 data);

/*
* Probe for new devices.
*
* This function will normally be called implicitly by the BDE
* initialization function, but it may be called at a later time
* by the application to detect removed or added devices.
*
* Existing devices are not affected by this operation.
*
* If a device has been hot-swapped, then it will be assigned the
* same resources as before the hot-swap.
*
* Return value:
* 0: Device probe completed successfully.
* -1: An error happened during device probe.
*/
int (*probe)(void);
} ibde_t;


Expand Down
16 changes: 16 additions & 0 deletions platform/broadcom/saibcm-modules/include/kcom.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
#define KCOM_M_DBGPKT_GET 42 /* Get debug packet function info */
#define KCOM_M_WB_CLEANUP 51 /* Clean up for warmbooting */
#define KCOM_M_CLOCK_CMD 52 /* Clock Commands */
#define KCOM_M_PCIE_LINK_STATUS 53 /* PCIe link status */

#define KCOM_VERSION 13 /* Protocol version */

Expand Down Expand Up @@ -367,6 +368,7 @@ typedef struct kcom_msg_version_s {
#define KSYNC_M_HW_TS_DISABLE 3
#define KSYNC_M_MTP_TS_UPDATE_ENABLE 4
#define KSYNC_M_MTP_TS_UPDATE_DISABLE 5
#define KSYNC_M_DNX_JR2DEVS_SYS_CONFIG 6

typedef struct kcom_clock_info_s {
uint8 cmd;
Expand Down Expand Up @@ -432,6 +434,7 @@ typedef struct kcom_msg_hw_init_s {
uint32 udh_size;
uint32 oamp_punted;
uint8 no_skip_udh_check;
uint8 oam_dm_tod_exist;
uint8 system_headers_mode;
uint8 udh_enable;
/*
Expand Down Expand Up @@ -481,6 +484,18 @@ typedef struct kcom_msg_wb_cleanup_s {
uint32 flags;
} kcom_msg_wb_cleanup_t;

/* PCIE Link status */
#define PCIE_LINK_STATUS_UP 0x0
#define PCIE_LINK_STATUS_DOWN 0x1

/*
* Update PCIe link status.
*/
typedef struct kcom_msg_pcie_link_status_s {
kcom_msg_hdr_t hdr;
int pcie_link_status;
} kcom_msg_pcie_link_status_t;

/*
* Create new system network interface. The network interface will
* be associated with the specified switch unit number.
Expand Down Expand Up @@ -606,6 +621,7 @@ typedef union kcom_msg_s {
kcom_msg_dbg_pkt_get_t dbg_pkt_get;
kcom_msg_wb_cleanup_t wb_cleanup;
kcom_msg_clock_cmd_t clock_cmd;
kcom_msg_pcie_link_status_t pcie_link_status;
} kcom_msg_t;

/*
Expand Down
101 changes: 83 additions & 18 deletions platform/broadcom/saibcm-modules/include/soc/devids.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* https://www.broadcom.com/products/ethernet-connectivity/software/opennsa
*/
/*
* Copyright: (c) 2021 Broadcom.
* Copyright: (c) 2022 Broadcom.
* All Rights Reserved.
*/

Expand Down Expand Up @@ -1386,10 +1386,6 @@
#define BCM56768_A0_REV_ID 1
#define BCM56768_B0_REV_ID 0x11

#define BCM56068_DEVICE_ID 0xb068
#define BCM56068_A0_REV_ID 1
#define BCM56068_B0_REV_ID 0x11

#define BCM56068_DEVICE_ID 0xb068
#define BCM56068_A0_REV_ID 1
#define BCM56068_B0_REV_ID 0x11
Expand Down Expand Up @@ -1532,6 +1528,9 @@
#define BCM53549_DEVICE_ID 0x8549
#define BCM53549_A0_REV_ID 1

#define BCM53642_DEVICE_ID 0x8642
#define BCM53642_A0_REV_ID 1

#define BCM5665_DEVICE_ID 0x5665
#define BCM5665_A0_REV_ID 1
#define BCM5665_B0_REV_ID 0x11
Expand All @@ -1549,8 +1548,6 @@

#define BROADCOM_PHYID_HIGH 0x0040

#define GEDI_DEVICE_ID 0xa100
#define GEDI_REV_ID 0x0001
#define ARAD_DEVICE_ID 0x8650
#define ARAD_A0_REV_ID 0x0000
#define ARAD_B0_REV_ID 0x0011
Expand Down Expand Up @@ -1580,6 +1577,7 @@
#define BCM88956_A1_REV_ID 0x0002
#define DNXC_A0_REV_ID 0x0001
#define DNXC_A1_REV_ID 0x0002
#define DNXC_A2_REV_ID 0x0003
#define DNXC_B0_REV_ID 0x0011
#define DNXC_B1_REV_ID 0x0012
#define DNXC_DEVID_FAMILY_MASK 0xfff0
Expand All @@ -1601,6 +1599,42 @@
#define BCM8879D_DEVICE_ID 0x879D
#define BCM8879E_DEVICE_ID 0x879E
#define BCM8879F_DEVICE_ID 0x879F
#ifdef BCM_DNXF3_SUPPORT
#define BCM88910_DEVICE_ID 0x8910
#define BCM88910_A0_REV_ID DNXC_A0_REV_ID
#define BCM88911_DEVICE_ID 0x8911
#define BCM88912_DEVICE_ID 0x8912
#define BCM88913_DEVICE_ID 0x8913
#define BCM88914_DEVICE_ID 0x8914
#define BCM88915_DEVICE_ID 0x8915
#define BCM88916_DEVICE_ID 0x8916
#define BCM88917_DEVICE_ID 0x8917
#define BCM88918_DEVICE_ID 0x8918
#define BCM88919_DEVICE_ID 0x8919
#define BCM8891A_DEVICE_ID 0x891A
#define BCM8891B_DEVICE_ID 0x891B
#define BCM8891C_DEVICE_ID 0x891C
#define BCM8891D_DEVICE_ID 0x891D
#define BCM8891E_DEVICE_ID 0x891E
#define BCM8891F_DEVICE_ID 0x891F
#define BCM88920_DEVICE_ID 0x8920
#define BCM88920_A0_REV_ID DNXC_A0_REV_ID
#define BCM88921_DEVICE_ID 0x8921
#define BCM88922_DEVICE_ID 0x8922
#define BCM88923_DEVICE_ID 0x8923
#define BCM88924_DEVICE_ID 0x8924
#define BCM88925_DEVICE_ID 0x8925
#define BCM88926_DEVICE_ID 0x8926
#define BCM88927_DEVICE_ID 0x8927
#define BCM88928_DEVICE_ID 0x8928
#define BCM88929_DEVICE_ID 0x8929
#define BCM8892A_DEVICE_ID 0x892A
#define BCM8892B_DEVICE_ID 0x892B
#define BCM8892C_DEVICE_ID 0x892C
#define BCM8892D_DEVICE_ID 0x892D
#define BCM8892E_DEVICE_ID 0x892E
#define BCM8892F_DEVICE_ID 0x892F
#endif
#define ARADPLUS_DEVICE_ID 0x8660
#define ARADPLUS_A0_REV_ID 0x0001
#define BCM88660_DEVICE_ID ARADPLUS_DEVICE_ID
Expand Down Expand Up @@ -1806,9 +1840,11 @@
#define J2P_DEVICE_ID 0x8850
#define J2P_A0_REV_ID DNXC_A0_REV_ID
#define J2P_A1_REV_ID DNXC_A1_REV_ID
#define J2P_A2_REV_ID DNXC_A2_REV_ID
#define BCM88850_DEVICE_ID J2P_DEVICE_ID
#define BCM88850_A0_REV_ID J2P_A0_REV_ID
#define BCM88850_A1_REV_ID J2P_A1_REV_ID
#define BCM88850_A2_REV_ID J2P_A2_REV_ID
#define BCM88851_DEVICE_ID 0x8851
#define BCM88852_DEVICE_ID 0x8852
#define BCM88853_DEVICE_ID 0x8853
Expand Down Expand Up @@ -1842,6 +1878,10 @@
#define BCM8884E_DEVICE_ID 0x884E
#define BCM8884F_DEVICE_ID 0x884F

#define J2X_DEVICE_ID 0x8830
#define J2X_A0_REV_ID DNXC_A0_REV_ID
#define BCM88830_DEVICE_ID J2X_DEVICE_ID
#define BCM88830_A0_REV_ID J2X_A0_REV_ID
#define BCM88831_DEVICE_ID 0x8831
#define BCM88832_DEVICE_ID 0x8832
#define BCM88833_DEVICE_ID 0x8833
Expand All @@ -1858,6 +1898,16 @@
#define BCM8883E_DEVICE_ID 0x883E
#define BCM8883F_DEVICE_ID 0x883F

#ifdef BCM_DNX3_SUPPORT
#define JERICHO3_DEVICE_ID 0x8860
#define JERICHO3_A0_REV_ID DNXC_A0_REV_ID
#define BCM88860_DEVICE_ID JERICHO3_DEVICE_ID
#define BCM88860_A0_REV_ID JERICHO3_A0_REV_ID
#define Q4_DEVICE_ID 0x8870
#define Q4_A0_REV_ID DNXC_A0_REV_ID
#define BCM88870_DEVICE_ID Q4_DEVICE_ID
#define BCM88870_A0_REV_ID Q4_A0_REV_ID
#endif

#define Q2A_DEVICE_ID 0x8480
#define Q2A_A0_REV_ID DNXC_A0_REV_ID
Expand Down Expand Up @@ -1996,15 +2046,11 @@
#define BCM88952_A0_REV_ID 0x0001
#define BCM88952_A1_REV_ID 0x0002

#define PCP_PCI_VENDOR_ID 0x1172
#define PCP_PCI_DEVICE_ID 0x4

#define ACP_PCI_VENDOR_ID 0x10ee
#define ACP_PCI_DEVICE_ID 0x7011
#define ACP_PCI_REV_ID 0x0001

#define PLX9056_DEVICE_ID 0x9056

#define BCM56890_DEVICE_ID 0xb890
#define BCM56890_A0_REV_ID 0x0001

#define BCM56880_DEVICE_ID 0xb880
#define BCM56880_A0_REV_ID 0x0001
#define BCM56880_B0_REV_ID 0x0011
Expand Down Expand Up @@ -2044,9 +2090,8 @@
#define BCM56991_B0_REV_ID 0x0011
#define BCM56992_DEVICE_ID 0xb992
#define BCM56992_B0_REV_ID 0x0011

#define BCM56995_DEVICE_ID 0xb995
#define BCM56995_A0_REV_ID 0x0001
#define BCM56993_DEVICE_ID 0xb993
#define BCM56993_B0_REV_ID 0x0011

#define BCM56996_DEVICE_ID 0xb996
#define BCM56996_A0_REV_ID 0x0001
Expand All @@ -2064,5 +2109,25 @@
#define BCM56998_DEVICE_ID 0xb998
#define BCM56998_A0_REV_ID 0x0001

#endif
#define BCM56999_DEVICE_ID 0xb999
#define BCM56999_A0_REV_ID 0x0001
#define BCM56999_B0_REV_ID 0x0011
#define BCM56995_DEVICE_ID 0xb995
#define BCM56995_A0_REV_ID 0x0001
#define BCM56995_B0_REV_ID 0x0011

#define BCM78900_DEVICE_ID 0xf900
#define BCM78900_B0_REV_ID 0x0011

#define BCM56080_DEVICE_ID 0xb080
#define BCM56080_A0_REV_ID 0x0001
#define BCM56081_DEVICE_ID 0xb081
#define BCM56081_A0_REV_ID 0x0001
#define BCM56082_DEVICE_ID 0xb082
#define BCM56082_A0_REV_ID 0x0001
#define BCM56083_DEVICE_ID 0xb083
#define BCM56083_A0_REV_ID 0x0001
#define BCM56084_DEVICE_ID 0xb084
#define BCM56084_A0_REV_ID 0x0001

#endif
2 changes: 0 additions & 2 deletions platform/broadcom/saibcm-modules/make/Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,12 @@ else # ifeq "$(HOSTTYPE)" "Windows2000PC"
ifndef SDKBUILD
SDKBUILD :=build
endif

ifdef SDK_OUTDIR
BLDROOT = ${SDK_OUTDIR}/${SDKBUILD}/$(if ${BLDCONFIG},${BLDCONFIG}/)${target}${all_suffix}${bldroot_suffix}
export DEST_DIR := ${SDK_OUTDIR}/${SDKBUILD}$(if ${BLDCONFIG},/${BLDCONFIG})$(DEST_DIR_SUFFIX)
else
BLDROOT = ${SDK}/${SDKBUILD}/$(if ${BLDCONFIG},${BLDCONFIG}/)${target}${all_suffix}${bldroot_suffix}
endif

endif # ifeq "$(HOSTTYPE)" "Windows2000PC"

# This is needed because we cannot include Make.vxworks before Make.config
Expand Down
12 changes: 0 additions & 12 deletions platform/broadcom/saibcm-modules/make/Make.kernlib
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,6 @@ targetlibsoname = ${lib}.so.${SHAREDLIBVER}
targetlibrealname = ${targetlibsoname}
targetlibso = ${LIBDIR}/${targetlibrealname}

ifeq ($(TOOLS),Borland)

LIBSUFFIX=lib

${LIBDIR}/%.lib: ${BORLAND_BOBJS}
$(RM) $@
$(FOREACH) -subdir "$(LIBDIR)" \
"tlib $@ $(foreach obj, $(BORLAND_LOBJS), +-$(obj))"

else # !Borland

LIBSUFFIX=a

${LIBDIR}/%.a: ${BOBJS}
Expand All @@ -60,7 +49,6 @@ ifeq ($(targetbase),unix)
$(CC) -shared -Wl,-soname,${targetlibsoname} -o ${targetlibso} ${BOBJS} -lc
endif
endif # LINUX_MAKE_SHARED_LIB #
endif # !Borland

targetlib = ${LIBDIR}/${lib}.${LIBSUFFIX}

Expand Down
17 changes: 4 additions & 13 deletions platform/broadcom/saibcm-modules/make/Make.lib
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,6 @@ ifeq ($(FAST),1)
endif
endif

ifeq ($(TOOLS),Borland)

LIBSUFFIX=lib

${LIBDIR}/%.lib: ${BORLAND_BOBJS}
$(RM) $@
$(FOREACH) -subdir "$(LIBDIR)" \
"tlib $@ $(foreach obj, $(BORLAND_LOBJS), +-$(obj))"

else # !Borland

ifeq ($(LINUX_MAKE_SHARED_LIB),1)
LIBSUFFIX=so.${SHAREDLIBVER}
else
Expand All @@ -76,8 +65,6 @@ else
$(AR) ${ARFLAGS} $@ $(sort ${BOBJS})
endif

endif # !Borland


install:: all

Expand All @@ -89,3 +76,7 @@ endif
$Q$(RM) ${targetlib}

distclean:: clean

ifeq ($(DNX_FAST_MODE),1)
-include $(SDK)/tools/dnx/make/lib.mk
endif
Loading

0 comments on commit 530f756

Please sign in to comment.