diff options
Diffstat (limited to 'src/include/usr/errl/errlmanager.H')
-rw-r--r-- | src/include/usr/errl/errlmanager.H | 111 |
1 files changed, 42 insertions, 69 deletions
diff --git a/src/include/usr/errl/errlmanager.H b/src/include/usr/errl/errlmanager.H index 38291e546..07d4b79af 100644 --- a/src/include/usr/errl/errlmanager.H +++ b/src/include/usr/errl/errlmanager.H @@ -39,6 +39,7 @@ #include <util/singleton.H> #include <errl/errlentry.H> #include <errldisplay/errldisplay.H> +#include <errl/errlipmi.H> #include <sys/sync.h> #include <kernel/timemgr.H> #include <hbotcompid.H> @@ -80,6 +81,7 @@ enum errlManagerNeeds PNOR, TARG, MBOX, + IPMI, ERRLDISP, } ; @@ -146,7 +148,7 @@ public: * @brief Sends msg to errlmanager telling what resources are ready * * This is called by resources that the ErrlManager needs, which start up - * AFTER ErrlManager starts. Currently, that's PNOR MBOX and TARGeting. + * AFTER ErrlManager starts. * * It is a static function because a module cannot call an interface on a * singleton in another module @@ -221,6 +223,7 @@ private: ERRLOG_ACCESS_MBOX_TYPE = 0x00000035 | MBOX::FIRST_SECURE_MSG, ERRLOG_ACCESS_TARG_TYPE = 0x00000036 | MBOX::FIRST_SECURE_MSG, ERRLOG_ACCESS_ERRLDISP_TYPE = 0x00000037 | MBOX::FIRST_SECURE_MSG, + ERRLOG_ACCESS_IPMI_TYPE = 0x00000038 | MBOX::FIRST_SECURE_MSG, }; /** @@ -300,7 +303,7 @@ private: * @param[in,out] io_err Error log handle to be committed * */ - void sendErrLogToMbox ( errlHndl_t& io_err ); + void sendErrLogToFSP ( errlHndl_t& io_err ); /** * @brief Create a mailbox message with the error log and send it to Fsp. @@ -435,16 +438,27 @@ private: */ void setACKInFlattened(uint32_t i_position); +#ifdef CONFIG_BMC_IPMI + /** + * @brief Create an ipmi message with the error log and send it to BMC + * + * @param[in,out] io_err Error log handle to be committed + * + */ + void sendErrLogToBmc(errlHndl_t &io_err); +#endif + /** * @brief errorlog-into-PNOR variables */ char *iv_pnorAddr; // HBEL section in PNOR uint32_t iv_maxErrlInPnor; // max number of errorlogs that will fit uint32_t iv_pnorOpenSlot; // current open slot available for an errorlog - bool iv_isSpBaseServices; // do we need to send to FSP - bool iv_isMboxEnabled; // are we able to send to FSP - bool iv_nonInfoCommitted; //< Keeps track of any non-informational logs. - bool iv_isErrlDisplayEnabled; // are we able to use the errorDisplay + bool iv_isSpBaseServices; // do we need to send to FSP + bool iv_isMboxEnabled; // are we able to send to FSP + bool iv_isIpmiEnabled; // are we able to send to BMC via IPMI + bool iv_nonInfoCommitted; // Keeps track of any non-informational logs. + bool iv_isErrlDisplayEnabled; // are we able to use the errorDisplay // Errl flags which represent processing needed by the errl // represented as a bit field (8 bits) @@ -454,89 +468,49 @@ private: PNOR_FLAG = 0x01, MBOX_FLAG = 0x02, ERRLDISP_FLAG = 0x04, + IPMI_FLAG = 0x08, + ALL_FLAGS = PNOR_FLAG | MBOX_FLAG + #ifdef CONFIG_BMC_IPMI + | IPMI_FLAG + #endif #ifdef CONFIG_CONSOLE_OUTPUT_ERRORDISPLAY - ALL_FLAGS = PNOR_FLAG | MBOX_FLAG | ERRLDISP_FLAG, - #else - ALL_FLAGS = PNOR_FLAG | MBOX_FLAG, + | ERRLDISP_FLAG #endif }; // List of messages errl manager needs to handle // The unint8_t is a bit field to indiciate what needs to be done - std::list<std::pair<errlHndl_t, uint8_t> > iv_errlList; - - typedef std::list<std::pair<errlHndl_t, uint8_t> >::iterator ErrlListItr_t; - - /** - * @brief checks if the pnor flag is set - * - * @param[in] i_pair - pair of errl and bitfield of flags - * @return True if PNOR flag is set - * - */ - static bool _isPnorFlagSet(const std::pair<errlHndl_t, uint8_t> &i_pair) - { - return (i_pair.second & PNOR_FLAG); - } - - /** - * @brief checks if the mbox flag is set - * - * @param[in] i_pair - pair of errl and bitfield of flagst - * @return True if mbox flag is set - * - */ - static bool _isMboxFlagSet(const std::pair<errlHndl_t, uint8_t> &i_pair) - { - return (i_pair.second & MBOX_FLAG); - } + typedef std::pair<errlHndl_t, uint8_t> ErrlFlagPair_t; + typedef std::list<ErrlFlagPair_t> ErrlList_t; + typedef ErrlList_t::iterator ErrlListItr_t; + ErrlList_t iv_errlList; /** - * @brief checks if the errldisp flag is set + * @brief checks if the flag is set * * @param[in] i_pair - pair of errl and bitfield of flags - * @return True if errldisp flag is set - * - */ - static bool _isErrlDispFlagSet(const std::pair<errlHndl_t, uint8_t> &i_pair) - { - return (i_pair.second & ERRLDISP_FLAG); - } - - /** - * @brief clears the pnor flag, indicating complete - * - * @param[in/out] io_pair - pair of errl and bitfield of flags - * @return NA - * - */ - static void _clearPnorFlag(std::pair<errlHndl_t, uint8_t> &io_pair) - { - io_pair.second &= ~PNOR_FLAG; - } - - /** - * @brief clears the mbox flag, indicating complete - * - * @param[in/out] io_pair - pair of errl and bitfield of flags - * @return NA + * @param[in] i_flag - specific flag + * @return True if specified flag is set * */ - static void _clearMboxFlag(std::pair<errlHndl_t, uint8_t> &io_pair) + static bool _isFlagSet(const ErrlFlagPair_t &i_pair, + const ERRLOG_FLAGS i_flag) { - io_pair.second &= ~MBOX_FLAG; + return (i_pair.second & i_flag); } /** - * @brief clears the errldisp flag, indicating complete + * @brief clears the flag, indicating complete * * @param[in/out] io_pair - pair of errl and bitfield of flags + * @param[in] i_flag - specific flag * @return NA * */ - static void _clearErrlDispFlag(std::pair<errlHndl_t, uint8_t> &io_pair) + static void _clearFlag(ErrlFlagPair_t &io_pair, + const ERRLOG_FLAGS i_flag) { - io_pair.second &= ~ERRLDISP_FLAG; + io_pair.second &= ~i_flag; } /** @@ -549,8 +523,7 @@ private: * @return True if an erase occurred, otherwise false * */ - bool _updateErrlListIter(std::list< std::pair<errlHndl_t, uint8_t> > - ::iterator & io_it); + bool _updateErrlListIter(ErrlListItr_t & io_it); }; |