summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/include/usr/ipmi/ipmisensor.H1
-rw-r--r--src/usr/ipmi/ipmisensor.C96
2 files changed, 52 insertions, 45 deletions
diff --git a/src/include/usr/ipmi/ipmisensor.H b/src/include/usr/ipmi/ipmisensor.H
index ef00bfa9e..86b9051ba 100644
--- a/src/include/usr/ipmi/ipmisensor.H
+++ b/src/include/usr/ipmi/ipmisensor.H
@@ -81,6 +81,7 @@ namespace SENSOR
PROCESSOR_THROTTLED = 0x0A,
MACHINE_CHECK_EXCEPTION = 0x0B,
CORRECTABLE_MACHINE_CHECK = 0x0C,
+ INVALID_OFFSET = 0xFF,
};
diff --git a/src/usr/ipmi/ipmisensor.C b/src/usr/ipmi/ipmisensor.C
index 00bb211cb..4b5b47858 100644
--- a/src/usr/ipmi/ipmisensor.C
+++ b/src/usr/ipmi/ipmisensor.C
@@ -39,6 +39,7 @@ extern trace_desc_t * g_trac_ipmi;
namespace SENSOR
{
+
//
// Base class for sensor construction. It is expected that this object will
// be used as the base for any additional sensors defined.
@@ -640,8 +641,10 @@ namespace SENSOR
break;
default:
- assert(0, "No status sensor associated with target type 0x%x",
+ TRACFCOMP(g_trac_ipmi,"INF>>No status sensor associated with target type 0x%x",
i_target->getAttr<TARGETING::ATTR_TYPE>());
+ iv_functionalOffset = INVALID_OFFSET;
+ iv_presentOffset = INVALID_OFFSET;
break;
}
@@ -662,56 +665,59 @@ namespace SENSOR
errlHndl_t l_err = NULL;
- uint16_t func_mask = setMask( iv_functionalOffset );
- uint16_t pres_mask = setMask( iv_presentOffset );
-
- switch ( i_state )
+ if( iv_functionalOffset != INVALID_OFFSET
+ && iv_presentOffset != INVALID_OFFSET )
{
- case NOT_PRESENT:
- // turn off the present bit
- iv_msg->iv_deassertion_mask = pres_mask;
- // turn on the disabled bit
- iv_msg->iv_assertion_mask = func_mask;
- break;
+ uint16_t func_mask = setMask( iv_functionalOffset );
+ uint16_t pres_mask = setMask( iv_presentOffset );
- case PRESENT:
- // turn on the present bit
- iv_msg->iv_assertion_mask = pres_mask;
- break;
+ switch ( i_state )
+ {
+ case NOT_PRESENT:
+ // turn off the present bit
+ iv_msg->iv_deassertion_mask = pres_mask;
+ // turn on the disabled bit
+ iv_msg->iv_assertion_mask = func_mask;
+ break;
- case FUNCTIONAL:
- // turn off the disabled bit
- iv_msg->iv_deassertion_mask = func_mask;
- break;
+ case PRESENT:
+ // turn on the present bit
+ iv_msg->iv_assertion_mask = pres_mask;
+ break;
- case PRESENT_FUNCTIONAL:
- // assert the present bit
- iv_msg->iv_assertion_mask = pres_mask;
- // turn off the disabled bit
- iv_msg->iv_deassertion_mask = func_mask;
- break;
+ case FUNCTIONAL:
+ // turn off the disabled bit
+ iv_msg->iv_deassertion_mask = func_mask;
+ break;
- case PRESENT_NONFUNCTIONAL:
- // assert the present bit
- iv_msg->iv_assertion_mask = pres_mask;
- // assert the disabled bit
- iv_msg->iv_assertion_mask |= func_mask;
- break;
+ case PRESENT_FUNCTIONAL:
+ // assert the present bit
+ iv_msg->iv_assertion_mask = pres_mask;
+ // turn off the disabled bit
+ iv_msg->iv_deassertion_mask = func_mask;
+ break;
- case NON_FUNCTIONAL:
- // assert the disabled bit
- iv_msg->iv_assertion_mask = func_mask;
- break;
+ case PRESENT_NONFUNCTIONAL:
+ // assert the present bit
+ iv_msg->iv_assertion_mask = pres_mask;
+ // assert the disabled bit
+ iv_msg->iv_assertion_mask |= func_mask;
+ break;
- default:
- // mark as not present
- iv_msg->iv_deassertion_mask = pres_mask;
- iv_msg->iv_assertion_mask = func_mask;
- break;
- }
+ case NON_FUNCTIONAL:
+ // assert the disabled bit
+ iv_msg->iv_assertion_mask = func_mask;
+ break;
- l_err = writeSensorData();
+ default:
+ // mark as not present
+ iv_msg->iv_deassertion_mask = pres_mask;
+ iv_msg->iv_assertion_mask = func_mask;
+ break;
+ }
+ l_err = writeSensorData();
+ }
return l_err;
};
@@ -876,9 +882,9 @@ namespace SENSOR
//
// Used to update the sensor status for a specific set of target types
- // currently supported types are TYPE_DIMM, TYPE_CORE, TYPE_PROC. These
- // are virtual sensors where Hostboot updates the present and functional
- // states and the BMC maintains the sensor.
+ // currently supported types are TYPE_DIMM, TYPE_MEMBUF, TYPE_CORE,
+ // TYPE_PROC. These are virtual sensors where Hostboot updates the
+ // present and functional states and the BMC maintains the sensor.
//
void updateBMCSensorStatus(TARGETING::TYPE i_type)
{
OpenPOWER on IntegriCloud