GPU卡加载sr,但在web上未看见门限传感器

// 此模板仅供参考,如果不适用可以修改

问题描述

使用南向开发框架适配一款GPU卡时,web上显示有该GPU卡信息,说明已加载了sr,但门限传感器未在web上发现 执行busctl --user tree bmc.kepler.sensor 我sr中定义的Entity也未发现

环境信息

  • 软件版本:OpenUBMC2603]

sr文件为:

{
“FormatVersion”: “5.00”,
“DataVersion”: “5.00”,
“Unit”: {
“Type”: “PCIeGpuCard”,
“Name”: “PCIeGpuCard_1”,
“Compatible”: [“jm1100”]
},
“ManagementTopology”: {
“Anchor”: {
“Buses”: [
“I2cMux_Chan”
]
},
“I2cMux_Chan”: {
“Chips”: [
“Chip_McuChip”
]
}
},
“Objects”: {
“Chip_McuChip”: {
“Address”: 102,
“AddrWidth”: 1,
“OffsetWidth”: 1,
“WriteTmout”: 100,
“ReadTmout”: 100,
“HealthStatus”: 0
},
“Component_PCIeCard”: {
“FruId”: 255,
“Name”: “<=/PCIeGpuCard_1.DeviceName”,
“Instance”: “<=/PCIeGpuCard_1.Slot”,
“BoardId”: 65535,
“Type”: 8,
“Presence”: 1,
“Health”: 0,
“PowerState”: 1,
“UniqueId”: “N/A”,
“Manufacturer”: “JingJia Micro Technology Co.,Ltd”,
“ReplaceFlag”: 0,
“PreviousSN”: “”,
“SerialNumber”: “<=/PCIeGpuCard_1.SerialNumber”,
“GroupId”: 1
},
“PCIeGpuCard_1”: {
“bmc.dev.PCIeDevice”: {
“DeviceName”: “PCIe Card $ (JingJia Micro JM1100)”,
“DeviceType”: “SingleFunction”,
“SlotType”: “FullLength”,
“Model”: “JingJia Micro JM1100”,
“Manufacturer”: “JingJia Micro Technology Co.,Ltd”,
“PartNumber”: “”,
“SerialNumber”: “”,
“FirmwareVersion”: “”
},
“bmc.dev.PCIeCard”: {
“Name”: “JingJia Micro JM1100”,
“Description”: “JM1100”,
“BoardName”: “JM1100”,
“Health”: “<=/Component_PCIeCard.Health”
},
“bmc.dev.PCIeDevice.PCIeFunction”: {
“VendorId”: “0x0731”,
“DeviceId”: “0x1100”,
“SubSystemVendorId”: “0x0731”,
“SubSystemDeviceId”: “0x1105”,
“FunctionProtocol”: “PCIe”,
“FunctionType”: “Physical”
},
“bmc.dev.PCIeDevice.Oem”: {
“FunctionClass”: 3,
“ComponentType”: 8,
“Container”: “${Container}”,
“GroupPosition”: “PCIeDevice_1_${GroupPosition}”
}
},
“GraphicsController_1”: {
@Parent”: “PCIeGpuCard_1”,
“bmc.dev.Processor”: {
“SystemId”: 1,
“Id”: 1,
“Presence”: 1,
“Manufacturer”: “JingJia Micro Technology Co.,Ltd”,
“Model”: “JingJia Micro JM1100”,
“Location”: “<=/PCIeGpuCard_1.Location”,
“ProcessorType”: “GPU”,
“SocketDesignation”: “1”
},
“bmc.dev.Processor.Metrics”: {
“TemperatureCelsius”: 0,
“PowerWatts”: 0
},
“bmc.dev.Gpu”: {
“RefChip”: “#/Chip_McuChip”
},
“bmc.dev.Gpu.Power”: {
“PowerBrakeState”: 255,
“ExternalPowerSufficient”: 255
},
“bmc.dev.Gpu.Status”: {
“ECCModeEnabled”: 255,
“ECCModePendingEnabled”: 255,
“ResetRequired”: 255,
“DoubleBitErrorPageCount”: 0,
“SingleBitErrorPageCount”: 0
}
},
“Memory_1”: {
@Parent”: “PCIeGpuCard_1”,
“bmc.dev.Memory”: {
“DimmNum”: 1,
“Manufacturer”: “JingJia Micro”
},
“bmc.dev.Memory.Metrics”: {
“MemoryUsagePercent”: 0,
“BandwidthUsagePercent”: 0
}
},
“BoardPCIeCard_1”: {
“Slot”: “<=/PCIeGpuCard_1.Slot”,
“UID”: “N/A”,
“Name”: “N/A”,
“Manufacturer”: “JingJia Micro Technology Co.,Ltd”,
“Type”: “PCIeCard”,
“Description”: “JM1100 Series GPU”,
“PartNumber”: “”,
“PcbID”: 0,
“LogicVersion”: “N/A”,
“SRVersion”: “”,
“BoardType”: “BoardPCIeCard”,
“Number”: 1,
“DeviceName”: “<=/PCIeGpuCard_1.DeviceName”,
“Position”: “<=/PCIeGpuCard_1.Location”,
“BoardNodeId”: “<=/PCIeGpuCard_1.DeviceName”,
“FruID”: 255
},
“Entity_GPUCard”: {
“Id”: 11,
“Name”: “GPUCard”,
“PowerState”: 1,
“Presence”: 1,
“Instance”: 101
},
“ThresholdSensor_JM1100GPUTemp”: {
“OwnerId”: 32,
“OwnerLun”: 0,
“EntityId”: “<=/Entity_GPUCard.Id”,
“EntityInstance”: “<=/Entity_GPUCard.Instance”,
“Initialization”: 127,
“Capabilities”: 232,
“SensorType”: 1,
“ReadingType”: 1,
“SensorName”: “GPU${Slot} Temp”,
“Unit”: 128,
“BaseUnit”: 1,
“NominalReading”: 25,
“MaximumReading”: 127,
“AssertMask”: 128,
“DeassertMask”: 12416,
“ReadingMask”: 2056,
“M”: 100,
“RBExp”: 224,
“Analog”: 1,
“Reading”: “<=/GraphicsController_1.TemperatureCelsius”,
“ReadingStatus”: “<=/GraphicsController_1.TemperatureCelsius|> expr(($1 >= 32768) ? 1 : 0)”,
“SensorNumber”: 255,
“UpperNoncritical”: 85,
“PositiveHysteresis”: 2,
“NegativeHysteresis”: 2
},
“CoolingRequirement_1_58”: {
“RequirementId”: “${Slot} |> expr((58 << 8) | $1)”,
“TemperatureType”: 1,
“MonitoringStatus”: “<=/GraphicsController_1.TemperatureCelsius |> expr(($1 == 0 || $1 >= 127) ? 1 : 0)”,
“MonitoringValue”: “<=/GraphicsController_1.TemperatureCelsius |> expr(($1 == 0 || $1 >= 127) ? 30 : ($1 & 255))”,
“FailedValue”: 80,
“TargetTemperatureCelsius”: 70,
“MaxAllowedTemperatureCelsius”: 78
},
“Event_OverTemp”: {
“EventKeyId”: “PCIeCard.PCIeCardOverTemp”,
“Condition”: “<=/ThresholdSensor_JM1100GPUTemp.UpperNoncritical”,
“Hysteresis”: “<=/ThresholdSensor_JM1100GPUTemp.PositiveHysteresis”,
“Reading”: “<=/GraphicsController_1.TemperatureCelsius |> expr($1 >= 255 ? 30 : ($1 & 255))”,
@Default”: {
“Condition”: 85
},
“OperatorId”: 4,
“Enabled”: true,
“Component”: “#/Component_PCIeCard”,
“AdditionalInfo”: “2”,
“DescArg2”: “#/Component_PCIeCard.Name”,
“DescArg4”: “#/Event_OverTemp.Reading |> string.format(‘%s’, $1)”,
“DescArg5”: “#/ThresholdSensor_JM1100GPUTemp.UpperNoncritical”
},
“Event_TempFail”: {
“EventKeyId”: “PcieCard.PCIeCardTempFail”,
“Condition”: 1,
“Reading”: “<=/GraphicsController_1.TemperatureCelsius |> expr(($1 == 32768) ? 1 : 0)”,
“OperatorId”: 5,
“Enabled”: true,
“Component”: “#/Component_PCIeCard”,
“AdditionalInfo”: “2”,
“DescArg2”: “#/Component_PCIeCard.Name”
},
“Event_PCIeCardUCE”: {
“EventKeyId”: “PCIeCard.PCIeCardUncorrectableErr”,
“Condition”: 1,
“LedFaultCode”: “q$$”,
“Reading”: “<=/PCIeGpuCard_1.DiagnosticFault;<=/PCIeGpuCard_1.UCEByBios |> expr(($1 + $2) == 0 ? 0 : 1)”,
“OperatorId”: 5,
“Enabled”: true,
“AdditionalInfo”: “2”,
“DescArg2”: “#/Component_PCIeCard.Name”,
“DescArg4”: “NA”,
“Component”: “#/Component_PCIeCard”
},
“Event_PCIeCardCE”: {
“EventKeyId”: “PCIeCard.PCIeCardCEHardFailure”,
“Condition”: 1,
“LedFaultCode”: “q$$”,
“Reading”: “<=/PCIeGpuCard_1.PredictiveFault”,
“OperatorId”: 5,
“Enabled”: true,
“AdditionalInfo”: “2”,
“DescArg2”: “#/Component_PCIeCard.Name”,
“Component”: “#/Component_PCIeCard”
},
“Event_PcieCardReplaceMntr”: {
“EventKeyId”: “PcieCard.PcieCardReplace”,
“Condition”: 1,
“Reading”: “<=/Component_PCIeCard.ReplaceFlag”,
“OperatorId”: 5,
“Enabled”: true,
“AdditionalInfo”: “1”,
“DescArg1”: “#/Component_PCIeCard.Name”,
“DescArg2”: “#/Component_PCIeCard.PreviousSN”,
“DescArg3”: “#/Component_PCIeCard.SerialNumber”,
“Component”: “#/Component_PCIeCard”
},
“Event_PCIeBandWidth”: {
“EventKeyId”: “PCIeCard.PCIeCardBandWidthDecreased”,
“Condition”: 1,
“Reading”: “<=/PCIeGpuCard_1.BandwidthReduced”,
“OperatorId”: 5,
“Enabled”: true,
“AdditionalInfo”: “2”,
“DescArg2”: “#/PCIeGpuCard_1.Slot”,
“DescArg3”: “(JingJia Micro JM1100)”,
“Component”: “#/Component_PCIeCard”
}
}
}

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

