【已评审】新增PCIeFunction资源协作接口

背景

产业的OCP卡管理方案中,需要x16资源可以从2个CPU中出,每个CPU出一个x8,每张卡需要分配多个PCIeFunction以对应不同的CPU。

需要以PCIeFunction而不是PCIeDevice为单位管理root BDF和BDF。

关联ISSUE

https://gitcode.com/openUBMC/pcie_device/issues/45

整体方案

PCIeFunction由pcie_device组件负责上树,属性实现沿用bmc.kepler.Systems.PCIeDevices.PCIeDevice和bmc.kepler.Systems.PCIeDevices.PCIeCard。

评审点

为了适应每张卡有多个PCIeFunction以及多种BDF的需求,需新增以下路径:

/bmc/kepler/Systems/${SystemId}/PCIeDevices/${Id}/PCIeFunctions/${PCIeFunctionId}

该路径有以下接口:

bmc.kepler.Systems.PCIeDevice.PCIeFunction

bmc.kepler.Systems.PCIeDevice.PCIeFunction.RAS

接口属性见详细描述。

详细描述

新增Path:

/bmc/kepler/Systems/${SystemId}/PCIeDevices/${Id}/PCIeFunctions/${PCIeFunctionId}

新增Interface:

bmc.kepler.Systems.PCIeDevice.PCIeFunction

bmc.kepler.Systems.PCIeDevice.PCIeFunction.RAS

bmc.kepler.Systems.PCIeDevice.PCIeFunction属性如下:

属性名称 签名 默认值 操作权限 说明 持久化 变化通知 备注
SegmentNumber q 0xffff 只读,R:ReadOnly 用于多PCI Bridge场景的编号,每一个SegmentNumber对应一个PCI Bus空间
BusNumber y 0xff 只读,R:ReadOnly PCIe功能的总线号
DeviceNumber y 0xff 只读,R:ReadOnly PCIe功能的设备号
FunctionNumber y 0xff 只读,R:ReadOnly PCIe功能的功能号
RelatedProcessorId y 0xff 只读,R:ReadOnly 关联的处理器逻辑Id
RootBusNumber y 0xff 只读,R:ReadOnly PCIe功能的根总线号
RootDeviceNumber y 0xff 只读,R:ReadOnly PCIe功能的根设备号
RootFunctionNumber y 0xff 只读,R:ReadOnly PCIe功能的根功能号
VendorId q 0xffff 只读,R:ReadOnly 制造商ID
DeviceId q 0xffff 只读,R:ReadOnly 设备ID
SubsystemVendorId q 0xffff 只读,R:ReadOnly 子厂商ID
SubsystemId q 0xffff 只读,R:ReadOnly 子设备ID
FunctionProtocol s “PCIe” 只读,R:ReadOnly PCIe功能协议,取值为"CXL"或"PCIe"
FunctionType s “Physical” 只读,R:ReadOnly PCIe功能类型,取值为"Physical"或"Virtual"
BaseClassCode y 0xff 只读,R:ReadOnly PCIe功能的基类码
SubClassCode y 0xff 只读,R:ReadOnly PCIe功能的子类码
ProgrammingInterface y 0xff 只读,R:ReadOnly PCIe功能的编程接口

bmc.kepler.Systems.PCIeDevice.PCIeFunction.RAS属性如下:

属性名称 签名 默认值 操作权限 说明 持久化 变化通知 备注
FatalErrorCount u 0 可读写 R: ReadOnly W:BasicSetting PCIe功能致命错误计数 复位持久化
NonFatalErrorCount u 0 可读写 R: ReadOnly W:BasicSetting PCIe功能非致命错误计数 复位持久化
BadDLLPCount u 0 可读写 R: ReadOnly W:BasicSetting 最近一次上电期间BadDLLP错误累计值 复位持久化
BadTLPCount u 0 可读写 R: ReadOnly W:BasicSetting 最近一次上电期间BadTLP错误累计值 复位持久化
UnsupportedRequestCount u 0 可读写 R: ReadOnly W:BasicSetting 最近一次上电期间UnsupportedRequest错误累计值 复位持久化
CorrectableErrorOverfrequencyCount u 0 可读写 R: ReadOnly W:BasicSetting 最近一次上电期间PCIe设备CE故障发生频率超门限错误累计值 复位持久化

评审结论

同意新增资源协作对象路径:
/bmc/kepler/Systems/${SystemId}/PCIeDevices/${Id}/PCIeFunctions/${PCIeFunctionId},并新增资源协作接口:
bmc.kepler.Systems.PCIeDevice.PCIeFunction
bmc.kepler.Systems.PCIeDevice.PCIeFunction.RAS
接口属性参见详细描述

遗留问题