Fix sensor missing issue.

There is issue for "BMC randomly unable to get sensor readings".
When invoking "ipmitool sdr" from Linux OS (host), it only
returns three sensors like following partial records:
[root@localhost ~]# ipmitool sdr
CPU Power        | 0 Watts           | ok
Memory Power     | 0 Watts           | ok
Total Power      | 0 Watts           | ok
[root@localhost ~]#

There 2 caches sensorTree and sensorDataRecords.
When sensorDataRecords cache and sensorTree cache is not sync,
which causes this issue, like sensorTree cache has 10 sensors
but there are just 5 sensors in sensorDataRecords cache.
Most important sensorDataRecords cache is not necessary,
ipmiStorageGetSDR could get data from dbus directly and
no any performance impact.

Using sensorMapUpdatePeriod(10s) but not sensorMapSdrUpdatePeriod(60s),
60 seconds are too long to answer user with some SDR content
at the first time of BMC bootup.

Tested:
All sensors could be listed even at booting phase.
Could print correct sensor set along with the boot progress.

root@intel-obmc:~# ipmitool sdr
CPU Power        | 202 Watts         | ok
Memory Power     | 0 Watts           | ok
Total Power      | 312 Watts         | ok
root@intel-obmc:~# ipmitool sdr
System Airflow   | 14 unspecified    | ok
PSU1 In Current  | 1.18 Amps         | ok
PSU1 Out Current | 20.80 Amps        | ok
PSU2 In Current  | 0 Amps            | ok
PSU2 Out Current | no reading        | ns
Pwm 1            | 29.79 unspecifi   | ok
Pwm 2            | 29.79 unspecifi   | ok
Pwm 3            | 29.79 unspecifi   | ok
Pwm 4            | 29.79 unspecifi   | ok
Pwm 5            | 29.79 unspecifi   | ok
Pwm 6            | 29.79 unspecifi   | ok
Pwm 13           | 29.79 unspecifi   | ok
Pwm 14           | 29.79 unspecifi   | ok
Pwm 15           | 29.79 unspecifi   | ok
Pwm 16           | 29.79 unspecifi   | ok
Pwm PSU1 Fan 1   | 39.98 unspecifi   | ok
Pwm PSU1 Fan 2   | 39.98 unspecifi   | ok
.............
PVCCD HV CPU1    | 1.18 Volts        | ok
PVCCFA EHV FIVRA | 1.16 Volts        | ok
PVCCINFAON CPU1  | 1.11 Volts        | ok
PVCCIN CPU1      | 1.68 Volts        | ok
PVNN PCH AUX     | 1.03 Volts        | ok
root@intel-obmc:~#

Change-Id: I729d9bcbf91f0e96c62fb5f5ebe0240a0eaa47df
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
Signed-off-by: Helen Huang <he.huang@linux.intel.com>
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
3 files changed
tree: bf0eb57bb4427a06cd671ffeecd34fefdbb07e6a
  1. cmake/
  2. docs/
  3. include/
  4. non-yocto/
  5. src/
  6. tests/
  7. .clang-format
  8. .gitignore
  9. cmake-format.json
  10. CMakeLists.txt
  11. CMakeLists.txt.in
  12. generate-whitelist.py
  13. ipmi-whitelist.conf
  14. LICENSE
  15. MAINTAINERS
  16. README.md
README.md

Intel IPMI OEM support library

This component is intended to provide Intel-specific IPMI[3] command handlers for OpenBMC. These handlers are intended to integrate BMC with servers based on Intel architecture.

Overview

intel-ipmi-oem serves as an extension[1] to OpenBMC IPMI daemon[2]. It is compiled as a shared library and intended to both:

  • override existing implementation of standard IPMI commands to comply with Intel-specific solutions,
  • provide implementation for non-standard OEM extensions.

Capabilities

Related features provided by the library are grouped in separate source files. Main extensions to vanilla OpenBMC IPMI stack are the following:

  • Acquiring SMBIOS data over IPMI
  • Commands for better integration with Intel hardware
  • Firmware update extensions
  • Extended parsing of IPMI Platform Events[4]

References

  1. OpenBMC IPMI Architecture
  2. Phosphor IPMI Host
  3. IPMI Specification v2.0
  4. Intel Platform Events parsing