openbmc / entity-manager

Run-time JSON driven system configuration manager
Other
26 stars 48 forks source link

FRU-Device does not work well with 16bit eeproms #1

Open feistjj opened 5 years ago

feistjj commented 5 years ago

Known issue, unfortunately I don't have any 16bit eeproms in my system to play with.

Start of solution here: https://gerrit.openbmc-project.xyz/c/openbmc/entity-manager/+/18783

feistjj commented 5 years ago

Adding @pstrinkle, @amithash and @vijaykhemka as they are / have worked with this issue.

vijaykhemka commented 5 years ago

Main issue is that it is hard to detect a device 8 bit vs 16 bit by reading it. In current implementation, assumption is device comes up with index pointer pointing to 0 offset. If it points to different offset/page then can't read header without writing.

pstrinkle commented 5 years ago

Yup. That's the primary difficulty. I have a device that is 16-bit addressed, but every other boot of the BMC, FruDevice changes its mind. So I implemented a quick hint-lookup that'll check and see if a device is "hard-coded" to be one or the other. However, this requires a lot of board knowledge -- and we mix 8-bit and 16-bit at the same smbus address. Although, we have some knowledge that if it's on bus 6 or 7 (for example) then it must be 16-bit. So, I have those hints available to the code. With the hint in place, it always works for me.