Skip to content

Commit 0135ba2

Browse files
DellEMC S6100: Determine pcie.yaml revision based on firmware (#7875)
Why I did it To determine the revision of the pcie.yaml to be used based on BIOS version in DellEMC S6100 platform. Depends on: sonic-net/sonic-platform-common#195 How I did it Added two revisions of pcie.yaml pcie_1.yaml and pcie_2.yaml Included a platform-specific Pcie class to provide the revision of the pcie.yaml to be used by pcieutil/pcied. How to verify it Execute pcieutil check (sonic-net/sonic-utilities#1672) command and verify the list of PCIe devices displayed. Logs: UT_logs.txt
1 parent c610f0c commit 0135ba2

File tree

3 files changed

+79
-0
lines changed

3 files changed

+79
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
- bus: '00'
2+
dev: '01'
3+
fn: '0'
4+
id: 1f10
5+
name: 'PCI bridge: Intel Corporation Atom processor C2000 PCIe Root Port 1'
6+
- bus: '00'
7+
dev: '03'
8+
fn: '0'
9+
id: 1f12
10+
name: 'PCI bridge: Intel Corporation Atom processor C2000 PCIe Root Port 3'
11+
- bus: '00'
12+
dev: '04'
13+
fn: '0'
14+
id: 1f13
15+
name: 'PCI bridge: Intel Corporation Atom processor C2000 PCIe Root Port 4'
16+
- bus: '00'
17+
dev: 0f
18+
fn: '0'
19+
id: 1f16
20+
name: 'IOMMU: Intel Corporation Atom processor C2000 RCEC'
21+
- bus: '00'
22+
dev: '13'
23+
fn: '0'
24+
id: 1f15
25+
name: 'System peripheral: Intel Corporation Atom processor C2000 SMBus 2.0'
26+
- bus: '00'
27+
dev: '14'
28+
fn: '0'
29+
id: 1f41
30+
name: 'Ethernet controller: Intel Corporation Ethernet Connection I354'
31+
- bus: '00'
32+
dev: '14'
33+
fn: '1'
34+
id: 1f41
35+
name: 'Ethernet controller: Intel Corporation Ethernet Connection I354'
36+
- bus: '00'
37+
dev: '14'
38+
fn: '2'
39+
id: 1f41
40+
name: 'Ethernet controller: Intel Corporation Ethernet Connection I354'
41+
- bus: '01'
42+
dev: '00'
43+
fn: '0'
44+
id: b960
45+
name: 'Ethernet controller: Broadcom Limited Broadcom BCM56960 Switch ASIC'
46+
- bus: '01'
47+
dev: '00'
48+
fn: '1'
49+
id: b960
50+
name: 'Ethernet controller: Broadcom Limited Broadcom BCM56960 Switch ASIC'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
########################################################################
2+
#
3+
# DELLEMC S6100
4+
#
5+
# Module contains a platform specific implementation of SONiC Platform
6+
# Base PCIe class
7+
#
8+
########################################################################
9+
10+
try:
11+
from sonic_platform.component import Component
12+
from sonic_platform_base.sonic_pcie.pcie_common import PcieUtil
13+
except ImportError as e:
14+
raise ImportError(str(e) + "- required module not found")
15+
16+
17+
class Pcie(PcieUtil):
18+
"""DellEMC Platform-specific PCIe class"""
19+
20+
def __init__(self, platform_path):
21+
PcieUtil.__init__(self, platform_path)
22+
bios = Component(component_index=0)
23+
bios_ver = bios.get_firmware_version()
24+
25+
versions = bios_ver.split("-")
26+
if (len(versions) == 2) and int(versions[1], 10) > 5:
27+
self._conf_rev = "2"
28+
else:
29+
self._conf_rev = "1"

0 commit comments

Comments
 (0)