FRU Device type one byte or Two byte Validation
Ed Tanous
edtanous at google.com
Tue Nov 30 04:39:49 AEDT 2021
On Thu, Nov 25, 2021 at 1:06 AM Kumar Thangavel
<kumarthangavel.hcl at gmail.com> wrote:
>
> Hi Ed,
>
> Please find my response below.
> Please search this mail thread "EEPROM Validation issue in Fru Device " for more information.
>
> Thanks,
> Kumar.
>
>
> On Thu, Nov 25, 2021 at 2:10 AM Ed Tanous <edtanous at google.com> wrote:
>>
>> On Wed, Nov 24, 2021 at 1:17 AM Kumar Thangavel
>> <kumarthangavel.hcl at gmail.com> wrote:
>> >
>> > Hi All,
>> >
>> > We would like to validate our NIC FRU device type as 8 bit (one byte) or 16 bit(two byte).
>> >
>> > This device type validation for our FRU is platform specific logic.
>>
>> Please include more details about what this logic is. In the
>> entity-manager design, anything that's truly platform specific needs
>> to go into the entity-manager configuration, as all other components
>> are common.
>>
> The existing logic to get the device type is 8bit or 16bit is not working exactly for our platform.
> Also, writing some bytes and getting device type in eeprom is not safe and not suggested.
> So, we implemented the platform specific logic to get the eeprom device type in the machine layer.
>
> https://github.com/openbmc/entity-manager/blob/master/src/FruDevice.cpp#L430
>>
>> > This was implemented in the machine layer.
>>
>> Can you point to it?
>>
> The logic is, get the NIC card vendor info from ncsi-netlink command and based on NIC vendor,
> set the eeprom device type as 8bit or 16 bit.
>
> We wanted to interlink this logic in entity-manager.
If the NIC card can be identified over NCSI, you would create an
application that makes the card model information available on dbus,
rewrite your Probe statement to match on the NCSI property, then put
something like "Size" in the FRU exposes record, which FruDevice could
then pick up from dbus and use to parse the FRU properly.
>
>> >
>> > We wanted to interlink this logic with entity-manager code to get the device type.
>> >
>> > Could you please provide the suggestions on get the device type in entity-manager.
>>
>> Entity-manager provides the exposes records on dbus, for which
>> reactors can pick them up and use them.
>
>
> Is there any way to get the dynamic values (device type - 8bit/16bit ) from the machine layer
> to the entity-manager ?
EM config files.
>>
>>
>> >
>> > Please refer below link for existing devicebit validation in entity-manager.
>> > https://github.com/openbmc/entity-manager/blob/master/src/FruDevice.cpp#L430
>>
>> I'm not quite following what this has to do with your above, given
>> that this isn't intended to be platform specific.
>>
>
> This existing logic to get the device type 8/16 bit may not work for all the devices.
> We need to find common logic for all the devices without any breakage. But it is very tricky.
>
> Alternatively, platform specific logic can be an option and interlink with EM at run time.
> We are trying this and requesting suggestions from MAINTAINERS.
As a general rule, anything that's truly platform specific (ie, would
cause conflicts if run on other systems) should be specified in the EM
config files. That's what they're there for.
>
>> >
>> > Thanks,
>> > Kumar.
More information about the openbmc
mailing list