OpenBMC - FRU inventory with Entity Manager

Ed Tanous ed at tanous.net
Thu Sep 3 11:15:07 AEST 2020


On Wed, Sep 2, 2020 at 3:27 PM Andrei Kartashev <a.kartashev at yadro.com> wrote:
>
> On Mon, 2020-08-31 at 10:14 -0700, Ed Tanous wrote:
> >
> > On Wed, Aug 26, 2020 at 11:11 PM Andrei Kartashev <
> > a.kartashev at yadro.com> wrote:
> > > Since there is a plan to move to EM for inventory, I believe it is
> > > really good idea to also have support for FruDevice in phosphor-
> > > host-
> > > ipmid. Then we can have a common way on how to handle it.
> > > Same for SDR BTW.
> >
> > +1.  This was attempted a long time ago, but nobody was able to come
> > up with a design that kept the "old" way working for those that
> > needed it, and at the time there were some missing features.  Given
> > where entity manager has gotten, it's probably time to start that
> > discussion up again.  Do you think you could put together a patch
> > that does what you describe?
> >
> Well, I currently have number of more critical tasks for platform
> bring-up, but I can take a look.

If you get the time, I'd appreciate it.  If not, I still appreciate
your input sofar.

>
> > > But there is other thing: there is catastrophically not enough
> > > documentation for EntityManager/dbus-sensors. Looks like common way
> > > just to adjust existing config and hope that it still will work.
> > > <sorry, was all the day trying to get adcsensors work yesterday>
> >
> > That being the case, would you mind taking a look at the docs changes
> > I just put up.  It's trying to improve the EM documentation a bit,
> > although I realize it doesn't get all the way to where it needs to
> > be.
> > https://gerrit.openbmc-project.xyz/c/openbmc/entity-manager/+/36110
>
> Great doc! I wish I had it month ago )

At least it'll be there for the next person.

>
> > Also, it'd be great if you can come up with some concrete examples of
> > what else we can improve in this regard.  Unfortunately the "copy an
> > existing config and modify" approach was the best way we found to
> > make platform ports easy.  A lot of systems tend to look pretty
> > similar, based on similar reference platforms, so usually there's
> > something to use as a starting point.  Building a config from scratch
> > using first principals and documentation is kind of daunting, and
> > became a non-starter for most people, given that the config files
> > tend to be large.
>
> Yes, everyone likes "copy-paste" and this is working approach. Unless
> you understand what exactly you pasting. E.g. Fan/PID configuration
> looks like a hell and it doesn't match one that described in phosphor-
> pid-manager ).

That's definitely a low effort/high reward place where we should do a
better job documenting each parameter and their constraints.

> So, now we have brilliant top-level overview, next step is to describe
> how to use and extend it. That is mostly on reactor side, of course,
> but on EM side we should clearly describe how config is translated to
> dbus objects.

This has evolved quite a bit over the life of Entity Manager, but
again, this is great feedback, and something that it's probably time
to document better including documenting the places that are "wrong",
but hacked around a problem.

> Another thing I would like to have is even more high-
> level document describing the common architecture of EM-based
> inventory.
> I can start with some drafts of what I dig, to make it more clear.

Great!

>
> > What were the biggest roadblocks you hit trying to get ADCSensor
> > working?
> >
>
> ADC is king of easiest sensor you can have, I thought ).

I think LM75 beats it :)

> But still I
> face stones. For example, if you remove "PowerState": "On" from all
> channels, you will get crash with "Power Match Not Created". Or this
> configuration entry in Wolfpass config:

That's a bug for sure.  What host power state management system are you using?

>             "BridgeGpio": [
>                 {
>                     "Name": "P3VBAT_BRIDGE_EN",
>                     "Polarity": "High"
>                 }
>             ],
> which seems to be copy-pasted from somewhere else, since it present in
> all other configs, but not in board schematics )
> That is, of cause, not
> a problem of EM or dbus-sensor, but this is example for copy-pasting
> issues.
>

I just looked, and there's 2 platforms that have a bridgeGpio
definition, and Wolf Pass for sure has it on the schematic, not sure
about FBTP.  Which platform were you looking at that didn't have it?
ADCs have a very high parasitic drain on the cmos battery, to the
point where it affects their longevity.  This is an implementation of
a FET that explicitly enables the circuit when the battery is being
read.  Most modern Aspeed platforms should have this circuit.

Point made, copy-paste is not a substitute for documenting what things
do so when you copy paste, you can know what needs modified.


More information about the openbmc mailing list