oemcommands: Validate reserved field content

In "Set Processor Error Configuration" command,  byte-1’s [7-2],
byte-2, byte-3's [7-1],  bits are reserved and in "Disable BMC System
Reset Action" command,  byte-1’s [7-1] bits are reserved. So return
"InvalidFieldRequest" when reserved content is non-zero.

Tested:
IPMI Command: Set Processor Error Configuration
Case 1: Byte 1 - reserved1 bits zero
Command:  ipmitool raw 0x30 0x9b 0x03 0x0 0x01
Response:                 //Success
Case 2: Byte 1 - reserved1 bits non-zero
Command:  ipmitool raw 0x30 0x9b 0xf3 0x0 0x01
Response: Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0
          cmd=0x9b rsp=0xcc): Invalid data field in request
Case 3: Byte 2 - reserved2 bits zero
Command:  ipmitool raw 0x30 0x9b 0x03 0x0 0x01
Response:                //Success
Case 4: Byte 2 - reserved2 bits non-zero
Command:  ipmitool raw 0x30 0x9b 0x03 0x1 0x01
Response: Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0
          cmd=0x9b rsp=0xcc): Invalid data field in request
Case 5: If byte - 3 is not present
Command: ipmitool raw 0x30 0x9b 0x03 0x0
Response:              //Success
Case 6: byte-3 with reserved portion(reserved3) zero
Command:  ipmitool raw 0x30 0x9b 0x03 0x0 0x01
Response:             //Success
Case 7: byte-3 with reserved portion (reserved3) non-zero.
Command: ipmitool raw 0x30 0x9b 0x03 0x0 0xf1
Response: Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0
          cmd=0x9b rsp=0xcc): Invalid data field in request

IPMI Command: Disable BMC System Reset Action
Case 1: Byte-1 reserved portion (reserved1) non-zero.
Command : ipmitool raw 0x30 0x42 0x03
Response: Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0
          cmd=0x42 rsp=0xcc): Invalid data field in request
Case 2: Byte-1 reserved portion (reserved1) is zero.
Command : ipmitool raw 0x30 0x42 0x01
Response:             //Success

Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: I84a6e3be21d6101824867ff9f92b83be2e6aa406
1 file changed
tree: f55b7f7f3cedd98e1d46a122d995e0ab095a3ccd
  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