PCIE配置问题

版本:2603

当前配置PCIE,os下面dmidecode查询如下:

IEU配置如下:

   "Connector_PCIe_1": {
            "Bom": "14140130",
            "Slot": 1,
            "Position": 1,
            "Presence": 1,
            "Id": "",
            "AuxId": "",
            "Buses": [
                "I2cMux_9545Chan2"
            ],
            "SystemId": "${SystemId}",
            "ManagerId": "${ManagerId}",
            "ChassisId": "${ChassisId}",
            "SilkText": "RiserCard${Slot}",
            "IdentifyMode": 2,
            "Container": "Component_RiserCard",
            "Type": "PCIe"
        },
        "BusinessConnector_1": {
            "Name": "Up_1",
            "Direction": "Upstream",
            "Slot": 1,
            "LinkWidth": "X16",
            "MaxLinkRate": "PCIe 4.0",
            "ConnectorType": "UBCDD",
            "Ports": [
                {
                    "Name": "Down_1",
                    "ID": 49,
                    "Offset": 0,
                    "Width": 16
                }
            ]
        },
        "BusinessConnector_2": {
            "Name": "Down_1",
            "Direction": "Downstream",
            "Slot": 1,
            "LinkWidth": "X16",
            "MaxLinkRate": "PCIe 4.0",
            "ConnectorType": "PCIe CEM",
            "UpstreamResources": [
                {
                    "Name": "Up_1",
                    "ID": 255,
                    "Offset": 0,
                    "Width": 16
                }
            ],
            "RefMgmtConnector": "#/Connector_PCIe_1",
            "RefPCIeAddrInfo": "#/PcieAddrInfo_1"
        },
        "PcieAddrInfo_1": {
            "Segment": 0,
            "SlotID": 1,
            "GroupID": 1,
            "PortID": 8,
            "SocketID": 0,
            "Bus": 3,
            "Device": 0,
            "Function": 0,
            "Location": "RiserCard${Slot}",
            "ComponentType": 8,
            "ContainerSlot": "${Slot}",
            "ContainerUID": "00000001040302023940",
            "ContainerUnitType": "IEU",
            "GroupPosition": "PcieAddrInfo_1_${GroupPosition}"
        },
        "Connector_PCIe_2": {
            "Bom": "14140130",
            "Slot": 2,
            "Position": 2,
            "Presence": 1,
            "Id": "",
            "AuxId": "",
            "Buses": [
                "I2cMux_9545Chan3"
            ],
            "SystemId": "${SystemId}",
            "ManagerId": "${ManagerId}",
            "ChassisId": "${ChassisId}",
            "SilkText": "RiserCard${Slot}",
            "IdentifyMode": 2,
            "Container": "Component_RiserCard",
            "Type": "PCIe"
        },
        "BusinessConnector_3": {
            "Name": "Up_2",
            "Direction": "Upstream",
            "Slot": 2,
            "LinkWidth": "X8",
            "MaxLinkRate": "PCIe 4.0",
            "ConnectorType": "UBC",
            "Ports": [
                {
                    "Name": "Down_2",
                    "ID": 48,
                    "Offset": 0,
                    "Width": 8
                }
            ]
        },
        "BusinessConnector_4": {
            "Name": "Down_2",
            "Direction": "Downstream",
            "Slot": 2,
            "LinkWidth": "X8",
            "MaxLinkRate": "PCIe 4.0",
            "ConnectorType": "PCIe CEM",
            "UpstreamResources": [
                {
                    "Name": "Up_2",
                    "ID": 255,
                    "Offset": 0,
                    "Width": 8
                }
            ],
            "RefMgmtConnector": "#/Connector_PCIe_2",
            "RefPCIeAddrInfo": "#/PcieAddrInfo_2"
        },
        "PcieAddrInfo_2": {
            "Segment": 0,
            "SlotID": 2,
            "GroupID": 2,
            "PortID": 0,
            "SocketID": 0,
            "Bus": 1,
            "Device": 0,
            "Function": 0,
            "Location": "RiserCard${Slot}",
            "ComponentType": 8,
            "ContainerSlot": "${Slot}",
            "ContainerUID": "00000001040302023940",
            "ContainerUnitType": "IEU",
            "GroupPosition": "PcieAddrInfo_2_${GroupPosition}"
        },
        "Connector_PCIe_3": {
            "Bom": "14140130",
            "Slot": 3,
            "Position": 3,
            "Presence": 1,
            "Id": "",
            "AuxId": "",
            "Buses": [
                "I2cMux_9545Chan4"
            ],
            "SystemId": "${SystemId}",
            "ManagerId": "${ManagerId}",
            "ChassisId": "${ChassisId}",
            "SilkText": "RiserCard${Slot}",
            "IdentifyMode": 2,
            "Container": "Component_RiserCard",
            "Type": "PCIe"
        },
        "BusinessConnector_5": {
            "Name": "Up_3",
            "Direction": "Upstream",
            "Slot": 3,
            "LinkWidth": "X8",
            "MaxLinkRate": "PCIe 4.0",
            "ConnectorType": "UBC",
            "Ports": [
                {
                    "Name": "Down_3",
                    "ID": 47,
                    "Offset": 0,
                    "Width": 8
                }
            ]
        },
        "BusinessConnector_6": {
            "Name": "Down_3",
            "Direction": "Downstream",
            "Slot": 3,
            "LinkWidth": "X8",
            "MaxLinkRate": "PCIe 4.0",
            "ConnectorType": "PCIe CEM",
            "UpstreamResources": [
                {
                    "Name": "Up_3",
                    "ID": 255,
                    "Offset": 0,
                    "Width": 8
                }
            ],
            "RefMgmtConnector": "#/Connector_PCIe_3",
            "RefPCIeAddrInfo": "#/PcieAddrInfo_3"
        },
        "PcieAddrInfo_3": {
            "Segment": 0,
            "SlotID": 3,
            "GroupID": 3,
            "PortID": 4,
            "SocketID": 0,
            "Bus": 2,
            "Device": 0,
            "Function": 0,
            "Location": "RiserCard${Slot}",
            "ComponentType": 8,
            "ContainerSlot": "${Slot}",
            "ContainerUID": "00000001040302023940",
            "ContainerUnitType": "IEU",
            "GroupPosition": "PcieAddrInfo_3_${GroupPosition}"
        },

