diff options
author | Mars J Wilks <mjwilks@us.ibm.com> | 2015-09-09 09:06:15 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-09-30 09:26:07 -0500 |
commit | bc98d0b885dcfef970a2135c18ce7d55ab68b366 (patch) | |
tree | f7ad9c8d7326ee9c011edba35d59bcfbcde0b047 /src/include/usr/errl | |
parent | 2257ff8dba986bc5efe691f400fce104829bfe33 (diff) | |
download | talos-hostboot-bc98d0b885dcfef970a2135c18ce7d55ab68b366.tar.gz talos-hostboot-bc98d0b885dcfef970a2135c18ce7d55ab68b366.zip |
DIMM Plugging Errors
This adds logic to change memory sensors to the sensor-specific offset
'Configuration error' whenever a memory plugging error appears in
an error log.
Change-Id: I94a58d55b8c81d106f77b00ee37c4d70a12a9fca
RTC:130381
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/20409
Tested-by: Jenkins Server
Tested-by: Jenkins OP Build CI
Tested-by: Jenkins OP HW
Tested-by: FSP CI Jenkins
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/errl')
-rw-r--r-- | src/include/usr/errl/errlmanager.H | 70 |
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 |