<div dir="ltr">Hi,<div><br></div><div>According to the IPMI spec, we represent all sensor readings (Volt, Temp, Amp, etc.) as 1-byte. </div><div><br></div><div>Since we represent them as 1-byte, we use a linearization formula to convert to actual value as follows:</div><div><br></div><div>y = (M*x + B*10^(k1))*10^(k2)</div><div><br></div><div>where x is the 1-byte value that is filled in the get sensor reading command.</div><div><br></div><div>We see in the ipmitool example on how an example of 3.36 V is represented as 1-byte. </div><div><a href="https://computercheese.blogspot.com/2013/10/ipmi-sensor-reading-conversion-formula.html?q=sensor">https://computercheese.blogspot.com/2013/10/ipmi-sensor-reading-conversion-formula.html?q=sensor</a></div><div><br></div><div>Can any one please help on how the values for M, B, k1 and k2 are populated for each sensor? </div><div><br></div><div>In the openbmc repo, I believe these values are present in the config.yaml of phosphor-ipmi-sensor-inventory (based on the following sample). </div><div><br></div><div><div>0xF1:</div><div>  sensorType: 0x01</div><div>  path: /xyz/openbmc_project/sensors/temperature/temp1</div><div>  sensorReadingType: 0x01</div><div>  <b>multiplierM</b>: 511</div><div>  <b>offsetB</b>: 0</div><div>  <b>bExp</b>: 0</div><div>  mutability: Mutability::Write|Mutability::Read</div><div>  serviceInterface: org.freedesktop.DBus.Properties</div><div>  readingType: readingData</div><div>  interfaces:</div><div>    xyz.openbmc_project.Sensor.Value:</div><div>      Value:</div><div>        Offsets:</div><div>          0x0:</div><div>            type: int64_t</div></div><div><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container" style="box-sizing:border-box;border-collapse:collapse;color:rgb(36,41,46);font-family:-apple-system,system-ui,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><tbody style="box-sizing:border-box"><tr style="box-sizing:border-box"><td id="gmail-LC18" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;color:rgb(36,41,46);word-wrap:normal;white-space:pre"><br></td></tr></tbody></table><br></div><div>Thanks,</div><div>Guhan</div><div><br></div></div>