Showing signed sensor value when the command "ipmitool sdr" is executed.

Tony Lee (李文富) Tony.Lee at quantatw.com
Wed Oct 23 12:45:05 AEDT 2019


Hi team,

The temperature sensor value may be negative when the command "ipmitool sdr" is executed.
Sensor value can be a signed value according to ipmi SPEC "Table 43-, Full Sensor Record - SDR Type 01h" byte 21, "Sensor Units 1".

However, we can find that the sensor_units_1 is set to zero in
https://github.com/openbmc/phosphor-host-ipmid/blob/master/sensorhandler.cpp#L688.

And the method "set_analog_data_format", althought it has been declared but it has never been used in 
https://github.com/openbmc/phosphor-host-ipmid/blob/master/sensorhandler.hpp#L497.

In addition, since rawData has been converted to uint8_t by static_cast <uint8_t>, there is always a none negative value. in
https://github.com/openbmc/phosphor-host-ipmid/blob/master/sensordatahandler.hpp#L229

Based on the above three points, it seems that the function needs to be modified
 so that the sensor value can be displayed as a negative value when the "ipmitool sdr" command is executed.

Am I wrong, or I need to set it up somewhere?

Thanks
Best Regards,
Tony



More information about the openbmc mailing list