2个X8的ID都是3,但是我配置的一个为2一个未3,为什么os下显示的ID是一样的,这个样子我插2个算力卡,BMC上是没有算力卡显示的,如何解决这个问题,ID还和什么有关系,PSR吗

答案内容由AI生成,仅供参考:

总结

操作系统显示错误的 Slot ID 的根本原因,很可能是 PortId 冲突。即 Riser 卡或 SR 配置文件中的 PortId 设置与您 IEU 配置中的不一致,导致系统在解析 PCIe 地址时发生错乱,进而影响 BMC 对算力卡的识别。

建议优先检查并统一 PortId 配置,确保各配置文件(IEU、SR、PSR)之间的逻辑一致。

点击此处查看详细分析解答

根据您提供的信息和知识库内容,您遇到的 PCIe 配置问题 主要原因在于 Connector对象与 PcieAddrInfo 对象未正确关联,导致 Slot ID 信息错误。

以下是详细分析和解决方案:

问题根因分析

您的核心问题是:配置中为两个 X8 槽位(Slot 2 和 Slot 3)设置了不同的 SlotID(分别为 2 和 3),但操作系统下 dmidecode 显示的 ID 却都是 3。

根据知识库中的描述,Connector_PCIe_4 存在一个相似的问题:

“The slot information remains as ‘0’ because the Connector_PCIe_4 object is not properly linked to the PcieAddrInfo_4 object.”

这说明 Slot 信息的正确显示依赖于 BusinessConnector 通过 RefPCIeAddrInfo 字段正确引用 PcieAddrInfo 对象。知识库也指出:

“The lack of configuration for BusinessConnector prevents downstream object linking, affecting component recognition.”

结合您的配置,问题可能出在以下环节:

  1. 配置关联检查:请确认您的 BusinessConnector_4(对应 Slot 2)是否正确通过 "RefPCIeAddrInfo": "#/PcieAddrInfo_2" 关联到了 PcieAddrInfo_2。如果关联错误或缺失,系统无法获得正确的 Slot ID,可能会回退到默认值或错误值。

  2. PortId 冲突:知识库中提到一个关键点:

    “A conflict in PortId between the riser card and SR card can lead to incorrect PCIe address resolution.”

    在您的配置中:

    • PcieAddrInfo_2 的 PortID 是 0
    • PcieAddrInfo_3 的 PortID 是 4

    虽然这两个值不同,但您需要检查 riser card 的 CSR 配置文件(通常在 silkconfig.json 或定制 SR 文件中)中为这两个槽位定义的 PortId。如果 SR 文件中这两个槽位的 PortId 都设置成了相同的值(例如都设为 3),就会产生冲突,导致系统错误地分配或显示 ID。

解决方案与排查步骤

您可以按照以下步骤进行排查和解决:

  1. 检查 BusinessConnector 与 PcieAddrInfo 的关联:

    • 仔细核对 BusinessConnector_4 是否通过 RefPCIeAddrInfo 正确指向 PcieAddrInfo_2。
    • 确保 RefMgmtConnector 也正确指向对应的 Connector_PCIe_2。
  2. 检查 PortId 冲突:

    • 这是最可能的原因。知识库明确指出:

      “这种情况一般是riser卡csr配置的PortId和定制sr配置的PortId冲突,可以参考 docs/docs/zh/development/develop_guide/feature_development/pcie_device_topo_create.md,修改其中一个portid解决冲突”

    • 请检查您的 riser card 的 CSR 配置和您当前使用的定制 SR 文件(如 14100513_BCU_0.sr),确认其中分配给 Slot 2 和 Slot 3 的 PortId 值。如果它们相同,请修改其中一个,使其与您 IEU 配置中的 PortID 保持一致(例如,一个为 0,一个为 4)。
  3. 确认 PSR 配置:

    • 知识库中提到 PSR 文件也可能影响设备识别。请检查您的 PSR 配置中关于这两个槽位的 TargetPortID 和 Slot 映射,确保它们与您的 IEU 配置文件逻辑一致。

总结

操作系统显示错误的 Slot ID 的根本原因,很可能是 PortId 冲突。即 Riser 卡或 SR 配置文件中的 PortId 设置与您 IEU 配置中的不一致,导致系统在解析 PCIe 地址时发生错乱,进而影响 BMC 对算力卡的识别。

建议优先检查并统一 PortId 配置,确保各配置文件(IEU、SR、PSR)之间的逻辑一致。

这个需要你做完拓扑建立,实际生成的丝印中,PortID和SlotID和硬件规划一致,上报丝印正确带内才能正确拿到对应关系。

配死需要在psr中配置Device,只配置pcieaddrinfo还是会进行拓扑建立,最后会覆盖你配置的值。

有关卡加载参考:
PCIe设备加载 | 文档中心 | openUBMC

拓扑建立具体流程参考:
拓扑建立 | 文档中心 | openUBMC