Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = 12.1.0.2
BRCM_OPENNSL_KERNEL_VERSION = 13.2.0.0

BRCM_OPENNSL_KERNEL = opennsl-modules_$(BRCM_OPENNSL_KERNEL_VERSION)_amd64.deb
$(BRCM_OPENNSL_KERNEL)_SRC_PATH = $(PLATFORM_PATH)/saibcm-modules
Expand Down
4 changes: 2 additions & 2 deletions platform/broadcom/sai.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
LIBSAIBCM_XGS_VERSION = 12.3.2.2
LIBSAIBCM_XGS_VERSION = 13.2.0.0
LIBSAIBCM_DNX_VERSION = 12.3.3.2
LIBSAIBCM_XGS_BRANCH_NAME = SAI_12.3.0_master
LIBSAIBCM_XGS_BRANCH_NAME = SAI_13.2.0_GA
LIBSAIBCM_DNX_BRANCH_NAME = SAI_12.3.0_master
LIBSAIBCM_XGS_URL_PREFIX = "https://sonicstorage.blob.core.windows.net/public/sai/sai-broadcom/$(LIBSAIBCM_XGS_BRANCH_NAME)/$(LIBSAIBCM_XGS_VERSION)/xgs"
LIBSAIBCM_DNX_URL_PREFIX = "https://sonicstorage.blob.core.windows.net/public/sai/sai-broadcom/$(LIBSAIBCM_DNX_BRANCH_NAME)/$(LIBSAIBCM_DNX_VERSION)/dnx"
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 (13.2.0.0) unstable; urgency=medium

* Update to Broadcom SAI 13.2.0.0

-- Ziting Guo <zitingguo@microsoft.com> Wed, 21 May 2025 01:43:59 +0000

opennsl (12.1.0.2) unstable; urgency=medium

