Is it required that regulator sensors implement threshold interfaces?

Ed Tanous ed.tanous at intel.com
Fri Sep 27 08:48:36 AEST 2019


On 9/26/19 2:00 PM, Shawn McCarney wrote:
> Hi Ed.  Thanks for the information and feedback.
> 
> On 9/26/2019 3:07 PM, Ed Tanous wrote:
>> For some implementations, these are used to appropriately scale the SDR,
>> and provide the redfish interfaces for those properties.
> 
> What is SDR?  Sorry I'm not familiar with that acronym.

Section 33 of the IPMI specification.  Type 1 record, M and B values are
what you're looking for.

> 
>> I'm not really following why you wouldn't want to implement
>> those.
> 
> The problem is one of scale.  Some of the systems where my application
> will run may have 30+ voltage rails.  30 rails * 9 sensors per rail =
> 270 MinValues and MaxValues.  I'd rather not ask the hardware engineers
> to provide 540 data values unless absolutely necessary.

You'll already need to ask the hardware engineers for the voltage
scaling for all of these rails, so you already have a scale problem.
The nice thing about voltage is that in most cases, the minimum is 0
volts, and the max is resistor bridge scaling factor X voltage range of
the ADC (in the Aspeed case, 3.3V).  You could pretty easily just do it
that way and have no real issues.

Alternatively, ADCsensor in dbus-sensors does the above math for you at
runtime to build those values, but I'm not sure if IBM platforms are on
that yet.

> 
>>    They don't have to be exact, and there are plenty of cases where
>> they are set to INT8_MAX and INT8_MIN.  Usually you will know based on
>> the spec you're implementing if the values fall into a
>> uint8/int8/int16/uint16 range, and you can just put in the specified
>> range limits.
> 
> That's probably a better approach that setting both min and max to 0.  I
> was just wondering if anything (especially IPMI) would break if I set
> all the sensor min/max values to INT16_MIN/INT16_MAX.

Nothing should break.  That's perfectly legal, but some users might have
resolution issues, because INT16MAX is going to pick a really high M
value, which is going to reduce your IPMI 8 bit resolution.


More information about the openbmc mailing list