Conditionally clear watchdog pre-timeout interrupt

"Clear Message Flags" IPMI command is used to clear the Event Message
buffer, Receive Message queue and Watchdog pre-timeout interrupt flag
if that specific BIT is set.

Existing code is setting the "Watchdog Pre-timeout interrupt" flag to
True when user (host/end user) tries to clear other bits like Message
Buffer or Receive Message Queue which is not correct. So correct the
condition to clear "watchdog Pre-timeout interrupt" flag only if BIT 3
is set.

Tested:
Verified using cmdtool utility and clear linux OS.

On Cmdtool-
Case 1: When "PreTimeoutInterruptOccurFlag" flag is enable and clear
other flags
Command: > cmdtool.efi 20 18 31 //Get Message Flags
Response: 00 08
Command: > cmdtool.efi 20 18 30 2 //Clear Message Flags
Response: 00
Command: > cmdtool.efi 20 18 31 //Get Message Flags
Response: 00 08    //watchdog "PreTimeoutInterruptOccurFlag" is not
                    //cleared

Case 2: When "PreTimeoutInterruptOccurFlag" flag is enable and clear
PreTimeoutInterruptOccurFlag
Command: > cmdtool.efi 20 18 30 8 //Clear Message Flags
Response: 00
Command: > cmdtool.efi 20 18 31 //Get Message Flags
Response: 00 02   //watchdog "PreTimeoutInterruptOccurFlag" is not
                  //cleared

On Linux OS-
Case 1: When "PreTimeoutInterruptOccurFlag" flag is enable and clear
other flags
Command: ipmitool raw 0x06 0x31 //get message flags
Response: 08
Command: ipmitool raw 0x06 0x30 0x02 // clear message flags
Response:              //Success
Command: ipmitool raw 0x06 0x31 //get message flags
Response: 08

Case 2: When "PreTimeoutInterruptOccurFlag" flag is enable and clear
PreTimeoutInterruptOccurFlag
Command: ipmitool raw 0x06 0x30 0x08 // clear message flags
Response:              //Success
Command: ipmitool raw 0x06 0x31 //get message flags
Response: 02

Signed-off-by: JitendraKumar Tripathy
<jitendra.kumarx.tripathy@intel.com>
Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: I85a742c6d5799fe31b4c0a64b3d4f62256772be6
1 file changed
tree: 552d3e34f4f154c7268a80753703a97590a8d7b0
  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. OWNERS
  17. 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