* Update to Broadcom SAI 12.1.0.2
Expand Down
4 changes: 3 additions & 1 deletion platform/broadcom/saibcm-modules/include/ibde.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ typedef struct ibde_s {
#define BDE_256K_REG_SPACE 0x20000000 /* Map 256K (v 64K) */
#define BDE_128K_REG_SPACE 0x40000000 /* Map 128K (v 64K) */
#define BDE_320K_REG_SPACE 0x80000000 /* Map 256K+64K */

#ifdef INCLUDE_SRAM_DMA
#define BDE_TEST_DEVICES 1
#endif

/* Bus supports only 16bit reads */
#define BDE_DEV_BUS_RD_16BIT SAL_DEV_BUS_RD_16BIT
Expand Down
2 changes: 1 addition & 1 deletion platform/broadcom/saibcm-modules/include/kcom.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
#define KCOM_M_CLOCK_CMD 52 /* Clock Commands */
#define KCOM_M_PCIE_LINK_STATUS 53 /* PCIe link status */

#define KCOM_VERSION 17 /* Protocol version */
#define KCOM_VERSION 18 /* Protocol version */

/*
* Message status codes
Expand Down
29 changes: 21 additions & 8 deletions platform/broadcom/saibcm-modules/include/soc/devids.h
Original file line number Diff line number Diff line change
Expand Up @@ -1730,6 +1730,12 @@
#define DNXC_A2_REV_ID 0x0003
#define DNXC_B0_REV_ID 0x0011
#define DNXC_B1_REV_ID 0x0012
#define DNXC_B2_REV_ID 0x0013
#define DNXC_C0_REV_ID 0x0021
#define DNXC_C1_REV_ID 0x0022
#define DNXC_C2_REV_ID 0x0023
#define DNXC_D0_REV_ID 0x0031
#define DNXC_D1_REV_ID 0x0032
#define DNXC_DEVID_FAMILY_MASK 0xfff0
#define BCM88790_DEVICE_ID 0x8790
#define BCM88790_A0_REV_ID DNXC_A0_REV_ID
Expand All @@ -1748,7 +1754,7 @@
#define BCM8879C_DEVICE_ID 0x879C
#define BCM8879D_DEVICE_ID 0x879D
#define BCM8879E_DEVICE_ID 0x879E
#define BCM8879F_DEVICE_ID 0x879F
#define BCM8879F_DEVICE_ID 0x879F
#ifdef BCM_DNXF3_SUPPORT
#define RAMON2_DEVICE_ID 0x8910
#define BCM8891F_DEVICE_ID 0x891F
Expand Down Expand Up @@ -2051,8 +2057,10 @@
#define Q3D_DEVICE_ID 0x8870
#ifdef BCM_Q3A_SUPPORT
#define Q3A_DEVICE_ID 0x8490
#define Q3U_DEVICE_ID 0x8400
#define Q3N_DEVICE_ID 0x8405
#define Q3U_DEVICE_ID 0x84A0
#define Q3N_DEVICE_ID 0x84A5
#define Q3U_ORIG_DEVICE_ID 0x8400
#define Q3N_ORIG_DEVICE_ID 0x8405
#endif
#endif
#define Q2A_DEVICE_ID 0x8480
Expand Down Expand Up @@ -2194,7 +2202,7 @@

#define PLX9056_DEVICE_ID 0x9056 /* needed for DNX_TEST_BOARD */

/* Trident4 X11c*/
/* Trident4 X11c */
#define BCM56890_DEVICE_ID 0xb890
#define BCM56890_A0_REV_ID 0x0001
#define BCM56891_DEVICE_ID 0xb891
Expand All @@ -2206,15 +2214,18 @@
#define BCM56896_DEVICE_ID 0xb896
#define BCM56896_A0_REV_ID 0x0001

/* Trident4 X7*/
/* Trident4 X7 */
#define BCM56690_DEVICE_ID 0xb690
#define BCM56690_A0_REV_ID 0x0001
#define BCM56692_DEVICE_ID 0xb692
#define BCM56692_A0_REV_ID 0x0001

/* Trident5 X12*/
/* Trident5 X12 */
#define BCM78800_DEVICE_ID 0xf800
#define BCM78800_A0_REV_ID 0x0001
/* Trident5 X12 8Tbps */
#define BCM78808_DEVICE_ID 0xf808
#define BCM78808_A0_REV_ID 0x0001

/* Trident4 */
#define BCM56880_DEVICE_ID 0xb880
Expand Down Expand Up @@ -2300,17 +2311,19 @@
/* Tomahawk5 */
#define BCM78900_DEVICE_ID 0xf900
#define BCM78900_B0_REV_ID 0x0011

#define BCM78902_DEVICE_ID 0xf902
#define BCM78902_B0_REV_ID 0x0011

#define BCM78903_DEVICE_ID 0xf903
#define BCM78903_B0_REV_ID 0x0011

/* Tomahawk5+ */
#define BCM78905_DEVICE_ID 0xf905
#define BCM78905_A0_REV_ID 0x0001

/* Tomahawk5-512 */
#define BCM78907_DEVICE_ID 0xf907
#define BCM78907_A0_REV_ID 0x0001

/* Firelight2 */
#define BCM56080_DEVICE_ID 0xb080
#define BCM56080_A0_REV_ID 0x0001
Expand Down
12 changes: 4 additions & 8 deletions platform/broadcom/saibcm-modules/make/Make.clang
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,7 @@ ifeq (true,$(shell [ $(CLANG_MAJOR) -ge 10 ] && echo true))
export KERNEL_LLVM ?= 1

# Suppress various Clang warnings
CLANG_ADD_CFLAGS += \
-Wno-gnu-designator \
-Wno-gnu-variable-sized-type-not-at-end \
-Wno-address-of-packed-member \
-Wno-unused-command-line-argument \
-Wno-misleading-indentation
CLANG_ADD_CFLAGS += -Wno-gnu-variable-sized-type-not-at-end

# Suppress Clang build issues on TCL Bindings
ifeq (TCL,$(findstring TCL,$(FEATURE_LIST)))
Expand All @@ -61,9 +56,10 @@ endif

# Use LLD by default
LDFLAGS += -fuse-ld=lld

# Need these lines in order for GTS Make.custom.all.clang to build
CLANG_ADD_CFLAGS += -Wno-unused-command-line-argument
CLANG_ADD_CFLAGS += -fuse-ld=lld

# Use DWARF V4 for compatibility
CLANG_ADD_CFLAGS += -gdwarf-4
endif
endif
35 changes: 10 additions & 25 deletions platform/broadcom/saibcm-modules/make/Makefile.linux-gts
Original file line number Diff line number Diff line change
Expand Up @@ -82,52 +82,37 @@ export TCL840 := 1
# Common CFLAGS
CFGFLAGS += -DUSE_LINUX_BDE_MMAP=1
#CFGFLAGS += -DBDE_LINUX_USE_MSI_INTERRUPT
OPT_CFLAGS += -Wno-error=unused-value
OPT_CFLAGS += -Wno-error=unused-function
OPT_CFLAGS += -Wno-error=cpp
OPT_CFLAGS += -Wno-error=array-bounds
OPT_CFLAGS += -Wno-error=strict-overflow
ifneq (1,$(USE_CLANG))
CFLAGS += -L$(TOOLCHAIN_DIR)/lib
CFLAGS += -L$(TOOLCHAIN_DIR)/lib64
endif
#OPT_CFLAGS += -Wl,--rpath=/lib64 # may need to set rpath and dynamic-linker path here (and possibly in KLFAGS below) in the future, #
#OPT_CFLAGS += -Wl,--dynamic-linker=/lib64/ld-linux-x86-64.so.2 # if we want to build the target executable to be used with shared libs #

# Needed for a warning in src/soc/phy/fcmap/src/bfcmap88060_a0.c that can't be
# fixed because of a Montreal2 FW dependency
ifeq ($(LOCALDIR),src/soc/phy/fcmap/src)
OPT_CFLAGS += -Wno-address-of-packed-member
endif

# Compiler-specific CFLAGS
ifeq (1,$(USE_CLANG)) # CLANG-specific CFLAGS
OPT_CFLAGS += -Wno-strlcpy-strlcat-size
OPT_CFLAGS += -Wno-strncat-size
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 12)" "1"
export LIBNSL_DEPRECATED := 1
endif
else # GCC-specific CFLAGS
OPT_CFLAGS += -Wno-error=unused-but-set-variable
OPT_CFLAGS += -Wno-error=maybe-uninitialized
OPT_CFLAGS += -Wno-error=aggressive-loop-optimizations
OPT_CFLAGS += -Wno-error=sizeof-pointer-div #SDK-233830
OPT_CFLAGS += -Wno-error=memset-elt-size #SDK-232626
OPT_CFLAGS += -Wno-error=unused-variable #SDK-232993
OPT_CFLAGS += -Wno-deprecated-declarations #SDK-233174
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 8)" "1"
OPT_CFLAGS += -Wno-stringop-overflow
OPT_CFLAGS += -Wno-stringop-truncation
OPT_CFLAGS += -Wno-error=restrict
endif
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 9)" "1"
OPT_CFLAGS += -Wno-address-of-packed-member
endif
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 10)" "1"
OPT_CFLAGS += -Wno-error=uninitialized
OPT_CFLAGS += -Wno-error=format-overflow
CFLAGS += -fcommon
OPT_CFLAGS += -Wno-zero-length-bounds
endif
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 12)" "1"
CFLAGS += -flarge-source-files
OPT_CFLAGS += -Wno-error=address
export LIBNSL_DEPRECATED := 1
endif
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 13)" "1"
OPT_CFLAGS += -Wno-error=enum-int-mismatch
CFLAGS += -fcf-protection
endif
endif # Compiler-specific CFLAGS
Expand All @@ -137,9 +122,9 @@ CFGFLAGS += -fgnu89-inline

