All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tony Lee (李文富)" <Tony.Lee@quantatw.com>
To: "openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>
Cc: "Buddy Huang (黃天鴻)" <Buddy.Huang@quantatw.com>
Subject: Showing signed sensor value when the command "ipmitool sdr" is executed.
Date: Wed, 23 Oct 2019 01:45:05 +0000	[thread overview]
Message-ID: <19467ab292c64593ae4ae7f2882ce61a@quantatw.com> (raw)

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


             reply	other threads:[~2019-10-23  1:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-23  1:45 Tony Lee (李文富) [this message]
2019-11-01  9:23 Showing signed sensor value when the command "ipmitool sdr" is executed Tony Lee (李文富)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19467ab292c64593ae4ae7f2882ce61a@quantatw.com \
    --to=tony.lee@quantatw.com \
    --cc=Buddy.Huang@quantatw.com \
    --cc=openbmc@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.