Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BCMSAI] Update BCM SAI debian package to 4.2.1.3 (6.5.19 hsdk) #5399

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 1 addition & 2 deletions platform/broadcom/sai-modules.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Broadcom SAI modules

BRCM_OPENNSL_KERNEL_VERSION = 3.7.3.3-1
BRCM_OPENNSL_KERNEL_VERSION = 4.2.1.3-1

BRCM_OPENNSL_KERNEL = opennsl-modules_$(BRCM_OPENNSL_KERNEL_VERSION)_amd64.deb
$(BRCM_OPENNSL_KERNEL)_SRC_PATH = $(PLATFORM_PATH)/saibcm-modules
$(BRCM_OPENNSL_KERNEL)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
SONIC_DPKG_DEBS += $(BRCM_OPENNSL_KERNEL)

12 changes: 9 additions & 3 deletions platform/broadcom/saibcm-modules/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
opennsl (4.2.1.3-1) unstable; urgency=medium

* Update to Broadcom SAI 4.2.1.3

-- Mahesh Maddikayala <[email protected]> Fri, 18 Sep 2029 10:57:47 +0000

opennsl (3.7.3.3-1) unstable; urgency=medium

* Port Broadcom SAI 3.7.3.3
* Cherry-pick change from master branch, 3.7.3.3-1

-- Judy Joseph <[email protected]> Fri, 2 Dec 2019 15:32:47 +0000

opennsl (3.7.3.2-1) unstable; urgency=medium

* Port Broadcom SAI 3.7.3.2
* Cherry-pick change from master branch, 3.7.3.2-1

-- Judy Joseph <[email protected]> Fri, 12 Nov 2019 15:22:47 +0000

opennsl (3.7.3.1-1) unstable; urgency=medium

* Port Broadcom SAI 3.7.3.1
* Cherry-pick change from master branch, 3.7.3.1-1

Expand Down
6 changes: 6 additions & 0 deletions platform/broadcom/saibcm-modules/include/ibde.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ typedef struct ibde_dev_s {
sal_vaddr_t base_address;
sal_vaddr_t base_address1;
sal_vaddr_t base_address2;
/* a unique number representing the specific device.
* Must be different for different devices.
* May be used to identify specific devices in the system.
* May be implemented as a full PCIe address, a persistent configurable user value, ...
* Possible implementation value stores in QSPI flash memory of the device. */
uint32 dev_unique_id;
} ibde_dev_t;


Expand Down
53 changes: 42 additions & 11 deletions platform/broadcom/saibcm-modules/include/kcom.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@
#define KCOM_M_DBGPKT_SET 41 /* Enbale debug packet function */
#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_VERSION 10 /* Protocol version */
#define KCOM_VERSION 12 /* Protocol version */

/*
* Message status codes
Expand Down Expand Up @@ -138,11 +139,10 @@ typedef struct kcom_netif_s {
uint16 vlan;
uint16 qnum;
uint8 macaddr[6];
uint8 ptch[2];
uint8 itmh[4];
uint8 system_headers[KCOM_NETIF_SYSTEM_HEADERS_SIZE_MAX];
uint8 system_headers_size;
char name[KCOM_NETIF_NAME_MAX];
uint8 phys_port;
} kcom_netif_t;

/*
Expand Down Expand Up @@ -225,13 +225,9 @@ typedef struct kcom_filter_s {
uint8 b[KCOM_FILTER_BYTES_MAX];
uint32 w[KCOM_FILTER_WORDS_MAX];
} mask;
/** Information to parse Dune system headers */
uint32 ftmh_lb_key_ext_size;
uint32 ftmh_stacking_ext_size;
uint32 pph_base_size;
uint32 pph_lif_ext_size[8];
uint8 udh_enable;
uint32 udh_length_type[4];
/** Mark to match source modid and modport */
uint8 is_src_modport;
uint8 spa_unit;
} kcom_filter_t;

/*
Expand Down Expand Up @@ -338,6 +334,19 @@ typedef struct kcom_msg_version_s {
uint32 filter_max;
} kcom_msg_version_t;

/*
* Request KCOM interface clock info.
*/
#define KSYNC_M_HW_INIT 0
#define KSYNC_M_HW_DEINIT 1
#define KSYNC_M_VERSION 2
#define KSYNC_M_HW_TS_DISABLE 3

typedef struct kcom_clock_info_s {
uint8 cmd;
int32 data[8];
} kcom_clock_info_t;