# set up KFLAGS appropriately. #
ifeq (,$(KFLAGS))
KFLAGS := -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib64 -I$(KERNDIR) -lc -nostdinc -isystem $(SYSINC) -Iinclude -I$(KERNDIR)/arch/x86/include -I$(KERNDIR)/arch/x86/include/generated -I$(KERNDIR)/arch/x86/include/generated/uapi -I$(KERNDIR)/arch/x86/include/uapi -I$(KERNDIR)/include -I$(KERNDIR)/include/generated -I$(KERNDIR)/include/generated/uapi -I$(KERNDIR)/include/uapi -include $(KERNDIR)/include/generated/autoconf.h -D__KERNEL__ -DNDEBUG -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Wno-format-security -fno-delete-null-pointer-checks -Os -mno-sse -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-dwarf2-cfi-asm
KFLAGS := -I$(KERNDIR) -nostdinc -isystem $(SYSINC) -Iinclude -I$(KERNDIR)/arch/x86/include -I$(KERNDIR)/arch/x86/include/generated -I$(KERNDIR)/arch/x86/include/generated/uapi -I$(KERNDIR)/arch/x86/include/uapi -I$(KERNDIR)/include -I$(KERNDIR)/include/generated -I$(KERNDIR)/include/generated/uapi -I$(KERNDIR)/include/uapi -include $(KERNDIR)/include/generated/autoconf.h -D__KERNEL__ -DNDEBUG -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Wno-format-security -fno-delete-null-pointer-checks -Os -mno-sse -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-dwarf2-cfi-asm
ifneq (1,$(USE_CLANG))
KFLAGS += -funit-at-a-time -maccumulate-outgoing-args -fconserve-stack
KFLAGS += -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib64 -lc -funit-at-a-time -maccumulate-outgoing-args -fconserve-stack
else
KFLAGS += -fno-pie
endif
Expand Down
14 changes: 0 additions & 14 deletions platform/broadcom/saibcm-modules/make/Makefile.linux-iproc
Original file line number Diff line number Diff line change
Expand Up @@ -77,32 +77,18 @@ ENDIAN = LE_HOST=1
endif

