summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/errl/errlmanager.H70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/include/usr/errl/errlmanager.H b/src/include/usr/errl/errlmanager.H
index be3445007..745330537 100644
--- a/src/include/usr/errl/errlmanager.H
+++ b/src/include/usr/errl/errlmanager.H
@@ -578,6 +578,76 @@ private:
void setErrlSkipFlag(errlHndl_t io_err);
};
+
+
+#ifdef CONFIG_BMC_IPMI
+/**
+ * @brief Sensor Modifier
+ * This purpose of this class is to detect certain types of procedure callouts
+ * and modify the sensor information generated by associated hardware callouts
+ * to provide the user with better information about hardware errors.
+ */
+class SensorModifier
+{
+ /**
+ * @brief Flag for procedure callouts
+ *
+ * Used as a bit string to hold the flags for each procedure callout of
+ * interest that will modify a sensor. For example, in the LSB a one
+ * indicates that a memory plugging error was seen.
+ */
+ uint64_t iv_flag;
+
+ /**
+ * @brief This enum defines the masks that specify the bit within iv_flag
+ * that correspond to a procedure callout flag. No two procedure callouts
+ * should use the same bit. For example, a memory plugging error flag is
+ * stored in the rightmost bit so it's mask is 0x0000000000000001.
+ */
+ enum {
+ memory_plugging_error_mask=0x0000000000000001
+ };
+
+public:
+ /**
+ * @brief Constructor
+ * The constructor initializes flags for procedure callouts.
+ */
+ SensorModifier();
+
+ /**
+ * @brief considerCallout
+ * Consider this callout as a potential sensor modifier if an association
+ * for it exists. This is called for each callout being considered in a
+ * given error log. Each callout must be considered first, before any
+ * sensor modification is attempted (via modifySensor).
+ *
+ * @parm [in] i_ud Callout being considered
+ *
+ * @return none
+ */
+
+ void considerCallout(HWAS::callout_ud_t *i_ud);
+ /**
+ * @brief modifySensor
+ * Modify the senor if needed. Need for modification is based on whether
+ * considerCallout has set a flag for that sensor. So, modifySensor
+ * is called in a second pass for each sensor generated by the previously
+ * considered callouts. See the documentation for considerCallout.
+ *
+ * @param [in] i_sensorType Sensor type to be considered for modification
+ * @param [out] o_eventDirType EventDirType to be modified based on sensor
+ * @param [out] o_specificOffset Offset to be modified based on sensor
+ *
+ * @return Returns a boolean, where a value of true indicates that the
+ * sensor was modified.
+ */
+ bool modifySensor(uint8_t i_sensorType, uint8_t& o_eventDirType,
+ uint8_t& o_specificOffset);
+};
+#endif //CONFIG_BMC_IPMI
+
+
} // End namespace
#endif //ERRLMANAGER_H
OpenPOWER on IntegriCloud