/*
* Send literal string to/from kernel module.
* Mainly for debugging purposes.
Expand Down Expand Up @@ -386,6 +395,19 @@ typedef struct kcom_msg_hw_init_s {
uint8 pkt_hdr_size;
uint32 dma_hi;
uint32 cdma_channels;
/*
* Information to parse Dune system headers
*/
uint32 ftmh_lb_key_ext_size;
uint32 ftmh_stacking_ext_size;
uint32 pph_base_size;
uint32 pph_lif_ext_size[8];
uint32 udh_length_type[4];
uint32 udh_size;
uint32 oamp_punted;
uint8 no_skip_udh_check;
uint8 system_headers_mode;
uint8 udh_enable;
} kcom_msg_hw_init_t;

/*
Expand Down Expand Up @@ -445,6 +467,14 @@ typedef struct kcom_msg_netif_destroy_s {
kcom_msg_hdr_t hdr;
} kcom_msg_netif_destroy_t;

/*
* Destroy system network interface.
*/
typedef struct kcom_msg_clock_s{
kcom_msg_hdr_t hdr;
kcom_clock_info_t clock_info;
} kcom_msg_clock_cmd_t;

/*
* Get list of currently defined system network interfaces.
*/
Expand Down Expand Up @@ -486,7 +516,7 @@ typedef struct kcom_msg_filter_destroy_s {
* Get list of currently defined packet filters.
*/
#ifndef KCOM_FILTER_MAX
#define KCOM_FILTER_MAX 128
#define KCOM_FILTER_MAX 128
#endif

typedef struct kcom_msg_filter_list_s {
Expand Down Expand Up @@ -535,6 +565,7 @@ typedef union kcom_msg_s {
kcom_msg_dbg_pkt_set_t dbg_pkt_set;
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_t;

/*
Expand Down
25 changes: 17 additions & 8 deletions platform/broadcom/saibcm-modules/include/sal/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,25 @@ typedef signed int int32; /* 32-bit quantity */

#define COUNTOF(ary) ((int) (sizeof (ary) / sizeof ((ary)[0])))

typedef uint32 sal_paddr_t; /* Physical address (PCI address) */

#ifdef PTRS_ARE_64BITS
typedef uint64 sal_vaddr_t; /* Virtual address (Host address) */
#define PTR_TO_INT(x) ((uint32)(((sal_vaddr_t)(x))&0xFFFFFFFF))
typedef uint64 sal_vaddr_t; /* Virtual address (Host address) */
typedef uint64 sal_paddr_t; /* Physical address (PCI address) */
#define PTR_TO_INT(x) ((uint32)(((sal_vaddr_t)(x))&0xFFFFFFFF))
#define PTR_HI_TO_INT(x) ((uint32)((((sal_vaddr_t)(x))>>32)&0xFFFFFFFF))
#else
typedef uint32 sal_vaddr_t; /* Virtual address (Host address) */
/* Physical address (PCI address) */
#ifdef PHYS_ADDRS_ARE_64BITS
typedef uint64 sal_paddr_t;
#define PTR_HI_TO_INT(x) ((uint32)((((uint64)(x))>>32)&0xFFFFFFFF))
#else
typedef uint32 sal_vaddr_t; /* Virtual address (Host address) */
#define PTR_TO_INT(x) ((uint32)(x))
typedef uint32 sal_paddr_t;
#define PTR_HI_TO_INT(x) (0)
#endif
#define PTR_TO_INT(x) ((uint32)(x))
#endif

#define INT_TO_PTR(x) ((void *)((sal_vaddr_t)(x)))
#define INT_TO_PTR(x) ((void *)((sal_vaddr_t)(x)))

#define PTR_TO_UINTPTR(x) ((sal_vaddr_t)(x))
#define UINTPTR_TO_PTR(x) ((void *)(x))
Expand All @@ -128,6 +136,7 @@ typedef union
#define SAL_I2C_DEV_TYPE 0x00040 /* I2C device */
#define SAL_AXI_DEV_TYPE 0x00080 /* AXI device */
#define SAL_EMMI_DEV_TYPE 0x10000 /* EMMI device */
#define SAL_COMPOSITE_DEV_TYPE 0x20000 /* Composite device, composed of sub-devices with buses */
#define SAL_DEV_BUS_TYPE_MASK 0xf00ff /* Odd for historical reasons */

/* Device types */
Expand All @@ -152,4 +161,4 @@ typedef union
/* Special access addresses */
#define SAL_DEV_OP_EMMI_INIT 0x0fff1000

#endif /* !_SAL_TYPES_H */
#endif /* !_SAL_TYPES_H */
Loading