CFLAGS += -fno-aggressive-loop-optimizations
OPT_CFLAGS += -Wno-error=maybe-uninitialized
OPT_CFLAGS += -Wno-error=unused-function
OPT_CFLAGS += -Wno-error=array-bounds
OPT_CFLAGS += -Wno-error=unused-variable
OPT_CFLAGS += -Wno-error=memset-elt-size #SDK-232626
OPT_CFLAGS += -Wno-error=unused-const-variable
CFLAGS += -fgnu89-inline
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 8)" "1"
OPT_CFLAGS += -Wno-stringop-overflow
OPT_CFLAGS += -Wno-stringop-truncation
OPT_CFLAGS += -Wno-error=restrict
endif
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 9)" "1"
OPT_CFLAGS += -Wno-address-of-packed-member
endif
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 10)" "1"
OPT_CFLAGS += -Wno-error=uninitialized
OPT_CFLAGS += -Wno-error=format-overflow
CFLAGS += -fcommon
endif
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 12)" "1"
CFLAGS += -flarge-source-files
OPT_CFLAGS += -Wno-error=address
endif
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 13)" "1"
OPT_CFLAGS += -Wno-error=enum-int-mismatch
endif

CFGFLAGS += -D$(ENDIAN) -DIPROC_CMICD
Expand Down
29 changes: 8 additions & 21 deletions platform/broadcom/saibcm-modules/make/Makefile.linux-iproc_64
Original file line number Diff line number Diff line change
Expand Up @@ -81,40 +81,27 @@ else
CFGFLAGS += -DSYS_BE_PIO=0 -DSYS_BE_PACKET=0 -DSYS_BE_OTHER=0
ENDIAN = LE_HOST=1
endif
# JIRA SONIC-69062
CFGFLAGS += -Wp,-w

# Needed for a warning in src/soc/phy/fcmap/src/bfcmap88060_a0.c that can't be
# fixed because of a Montreal2 FW dependency
ifeq ($(LOCALDIR),src/soc/phy/fcmap/src)
OPT_CFLAGS += -Wno-address-of-packed-member
endif

CFGFLAGS += -DPTRS_ARE_64BITS -DLONGS_ARE_64BITS
CFGFLAGS += -DPHYS_ADDRS_ARE_64BITS
CFLAGS += -fno-aggressive-loop-optimizations -fno-strict-overflow
OPT_CFLAGS += -Wno-error=maybe-uninitialized
OPT_CFLAGS += -Wno-error=unused-function
OPT_CFLAGS += -Wno-error=array-bounds
OPT_CFLAGS += -Wno-error=format-overflow
CFLAGS += -fgnu89-inline
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 8)" "1"
OPT_CFLAGS += -Wno-stringop-overflow
OPT_CFLAGS += -Wno-stringop-truncation
OPT_CFLAGS += -Wno-error=restrict
endif
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 9)" "1"
OPT_CFLAGS += -Wno-address-of-packed-member
endif
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 10)" "1"
OPT_CFLAGS += -Wno-error=uninitialized
OPT_CFLAGS += -Wno-error=format-overflow
CFLAGS += -fcommon
endif
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 12)" "1"
CFLAGS += -flarge-source-files
OPT_CFLAGS += -Wno-error=address
endif
ifeq "$(shell expr $(CROSS_GCC_VER_MAJOR) \>= 13)" "1"
OPT_CFLAGS += -Wno-error=enum-int-mismatch
endif

CFGFLAGS += -D$(ENDIAN) -DIPROC_CMICD
CFGFLAGS += -DBCM_PLATFORM_STRING=\"IPROC_CMICD\"
CFGFLAGS += -DSAL_BDE_DMA_MEM_DEFAULT=16
#CFGFLAGS += -DSAL_BDE_DMA_MEM_DEFAULT=16

ARCH = arm64
KBUILD_VERBOSE = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ ifeq (1,$(NO_PRECOMPILED_MODULE))
# SDK 'include' directories.
#
ccflags-y := \
-Wno-pointer-to-int-cast \
-Wno-int-to-pointer-cast \
-I$(SDK)/include \
-I$(SDK)/systems/bde/linux/include \
-I$(SDK)/systems/bde/shared/include \
Expand Down
2 changes: 1 addition & 1 deletion platform/broadcom/saibcm-modules/make/Makefile.linux-slk
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ CLANG_ADD_CFLAGS += --target=$(TARGET_ARCHITECTURE) --gcc-toolchain=$(TOOLCHAIN_
export KERNEL_LLVM = 0
OPT_KERNEL_TOOLCHAIN = CC=$(CROSS_COMPILE)gcc LD=$(CROSS_COMPILE)ld AR=$(CROSS_COMPILE)ar
else
OPT_CFLAGS += -Wno-unused-value -Wno-unused-but-set-variable -Wno-sizeof-pointer-memaccess -fno-aggressive-loop-optimizations
OPT_CFLAGS += -fno-aggressive-loop-optimizations
endif

ifdef DPP_CHIPS
Expand Down
Loading
Loading