Make sensor/sdr list commands work on systems with > 255 sensors

The "ipmitool sdr elist" and "ipmitool sensor list" commands failed to
operate correctly on systems that contain more than 255 sensors. A
change made in the past assigned up to 255 sensors to LUN 0, 1, and
3. The code for iterating the SDR's did not get updated at the same
time. The SDR record number acted as the sensor number. This
incompatibility caused error response codes to be returned when sensor
number 255 (which is reserved) was accessed.

The change in this commit modifies the SDR access code to prevent
using the reserved sensor number. SDR records are still assigned in
order. The sensor number associated with the SDR are assigned to avoid
the reserved value, and in the same manner as code previously
submitted and merged.

Tested:
Installed the modified code on a SUT that enumerates more than 256
sensors.
Issued "ipmitool sensor list" and confirmed all sensors were
displayed. The "Get SDR 00ff command failed: Invalid data field in
request" error message was not displayed.
Issued "ipmitool sdr elist" and confirmed all sensors were
displayed. The "Get SDR 00ff command failed: Invalid data field in
request" error message was not displayed.
Confirmed the sensor number/LUN guard code was not activated.

Change-Id: I194a3116fdf255527a8c5036ee71b8b478c9b275
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
1 file changed
tree: df2e28224e16dad4250324fbad893df03cc6994d
  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