总结

最可能的原因:SR 文件未成功打包进 BMC 镜像,或路径未被 profile.txt 收录,导致 Entity_GPUCard 未加载。

其次可能:Entity 虽然加载但因 Presence/PowerState 为 0 被禁用(但您写死为 1,应排除),或传感器引用解析失败。

建议优先检查 profile.txt 配置和框架日志,确认 SR 文件是否被正确扫描和加载。如需进一步帮助,请提供完整的构建日志或框架日志片段。

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

问题分析

根据您提供的 SR 文件和环境信息,门限传感器 未在 Web 上显示busctl --user tree bmc.kepler.sensor 中未发现 Entity_GPUCard,说明该实体可能未被成功注册到传感器树中。结合上下文知识(尤其来自传感器管理常见问题指南GPU1.0卡适配指导),常见原因如下:

1. SR 文件未正确加载或未打包进固件

  • 检查 SR 文件路径是否包含在镜像中
    您需要确认在构建时,该 SR 文件已被添加到 build/product/BMC/openUBMC/rootfs/include/profile.txt(或其他针对机型的 profile)中。
    引用:

    “为了将sr文件带入hpm包,还需要修改manifest,一般在build/product/BMC/openUBMC/rootfs/include/profile.txt路径下”(文档片段 #7
    “检查 vpd/vendor/Huawei/Server/Kunpeng/openUBMC/profile.txt 内是否增加新增 sr 文件路径”(搜索 #5

  • 检查 SR 文件名和目录结构
    根据 GPU 卡适配规范,SR 文件名通常由 BOM_AuxId.srBOM_Id_AuxId.sr 组成。您提供的 SR 文件内容中没有明确体现文件名,请确保:

    • 文件名符合硬件上报的四元组(如 14140130_07311100_07311105.sr),且存放在正确的 vpd/vendor/<厂商>/ 目录下。
    • 上级连接器(如载板、IEU)的 SR 中已配置 Connector 指向该 GPU 卡,且 IdentifyMode 建议设为 2(静态识别模式,由 BIOS 上报 BDF 后加载 SR)。
      引用:

      “IdentifyMode=2表示为静态识别模式”(文档 #5
      “SR加载的IdentifyMode模式建议配置为2”(GPU1.0卡适配指导)

2. Entity 的 Presence 或 PowerState 未正确生效

  • 您 SR 中 Entity_GPUCard"Presence": 1"PowerState": 1 看似正常,但请确认:
    • 这些值是否为静态写死?若 PresencePowerState 由硬件信号动态更新(如连接器检测),则需确保实际硬件在位且上电,否则 Entity 不会被注册。
    • 建议通过 busctl get-property 检查运行时 Entity 的真实状态:
      busctl --user get-property bmc.kepler.sensor /bmc/kepler/ObjectGroup/... Entity_GPUCard Presence
      

3. 传感器 Capabilities 和关联配置

  • 您传感器 ThresholdSensor_JM1100GPUTempCapabilities232(即 0xE8),表示传感器使能受实体在位和上下电影响。既然 Entity 未注册,传感器自然无法激活。
  • 关联字段 EntityIdEntityInstance 使用动态引用(<=/Entity_GPUCard.Id 等),语法正确。但若 Entity 对象未加载,则传感器引用解析失败,也不会注册。

4. ReadingMask 可能导致读值隐藏

  • 您的 ReadingMask2056(0x0808),可能屏蔽了读值显示。参考规范,ReadingMask 为 0 时表示始终显示,非 0 可能隐藏读数。建议先设为 0 或确认此值的含义。

5. 缺少必要的依赖对象(如 Chip、Scanner)

  • 传感器读值来源于 GraphicsController_1.TemperatureCelsius,而该属性定义在 GraphicsController_1 下。请确认:
    • GraphicsController_1 对象及其父对象 PCIeGpuCard_1 是否已正常加载(通过 busctl tree 可查)。
    • 温度数据源(TemperatureCelsius)是否有实际读值(可能为 0 导致传感器显示无读数?但 Entity 未注册是更严重的问题)。

排查步骤建议

  1. 确认 SR 文件是否在固件中

    • 登录 BMC 后,检查 /opt/bmc/sr/ 目录下是否存在您上传的 SR 文件(文件名应与加载时一致)。
    • /var/log/framework.log 中过滤 hwdiscovery 关键词,查找是否有类似 get component sr failedloaded sr 的日志。
  2. 检查 Connector 和识别流程

    • 确认上级组件(如载板)的 SR 中配置了您的 GPU 卡连接器,并且 Presence 信号正确。
    • 确认 BIOS 已上报该 GPU 卡的 BDF 信息(日志搜索 PCIeAddrInfo)。
  3. 验证 Entity 对象

    • 使用 busctl --user tree bmc.kepler.sensor 列出所有对象,检查是否存在 Entity_GPUCard
    • 若不存在,则表明 SR 文件未被加载,或加载失败。查看 app.loggeneral_hardware 组件是否有错误(如解析异常)。
  4. 调整 ReadingMask

    • 暂时将 ReadingMask 改为 0 以排除其影响。
  5. 添加 sensor 相关依赖

    • 根据 GPU1.0 适配指导,门限传感器需要 Entity 对象和正确的 ScannerAccessor。您当前的 SR 中未定义任何 Scanner 或温度源(TemperatureCelsius 未关联硬件读取)。建议:
      • 参考 component_driver 中其他 GPU 卡的实现,增加 AccessorScanner 来获取温度值(如通过 SMBPBI 协议)。
      • 若温度直接由 MCU 提供,需在 Chip_McuChip 下增加 Accessor 来读取寄存器。

总结

最可能的原因:SR 文件未成功打包进 BMC 镜像,或路径未被 profile.txt 收录,导致 Entity_GPUCard 未加载。

其次可能:Entity 虽然加载但因 Presence/PowerState 为 0 被禁用(但您写死为 1,应排除),或传感器引用解析失败。

建议优先检查 profile.txt 配置和框架日志,确认 SR 文件是否被正确扫描和加载。如需进一步帮助,请提供完整的构建日志或框架日志片段。

sr应该加载了,都能看见卡的信息

麻烦上传一键收集日志

dump_info.zip (9.6 MB)

已上传