Expiration flags fix for watchdog get/set commands
The expiration flags should be retain their state
across system resets and power cycles.
Tested:
Set “BIOS FRB2” and start
ipmitool raw 0x06 0x24 0x01 0x00 0x00 0x00 0x30 0x00
ipmitool mc watchdog reset
after stopped:
Timer Expiration Flags should be : (0x02)
* BIOS FRB2
Then Set “BIOS/POST” and start,
ipmitool raw 0x06 0x24 0x02 0x00 0x00 0x00 0x30 0x00
ipmitool mc watchdog reset
after stopped:
Timer Expiration Flags should be : (0x06)
* BIOS FRB2
* BIOS/POST
“impitool mc watchdog get” displays the correct Timer Expiration Flags
when the timer is running;
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Change-Id: Ic0c27c6c1e8bed2db8ce30fc0eec2a6538bb1992
diff --git a/app/watchdog.hpp b/app/watchdog.hpp
index a7ff62e..fa53ac7 100644
--- a/app/watchdog.hpp
+++ b/app/watchdog.hpp
@@ -22,8 +22,8 @@
ipmi::RspType<> ipmiSetWatchdogTimer(
uint3_t timerUse, uint3_t reserved, bool dontStopTimer, bool dontLog,
uint3_t timeoutAction, uint1_t reserved1, uint3_t preTimeoutInterrupt,
- uint1_t reserved2, uint8_t preTimeoutInterval, uint1_t reserved3,
- uint5_t expFlagValue, uint2_t reserved4, uint16_t initialCountdown);
+ uint1_t reserved2, uint8_t preTimeoutInterval, std::bitset<8> expFlagValue,
+ uint16_t initialCountdown);
/**@brief The getWatchdogTimer ipmi command.
*
@@ -38,7 +38,7 @@
ipmi::RspType<uint3_t, uint3_t, bool, bool, // timerUse
uint3_t, uint1_t, uint3_t, uint1_t, // timerAction
uint8_t, // pretimeout
- uint8_t, // expireFlags
+ std::bitset<8>, // expireFlags
uint16_t, // initial Countdown - Little Endian (deciseconds)
uint16_t // present Countdown - Little Endian (deciseconds)
>