Allow more than 256 IPMI sensors in a system

Systems with more than 255 IPMI sensors report strange values for
sensors assigned beyond the 255 limit for a single LUN. This is due to
the sensor number assignment rolling over to 0, and then applying the
most recent SDR values to the sensor calculation.

This change assigns up to 255 sensors to a single LUN (0xFF is
reserved). When the 256th sensor is assigned the sensor gets placed in
the LUN. LUNs 0, 1, and 3 are used, as LUN 2 is special.

Another guard has been created that throws an exception when more than
765 sensors have been assigned. This makes it obvious to the system
designer the limit for IPMI sensors has been reached.

Tested:
Forced the maxmimum number of sensors in the system to be 63 per LUN.

"ipmitool sdr elist" returned correct values for every sensor even
when the sensor number displayed in the printout matched the value of
a sensor printed earlier.

"ipmitool sensor get P3V3" returns a valid reading. In my test "P3V3"
was in LUN1.

"ipmitool raw 4 0x20 0" reported 63 sensors for LUN0, and that LUN0
and LUN1 had sensors.

"ipmitool raw -l 1 4 0x20 0" reported the remaining sensor count.

"ipmitool raw 0xa 0x2d 0" returns the correct value for LUN0 Sensor 0

"ipmitool raw -l 1 0xa 0x2d 0" returns the correct value for LUN1
Sensor 0

Change-Id: Ic1708b66339e57b1b765f5a9a684e829a0ec8fba
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
4 files changed
tree: cd3406d54c91ade78b5d07f8a8fec5dd072d0c9a
  1. docs/
  2. include/
  3. non-yocto/
  4. src/
  5. tests/
  6. .clang-format
  7. .gitignore
  8. cmake-format.json
  9. CMakeLists.txt
  10. CMakeLists.txt.in
  11. generate-whitelist.py
  12. ipmi-whitelist.conf
  13. LICENSE
  14. MAINTAINERS
  15. 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