summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/ipmi/ipmisensor.H18
-rw-r--r--src/usr/ipmi/ipmisensor.C12
2 files changed, 18 insertions, 12 deletions
diff --git a/src/include/usr/ipmi/ipmisensor.H b/src/include/usr/ipmi/ipmisensor.H
index 676833309..4da69dc0c 100644
--- a/src/include/usr/ipmi/ipmisensor.H
+++ b/src/include/usr/ipmi/ipmisensor.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2017 */
+/* Contributors Listed Below - COPYRIGHT 2014,2018 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -655,12 +655,14 @@ namespace SENSOR
public:
/**
* @enum autoRebootSetting
- * enum to define the contr
+ * enum to define the control sensor state
+ * Note: bit based setting: 0 -> 0x01
+ * 1 -> 0x02
*/
enum autoRebootSetting
{
- DISABLE_REBOOTS = 0x00, // keep current state
- ENABLE_REBOOTS = 0x01, // allow reboot for FIRDATA analysis
+ DISABLE_REBOOTS = 0x01, // keep current state
+ ENABLE_REBOOTS = 0x02, // allow reboot for FIRDATA analysis
};
/**
@@ -931,12 +933,14 @@ namespace SENSOR
/**
* @enum hbVolatileSetting
- * enum to define the contr
+ * enum to define the HB volatile sensor setting
+ * Note: bit based setting: BMC 0 -> 0x01 (off)
+ * BMC 1 -> 0x02 (on)
*/
enum hbVolatileSetting
{
- DISABLE_VOLATILE = 0x00, // (default)
- ENABLE_VOLATILE = 0x01, // allow volatile memory to be cleared
+ DISABLE_VOLATILE = 0x01, // (default)
+ ENABLE_VOLATILE = 0x02, // allow volatile memory to be cleared
};
/**
diff --git a/src/usr/ipmi/ipmisensor.C b/src/usr/ipmi/ipmisensor.C
index fadb65e05..173f6e546 100644
--- a/src/usr/ipmi/ipmisensor.C
+++ b/src/usr/ipmi/ipmisensor.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2017 */
+/* Contributors Listed Below - COPYRIGHT 2014,2018 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -673,8 +673,9 @@ namespace SENSOR
if( l_err == NULL )
{
- // this value is already byteswapped
- if (l_data.event_status <= ENABLE_REBOOTS)
+ // Check that this value is a valid enum value
+ if ( l_data.event_status == ENABLE_REBOOTS ||
+ l_data.event_status == DISABLE_REBOOTS )
{
o_setting = static_cast<autoRebootSetting>(l_data.event_status);
}
@@ -1697,7 +1698,7 @@ namespace SENSOR
//
// setHbVolatile - tell BMC to make hostboot volatile memory
- // (volatile(1) or not(0))
+ // (volatile(2) or not(1))
//
errlHndl_t HbVolatileSensor::setHbVolatile( hbVolatileSetting i_setting )
{
@@ -1728,7 +1729,8 @@ namespace SENSOR
if( l_err == nullptr )
{
// check if in valid range of hbVolatileSetting enums
- if (l_data.event_status <= ENABLE_VOLATILE)
+ if ( l_data.event_status == ENABLE_VOLATILE ||
+ l_data.event_status == DISABLE_VOLATILE )
{
o_setting = static_cast<hbVolatileSetting>(l_data.event_status);
}
OpenPOWER on IntegriCloud