Implement PCIeType Property

Bills, Jason M jason.m.bills at linux.intel.com
Fri May 28 01:27:22 AEST 2021



On 5/27/2021 12:09 AM, Spencer Ku (古世瑜) wrote:
> Hi All,
>    We would like to implement PCIeInterface "PCIeType" property on both peci-pcie and bmcweb, then I find the PR which implement inventory properties like SparePartNumber, Model, PartNumber, SerialNumber for PCIe devices in bmcweb: https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/40051
> 
> I think we modify similar part of bmcweb, but I am not sure does it will implement "PCIeType" property in the future. So could we implement "PCIeType" property first since the PR status is WIP?
> 
> About the implement method, for peci-pcie part, first we use peci command to get the pointer of capability in PCI configure space. Then go through capability structure to find capability ID in 3rd capability structure. If the ID is PCI Express, then get the link speed in link status register. Finally, set the PCIeType property to D-Bus after translating (under /xyz/openbmc_project/PCIe/<str>) . >
> And for bmcweb part, we will create PCIeInterface {"PCIeType"} level (under /redfish/v1/Systems/system/PCIeDevices/<str>/ ) and fill the info from D-bus.
> 
> On the other hand, we also interested about how to get PartNumber and SerialNumber information? I already try to get from FRU over I2C but I cannot mapping the info between FRU and peci-pcie, or is it can easily get by peci-pcie? Any comments and suggestions are welcome!
peci-pcie currently can only get information that is available over PCI. 
  If these new fields come from somewhere other than PCI, it could be 
difficult to add them.

If these new fields all come from the FRU, then we should already have 
that data in other applications, so we shouldn't need to get it in a PCI 
application.

It may be good to discuss the design a bit for 
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/40051.  For 
example, I think FruDevice already has the FRU information for the PCIe 
devices.  Does the PCI application need to communicate with FruDevice 
and expose the same information again in the PCIe inventory on D-Bus? 
Or, should bmcweb directly look for the FruDevice to populate these new 
fields?
> 
> Please let us know if there's any issue, thank you!
> 
> Sincerely,
> Spencer Ku
> 


More information about the openbmc mailing list