Skip to content

Commit 2c0f4e5

Browse files
authored
Upgrade XGS saibcm-modules to 8.4 (#16246)
Why I did it XGS saibcm-modules 8.4 is needed. #14471 Work item tracking Microsoft ADO (number only): 24917414 How I did it Copy files from xgs SDK 8.4 repo and modify makefiles to build the image. Upgrade version to 8.4.0.2 in saibcm-modules.mk. How to verify it Build a private image and run full qualification with it: https://elastictest.org/scheduler/testplan/650419cb71f60aa92c456a2b
1 parent 04f3186 commit 2c0f4e5

File tree

172 files changed

+8520
-1966
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+8520
-1966
lines changed

platform/broadcom/sai-modules.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Broadcom SAI modules
22

3-
BRCM_OPENNSL_KERNEL_VERSION = 7.1.0.0
3+
BRCM_OPENNSL_KERNEL_VERSION = 8.4.0.2
44

55
BRCM_OPENNSL_KERNEL = opennsl-modules_$(BRCM_OPENNSL_KERNEL_VERSION)_amd64.deb
66
$(BRCM_OPENNSL_KERNEL)_SRC_PATH = $(PLATFORM_PATH)/saibcm-modules

platform/broadcom/saibcm-modules/debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
opennsl (8.4.0.2) unstable; urgency=medium
2+
3+
* Update to Broadcom SAI 8.4.0.2
4+
5+
-- Ziting Guo <[email protected]> Tue, Sep 5 02:25:03 2023 +0000
6+
17
opennsl (7.1.0.0) unstable; urgency=medium
28

39
* Update to Broadcom SAI 7.1.0.0.

platform/broadcom/saibcm-modules/debian/opennsl-modules.install

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ systems/linux/user/x86-smp_generic_64-2_6/linux-kernel-bde.ko lib/modules/5.10.0
33
systems/linux/user/x86-smp_generic_64-2_6/linux-user-bde.ko lib/modules/5.10.0-23-2-amd64/extra
44
systems/linux/user/x86-smp_generic_64-2_6/linux-knet-cb.ko lib/modules/5.10.0-23-2-amd64/extra
55
systemd/opennsl-modules.service lib/systemd/system
6-
sdklt/linux/bde/linux_ngbde.ko lib/modules/5.10.0-23-2-amd64/extra
7-
sdklt/linux/knet/linux_ngknet.ko lib/modules/5.10.0-23-2-amd64/extra
8-
sdklt/linux/knetcb/linux_ngknetcb.ko lib/modules/5.10.0-23-2-amd64/extra
6+
sdklt/build/bde/linux_ngbde.ko lib/modules/5.10.0-23-2-amd64/extra
7+
sdklt/build/knet/linux_ngknet.ko lib/modules/5.10.0-23-2-amd64/extra
8+
sdklt/build/knetcb/linux_ngknetcb.ko lib/modules/5.10.0-23-2-amd64/extra

platform/broadcom/saibcm-modules/include/ibde.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ typedef struct ibde_s {
8888
#define BDE_AXI_DEV_TYPE SAL_AXI_DEV_TYPE /* AXI device */
8989
#define BDE_EMMI_DEV_TYPE SAL_EMMI_DEV_TYPE /* EMMI device */
9090
#define BDE_COMPOSITE_DEV_TYPE SAL_COMPOSITE_DEV_TYPE /* Composite device, composed of sub-devices with buses */
91+
#define BDE_SUB_DEV_TYPE SAL_SUB_DEV_TYPE /* A sub-device (with a bus) of a composite device */
9192
#define BDE_USER_DEV_TYPE SAL_USER_DEV_TYPE /* The user implements his own method of access to the device */
9293
#define BDE_DEV_BUS_ALT SAL_DEV_BUS_ALT /* Alternate Access */
9394
#define BDE_DEV_BUS_MSI SAL_DEV_BUS_MSI /* Message-signaled interrupts */
@@ -186,6 +187,23 @@ typedef struct ibde_s {
186187
uint64 (*read64)(int d, uint32 addr);
187188
void (*write64)(int d, uint32 addr, uint64 data);
188189

190+
/*
191+
* Probe for new devices.
192+
*
193+
* This function will normally be called implicitly by the BDE
194+
* initialization function, but it may be called at a later time
195+
* by the application to detect removed or added devices.
196+
*
197+
* Existing devices are not affected by this operation.
198+
*
199+
* If a device has been hot-swapped, then it will be assigned the
200+
* same resources as before the hot-swap.
201+
*
202+
* Return value:
203+
* 0: Device probe completed successfully.
204+
* -1: An error happened during device probe.
205+
*/
206+
int (*probe)(void);
189207
} ibde_t;
190208

191209

platform/broadcom/saibcm-modules/include/kcom.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
#define KCOM_M_DBGPKT_GET 42 /* Get debug packet function info */
7373
#define KCOM_M_WB_CLEANUP 51 /* Clean up for warmbooting */
7474
#define KCOM_M_CLOCK_CMD 52 /* Clock Commands */
75+
#define KCOM_M_PCIE_LINK_STATUS 53 /* PCIe link status */
7576

7677
#define KCOM_VERSION 13 /* Protocol version */
7778

@@ -367,6 +368,7 @@ typedef struct kcom_msg_version_s {
367368
#define KSYNC_M_HW_TS_DISABLE 3
368369
#define KSYNC_M_MTP_TS_UPDATE_ENABLE 4
369370
#define KSYNC_M_MTP_TS_UPDATE_DISABLE 5
371+
#define KSYNC_M_DNX_JR2DEVS_SYS_CONFIG 6
370372

371373
typedef struct kcom_clock_info_s {
372374
uint8 cmd;
@@ -432,6 +434,7 @@ typedef struct kcom_msg_hw_init_s {
432434
uint32 udh_size;
433435
uint32 oamp_punted;
434436
uint8 no_skip_udh_check;
437+
uint8 oam_dm_tod_exist;
435438
uint8 system_headers_mode;
436439
uint8 udh_enable;
437440
/*
@@ -481,6 +484,18 @@ typedef struct kcom_msg_wb_cleanup_s {
481484
uint32 flags;
482485
} kcom_msg_wb_cleanup_t;
483486

487+
/* PCIE Link status */
488+
#define PCIE_LINK_STATUS_UP 0x0
489+
#define PCIE_LINK_STATUS_DOWN 0x1
490+
491+
/*
492+
* Update PCIe link status.
493+
*/
494+
typedef struct kcom_msg_pcie_link_status_s {
495+
kcom_msg_hdr_t hdr;
496+
int pcie_link_status;
497+
} kcom_msg_pcie_link_status_t;
498+
484499
/*
485500
* Create new system network interface. The network interface will
486501
* be associated with the specified switch unit number.
@@ -606,6 +621,7 @@ typedef union kcom_msg_s {
606621
kcom_msg_dbg_pkt_get_t dbg_pkt_get;
607622
kcom_msg_wb_cleanup_t wb_cleanup;
608623
kcom_msg_clock_cmd_t clock_cmd;
624+
kcom_msg_pcie_link_status_t pcie_link_status;
609625
} kcom_msg_t;
610626

611627
/*

platform/broadcom/saibcm-modules/include/soc/devids.h

Lines changed: 83 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* https://www.broadcom.com/products/ethernet-connectivity/software/opennsa
2626
*/
2727
/*
28-
* Copyright: (c) 2021 Broadcom.
28+
* Copyright: (c) 2022 Broadcom.
2929
* All Rights Reserved.
3030
*/
3131

@@ -1386,10 +1386,6 @@
13861386
#define BCM56768_A0_REV_ID 1
13871387
#define BCM56768_B0_REV_ID 0x11
13881388

1389-
#define BCM56068_DEVICE_ID 0xb068
1390-
#define BCM56068_A0_REV_ID 1
1391-
#define BCM56068_B0_REV_ID 0x11
1392-
13931389
#define BCM56068_DEVICE_ID 0xb068
13941390
#define BCM56068_A0_REV_ID 1
13951391
#define BCM56068_B0_REV_ID 0x11
@@ -1532,6 +1528,9 @@
15321528
#define BCM53549_DEVICE_ID 0x8549
15331529
#define BCM53549_A0_REV_ID 1
15341530

1531+
#define BCM53642_DEVICE_ID 0x8642
1532+
#define BCM53642_A0_REV_ID 1
1533+
15351534
#define BCM5665_DEVICE_ID 0x5665
15361535
#define BCM5665_A0_REV_ID 1
15371536
#define BCM5665_B0_REV_ID 0x11
@@ -1549,8 +1548,6 @@
15491548

15501549
#define BROADCOM_PHYID_HIGH 0x0040
15511550

1552-
#define GEDI_DEVICE_ID 0xa100
1553-
#define GEDI_REV_ID 0x0001
15541551
#define ARAD_DEVICE_ID 0x8650
15551552
#define ARAD_A0_REV_ID 0x0000
15561553
#define ARAD_B0_REV_ID 0x0011
@@ -1580,6 +1577,7 @@
15801577
#define BCM88956_A1_REV_ID 0x0002
15811578
#define DNXC_A0_REV_ID 0x0001
15821579
#define DNXC_A1_REV_ID 0x0002
1580+
#define DNXC_A2_REV_ID 0x0003
15831581
#define DNXC_B0_REV_ID 0x0011
15841582
#define DNXC_B1_REV_ID 0x0012
15851583
#define DNXC_DEVID_FAMILY_MASK 0xfff0
@@ -1601,6 +1599,42 @@
16011599
#define BCM8879D_DEVICE_ID 0x879D
16021600
#define BCM8879E_DEVICE_ID 0x879E
16031601
#define BCM8879F_DEVICE_ID 0x879F
1602+
#ifdef BCM_DNXF3_SUPPORT
1603+
#define BCM88910_DEVICE_ID 0x8910
1604+
#define BCM88910_A0_REV_ID DNXC_A0_REV_ID
1605+
#define BCM88911_DEVICE_ID 0x8911
1606+
#define BCM88912_DEVICE_ID 0x8912
1607+
#define BCM88913_DEVICE_ID 0x8913
1608+
#define BCM88914_DEVICE_ID 0x8914
1609+
#define BCM88915_DEVICE_ID 0x8915
1610+
#define BCM88916_DEVICE_ID 0x8916
1611+
#define BCM88917_DEVICE_ID 0x8917
1612+
#define BCM88918_DEVICE_ID 0x8918
1613+
#define BCM88919_DEVICE_ID 0x8919
1614+
#define BCM8891A_DEVICE_ID 0x891A
1615+
#define BCM8891B_DEVICE_ID 0x891B
1616+
#define BCM8891C_DEVICE_ID 0x891C
1617+
#define BCM8891D_DEVICE_ID 0x891D
1618+
#define BCM8891E_DEVICE_ID 0x891E
1619+
#define BCM8891F_DEVICE_ID 0x891F
1620+
#define BCM88920_DEVICE_ID 0x8920
1621+
#define BCM88920_A0_REV_ID DNXC_A0_REV_ID
1622+
#define BCM88921_DEVICE_ID 0x8921
1623+
#define BCM88922_DEVICE_ID 0x8922
1624+
#define BCM88923_DEVICE_ID 0x8923
1625+
#define BCM88924_DEVICE_ID 0x8924
1626+
#define BCM88925_DEVICE_ID 0x8925
1627+
#define BCM88926_DEVICE_ID 0x8926
1628+
#define BCM88927_DEVICE_ID 0x8927
1629+
#define BCM88928_DEVICE_ID 0x8928
1630+
#define BCM88929_DEVICE_ID 0x8929
1631+
#define BCM8892A_DEVICE_ID 0x892A
1632+
#define BCM8892B_DEVICE_ID 0x892B
1633+
#define BCM8892C_DEVICE_ID 0x892C
1634+
#define BCM8892D_DEVICE_ID 0x892D
1635+
#define BCM8892E_DEVICE_ID 0x892E
1636+
#define BCM8892F_DEVICE_ID 0x892F
1637+
#endif
16041638
#define ARADPLUS_DEVICE_ID 0x8660
16051639
#define ARADPLUS_A0_REV_ID 0x0001
16061640
#define BCM88660_DEVICE_ID ARADPLUS_DEVICE_ID
@@ -1806,9 +1840,11 @@
18061840
#define J2P_DEVICE_ID 0x8850
18071841
#define J2P_A0_REV_ID DNXC_A0_REV_ID
18081842
#define J2P_A1_REV_ID DNXC_A1_REV_ID
1843+
#define J2P_A2_REV_ID DNXC_A2_REV_ID
18091844
#define BCM88850_DEVICE_ID J2P_DEVICE_ID
18101845
#define BCM88850_A0_REV_ID J2P_A0_REV_ID
18111846
#define BCM88850_A1_REV_ID J2P_A1_REV_ID
1847+
#define BCM88850_A2_REV_ID J2P_A2_REV_ID
18121848
#define BCM88851_DEVICE_ID 0x8851
18131849
#define BCM88852_DEVICE_ID 0x8852
18141850
#define BCM88853_DEVICE_ID 0x8853
@@ -1842,6 +1878,10 @@
18421878
#define BCM8884E_DEVICE_ID 0x884E
18431879
#define BCM8884F_DEVICE_ID 0x884F
18441880

1881+
#define J2X_DEVICE_ID 0x8830
1882+
#define J2X_A0_REV_ID DNXC_A0_REV_ID
1883+
#define BCM88830_DEVICE_ID J2X_DEVICE_ID
1884+
#define BCM88830_A0_REV_ID J2X_A0_REV_ID
18451885
#define BCM88831_DEVICE_ID 0x8831
18461886
#define BCM88832_DEVICE_ID 0x8832
18471887
#define BCM88833_DEVICE_ID 0x8833
@@ -1858,6 +1898,16 @@
18581898
#define BCM8883E_DEVICE_ID 0x883E
18591899
#define BCM8883F_DEVICE_ID 0x883F
18601900

1901+
#ifdef BCM_DNX3_SUPPORT
1902+
#define JERICHO3_DEVICE_ID 0x8860
1903+
#define JERICHO3_A0_REV_ID DNXC_A0_REV_ID
1904+
#define BCM88860_DEVICE_ID JERICHO3_DEVICE_ID
1905+
#define BCM88860_A0_REV_ID JERICHO3_A0_REV_ID
1906+
#define Q4_DEVICE_ID 0x8870
1907+
#define Q4_A0_REV_ID DNXC_A0_REV_ID
1908+
#define BCM88870_DEVICE_ID Q4_DEVICE_ID
1909+
#define BCM88870_A0_REV_ID Q4_A0_REV_ID
1910+
#endif
18611911

18621912
#define Q2A_DEVICE_ID 0x8480
18631913
#define Q2A_A0_REV_ID DNXC_A0_REV_ID
@@ -1996,15 +2046,11 @@
19962046
#define BCM88952_A0_REV_ID 0x0001
19972047
#define BCM88952_A1_REV_ID 0x0002
19982048

1999-
#define PCP_PCI_VENDOR_ID 0x1172
2000-
#define PCP_PCI_DEVICE_ID 0x4
2001-
2002-
#define ACP_PCI_VENDOR_ID 0x10ee
2003-
#define ACP_PCI_DEVICE_ID 0x7011
2004-
#define ACP_PCI_REV_ID 0x0001
2005-
20062049
#define PLX9056_DEVICE_ID 0x9056
20072050

2051+
#define BCM56890_DEVICE_ID 0xb890
2052+
#define BCM56890_A0_REV_ID 0x0001
2053+
20082054
#define BCM56880_DEVICE_ID 0xb880
20092055
#define BCM56880_A0_REV_ID 0x0001
20102056
#define BCM56880_B0_REV_ID 0x0011
@@ -2044,9 +2090,8 @@
20442090
#define BCM56991_B0_REV_ID 0x0011
20452091
#define BCM56992_DEVICE_ID 0xb992
20462092
#define BCM56992_B0_REV_ID 0x0011
2047-
2048-
#define BCM56995_DEVICE_ID 0xb995
2049-
#define BCM56995_A0_REV_ID 0x0001
2093+
#define BCM56993_DEVICE_ID 0xb993
2094+
#define BCM56993_B0_REV_ID 0x0011
20502095

20512096
#define BCM56996_DEVICE_ID 0xb996
20522097
#define BCM56996_A0_REV_ID 0x0001
@@ -2064,5 +2109,25 @@
20642109
#define BCM56998_DEVICE_ID 0xb998
20652110
#define BCM56998_A0_REV_ID 0x0001
20662111

2067-
#endif
2112+
#define BCM56999_DEVICE_ID 0xb999
2113+
#define BCM56999_A0_REV_ID 0x0001
2114+
#define BCM56999_B0_REV_ID 0x0011
2115+
#define BCM56995_DEVICE_ID 0xb995
2116+
#define BCM56995_A0_REV_ID 0x0001
2117+
#define BCM56995_B0_REV_ID 0x0011
2118+
2119+
#define BCM78900_DEVICE_ID 0xf900
2120+
#define BCM78900_B0_REV_ID 0x0011
2121+
2122+
#define BCM56080_DEVICE_ID 0xb080
2123+
#define BCM56080_A0_REV_ID 0x0001
2124+
#define BCM56081_DEVICE_ID 0xb081
2125+
#define BCM56081_A0_REV_ID 0x0001
2126+
#define BCM56082_DEVICE_ID 0xb082
2127+
#define BCM56082_A0_REV_ID 0x0001
2128+
#define BCM56083_DEVICE_ID 0xb083
2129+
#define BCM56083_A0_REV_ID 0x0001
2130+
#define BCM56084_DEVICE_ID 0xb084
2131+
#define BCM56084_A0_REV_ID 0x0001
20682132

2133+
#endif

platform/broadcom/saibcm-modules/make/Make.config

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,12 @@ else # ifeq "$(HOSTTYPE)" "Windows2000PC"
119119
ifndef SDKBUILD
120120
SDKBUILD :=build
121121
endif
122-
123122
ifdef SDK_OUTDIR
124123
BLDROOT = ${SDK_OUTDIR}/${SDKBUILD}/$(if ${BLDCONFIG},${BLDCONFIG}/)${target}${all_suffix}${bldroot_suffix}
125124
export DEST_DIR := ${SDK_OUTDIR}/${SDKBUILD}$(if ${BLDCONFIG},/${BLDCONFIG})$(DEST_DIR_SUFFIX)
126125
else
127126
BLDROOT = ${SDK}/${SDKBUILD}/$(if ${BLDCONFIG},${BLDCONFIG}/)${target}${all_suffix}${bldroot_suffix}
128127
endif
129-
130128
endif # ifeq "$(HOSTTYPE)" "Windows2000PC"
131129

132130
# This is needed because we cannot include Make.vxworks before Make.config

platform/broadcom/saibcm-modules/make/Make.kernlib

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,6 @@ targetlibsoname = ${lib}.so.${SHAREDLIBVER}
3636
targetlibrealname = ${targetlibsoname}
3737
targetlibso = ${LIBDIR}/${targetlibrealname}
3838

39-
ifeq ($(TOOLS),Borland)
40-
41-
LIBSUFFIX=lib
42-
43-
${LIBDIR}/%.lib: ${BORLAND_BOBJS}
44-
$(RM) $@
45-
$(FOREACH) -subdir "$(LIBDIR)" \
46-
"tlib $@ $(foreach obj, $(BORLAND_LOBJS), +-$(obj))"
47-
48-
else # !Borland
49-
5039
LIBSUFFIX=a
5140

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

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

platform/broadcom/saibcm-modules/make/Make.lib

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,6 @@ ifeq ($(FAST),1)
4343
endif
4444
endif
4545

46-
ifeq ($(TOOLS),Borland)
47-
48-
LIBSUFFIX=lib
49-
50-
${LIBDIR}/%.lib: ${BORLAND_BOBJS}
51-
$(RM) $@
52-
$(FOREACH) -subdir "$(LIBDIR)" \
53-
"tlib $@ $(foreach obj, $(BORLAND_LOBJS), +-$(obj))"
54-
55-
else # !Borland
56-
5746
ifeq ($(LINUX_MAKE_SHARED_LIB),1)
5847
LIBSUFFIX=so.${SHAREDLIBVER}
5948
else
@@ -76,8 +65,6 @@ else
7665
$(AR) ${ARFLAGS} $@ $(sort ${BOBJS})
7766
endif
7867

79-
endif # !Borland
80-
8168

8269
install:: all
8370

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

9178
distclean:: clean
79+
80+
ifeq ($(DNX_FAST_MODE),1)
81+
-include $(SDK)/tools/dnx/make/lib.mk
82+
endif

0 commit comments

Comments
 (0)