diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/usr/errl/errlentry.H | 36 | ||||
-rw-r--r-- | src/include/usr/errl/errlmanager.H | 7 | ||||
-rw-r--r-- | src/usr/errl/errlentry.C | 3 | ||||
-rw-r--r-- | src/usr/errl/errlmanager.C | 77 | ||||
-rw-r--r-- | src/usr/errl/errlmanager_common.C | 9 | ||||
-rw-r--r-- | src/usr/errldisplay/errldisplay.C | 106 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/attribute_types.xml | 7 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/attribute_types_hb.xml | 40 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/target_types.xml | 1 |
9 files changed, 220 insertions, 66 deletions
diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H index 38624ab6b..6baaccf3b 100644 --- a/src/include/usr/errl/errlentry.H +++ b/src/include/usr/errl/errlentry.H @@ -401,6 +401,7 @@ public: */ uint64_t getUserData2() const; + /** * @brief Allows the caller to add a chunk of FFDC data in a log * @@ -722,6 +723,22 @@ private: void addPartAndSerialNumbersToErrLog(const TARGETING::Target * i_target); /** + * @brief set iv_skipShowingLogs + * + * @return nothing + */ + void setSkipShowingLog(bool i_showLog); + + /** + * @brief get iv_skipShowingLogs + * + * @return true if the log should be skipped, false otherwise + */ + bool getSkipShowingLog(); + + + + /** * @brief Disabled copy constructor and assignment operator */ ErrlEntry(const ErrlEntry& i_right); @@ -743,6 +760,10 @@ private: // when true, the severity has been set "final" and can not be changed. bool iv_sevFinal; + //when true, the current error log will not be saved to PNOR, sent to the + //BMC, or displayed in the console + bool iv_skipShowingLog; + }; @@ -874,6 +895,21 @@ inline void ErrlEntry::setSrcType(const srcType_t i_srcType) return; } +//////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////// +inline void ErrlEntry::setSkipShowingLog(bool i_showLog) +{ + iv_skipShowingLog = i_showLog; + return; +} + +//////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////// +inline bool ErrlEntry::getSkipShowingLog() +{ + return iv_skipShowingLog; +} + } // End namespace diff --git a/src/include/usr/errl/errlmanager.H b/src/include/usr/errl/errlmanager.H index a5fcc136b..21e9a12cc 100644 --- a/src/include/usr/errl/errlmanager.H +++ b/src/include/usr/errl/errlmanager.H @@ -188,6 +188,13 @@ public: */ static bool errlCommittedThisBoot(); + + /** + * @brief Value to determine what logs are to be skipped. Mirrors + * what is currently set in ATTR_HIDDEN_ERRLOGS_ENABLE + */ + static uint8_t iv_hiddenErrLogsEnable; + protected: /** * @brief Destructor diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C index 07dd5b78a..a1f4c1193 100644 --- a/src/usr/errl/errlentry.C +++ b/src/usr/errl/errlentry.C @@ -181,7 +181,8 @@ ErrlEntry::ErrlEntry(const errlSeverity_t i_sev, // iv_Src assigns the epubSubSystem_t; example, 80 in SRC B180xxxx iv_Src( SRC_ERR_INFO, i_modId, i_reasonCode, i_user1, i_user2 ), iv_termState(TERM_STATE_UNKNOWN), - iv_sevFinal(false) + iv_sevFinal(false), + iv_skipShowingLog(true) { #ifdef CONFIG_ERRL_ENTRY_TRACE TRACDCOMP( g_trac_errl, ERR_MRK"Error created : PLID=%.8X, RC=%.4X, Mod=%.2X, Userdata=%.16X %.16X", plid(), i_reasonCode, i_modId, i_user1, i_user2 ); diff --git a/src/usr/errl/errlmanager.C b/src/usr/errl/errlmanager.C index f1aa208be..ede3c398f 100644 --- a/src/usr/errl/errlmanager.C +++ b/src/usr/errl/errlmanager.C @@ -61,6 +61,10 @@ extern trace_desc_t* g_trac_errl; // Store error logs in this memory buffer in L3 RAM. char* g_ErrlStorage = new char[ ERRL_STORAGE_SIZE ]; +// Allow Hidden error logs to be shown by default +uint8_t ErrlManager::iv_hiddenErrLogsEnable = + TARGETING::HIDDEN_ERRLOGS_ENABLE_ALLOW_ALL_LOGS; + /** * @brief * In storage, the flattened error logs are interspersed with "markers." @@ -264,6 +268,11 @@ void ErrlManager::errlogMsgHndlr () // do we NOT need to send the error? TARGETING::Target * sys = NULL; TARGETING::targetService().getTopLevelTarget( sys ); + + // set whether we want to skip certain error logs or not. + iv_hiddenErrLogsEnable = + sys->getAttr<TARGETING::ATTR_HIDDEN_ERRLOGS_ENABLE>(); + TARGETING::SpFunctions spfn; if (!(sys && @@ -426,6 +435,55 @@ void ErrlManager::errlogMsgHndlr () // error log handle to pass along errlHndl_t l_err = (errlHndl_t) theMsg->extra_data; + // Decide if we need to skip the error log + // Note: iv_skipShowingLog is set to True by default + //0 = Prevent INFORMATIONAL/RECOVERED error logs from being processed. + //1 = Send only INFORMATIONAL error logs. + //2 = Send only RECOVERED error logs. + //3 = Allow all hidden error logs to be processed. + + //Check severity + switch (l_err->sev()) + { + case ERRORLOG::ERRL_SEV_INFORMATIONAL: + + // check if we are allowing info logs through. + if((iv_hiddenErrLogsEnable == + TARGETING:: + HIDDEN_ERRLOGS_ENABLE_ALLOW_INFORMATIONAL)|| + (iv_hiddenErrLogsEnable == + TARGETING:: + HIDDEN_ERRLOGS_ENABLE_ALLOW_ALL_LOGS)) + { + l_err->setSkipShowingLog(false); + } + break; + + case ERRORLOG::ERRL_SEV_RECOVERED: + + // check if we are allowing recovered logs through. + if(((iv_hiddenErrLogsEnable == + TARGETING:: + HIDDEN_ERRLOGS_ENABLE_ALLOW_RECOVERED) || + (iv_hiddenErrLogsEnable == + TARGETING:: + HIDDEN_ERRLOGS_ENABLE_ALLOW_ALL_LOGS)) && + !iv_isSpBaseServices) + { + //Recovered error logs that are encountered + //before targeting and initservice are loaded, + //will still be queued for sending to PNOR/IPMI + l_err->setSkipShowingLog(false); + } + break; + + default: + + // For any error log that is not INFORMATIONAL + // or RECOVERED, we want to show the log + l_err->setSkipShowingLog(false); + } + // Ask the ErrlEntry to assign commit component, commit time l_err->commit( (compId_t) theMsg->data[0] ); @@ -1131,15 +1189,15 @@ bool ErrlManager::saveErrLogToPnor( errlHndl_t& io_err) bool rc = false; TRACFCOMP( g_trac_errl, ENTER_MRK"saveErrLogToPnor eid=%.8x", io_err->eid()); - // actually, if it's an INFORMATIONAL log, we don't want to waste the write - // cycles, so we'll just 'say' that we saved it and go on. - if (io_err->sev() == ERRORLOG::ERRL_SEV_INFORMATIONAL) - { - TRACDCOMP( g_trac_errl, INFO_MRK"saveErrLogToPnor: INFORMATIONAL log, skipping"); - rc = true; - } - else + do { + // Decide whether or not to skip error log + if( io_err->getSkipShowingLog() ) + { + TRACFCOMP( g_trac_errl, INFO_MRK"saveErrLogToPnor: INFORMATIONAL/RECOVERED log, skipping"); + break; + } + // save our current slot, and see if there's an open slot uint32_t l_previousSlot = iv_pnorOpenSlot; // in case flatten fails @@ -1183,7 +1241,8 @@ bool ErrlManager::saveErrLogToPnor( errlHndl_t& io_err) rc = true; } // else no open slot - return false - } + } while( 0 ); + TRACFCOMP( g_trac_errl, EXIT_MRK"saveErrLogToPnor returning %s", rc ? "true" : "false"); return rc; diff --git a/src/usr/errl/errlmanager_common.C b/src/usr/errl/errlmanager_common.C index fb4175092..52e3f82ec 100644 --- a/src/usr/errl/errlmanager_common.C +++ b/src/usr/errl/errlmanager_common.C @@ -42,15 +42,14 @@ void ErrlManager::sendErrLogToBmc(errlHndl_t &io_err) do { - // if it's an INFORMATIONAL log, we don't want to waste the cycles - if (io_err->sev() == ERRORLOG::ERRL_SEV_INFORMATIONAL) + // Decide whether we want to skip the error log + if( io_err->getSkipShowingLog() ) { - TRACFCOMP( g_trac_errl, INFO_MRK - "sendErrLogToBmc: %.8X is INFORMATIONAL; skipping", + TRACDCOMP( g_trac_errl, INFO_MRK + "sendErrLogToBmc: %.8X is INFORMATIONAL/RECOVERED; skipping", io_err->eid()); break; } - // look thru the errlog for any Callout UserDetail sections // to determine the sensor information for the SEL uint8_t l_sensorNumber = TARGETING::UTIL::INVALID_IPMI_SENSOR; diff --git a/src/usr/errldisplay/errldisplay.C b/src/usr/errldisplay/errldisplay.C index 4e2c73cae..8fa38224d 100644 --- a/src/usr/errldisplay/errldisplay.C +++ b/src/usr/errldisplay/errldisplay.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,2015 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ @@ -51,13 +51,13 @@ // I n c l u d e s /*****************************************************************************/ #include <trace/interface.H> +#include <errldisplay/errldisplay.H> #include <errl/errlmanager.H> #include <errl/errlentry.H> #include <errl/errlud.H> #include <errl/errludtarget.H> #include <errl/errlsctn.H> #include <errl/errlreasoncodes.H> -#include <errldisplay/errldisplay.H> #include <stdlib.h> #include <string.h> #include <initservice/taskargs.H> @@ -301,58 +301,68 @@ void ErrLogDisplay::msgDisplay (const errlHndl_t &i_err, { TRACDCOMP( g_trac_errldisp, ENTER_MRK "ErrLogDisplay::msgDisplay" ); - const errLogInfo *info = findErrLogInfo ( i_err->moduleId(), - i_err->reasonCode()); - CONSOLE::displayf(NULL, - "================================================"); - CONSOLE::displayf(NULL, "Error reported by %s (0x%04X)", - findComponentName( i_committerComp ), - i_committerComp ); - CONSOLE::displayf(NULL, " %s", info->descriptString); - CONSOLE::displayf(NULL, " ModuleId 0x%02x %s", - i_err->moduleId(), info->moduleName); - CONSOLE::displayf(NULL, " ReasonCode 0x%04x %s", - i_err->reasonCode(), info->reasonString); - CONSOLE::displayf(NULL, " UserData1 %s : 0x%016lx", - info->userData1String, i_err->getUserData1()); - CONSOLE::displayf(NULL, " UserData2 %s : 0x%016lx", - info->userData2String, i_err->getUserData2()); - - // Loop through and print all of the user data sections. - for ( size_t i = 0; i < i_err->iv_SectionVector.size(); ++i ) + do { - ERRORLOG::ErrlUD *user_data = i_err->iv_SectionVector[i]; - CONSOLE::displayf(NULL, "User Data Section %d, type %c%c", (int) i, - (user_data->iv_header.iv_sid >> 8) & 0xff, - user_data->iv_header.iv_sid & 0xff ); - CONSOLE::displayf(NULL, " Subsection type 0x%02x", - user_data->iv_header.iv_sst ); - CONSOLE::displayf(NULL, " ComponentId %s (0x%04x)", - findComponentName( user_data->iv_header.iv_compId ), - user_data->iv_header.iv_compId ); - switch ( user_data->iv_header.iv_sst ) + // Decide whether or not to skip the error log + if( i_err->getSkipShowingLog() ) { - case ERRORLOG::ERRL_UDT_TARGET: - CONSOLE::displayf(NULL, " TARGET" ); - displayTarget( user_data->iv_pData, user_data->iv_Size ); - break; - case ERRORLOG::ERRL_UDT_CALLOUT: - CONSOLE::displayf(NULL, " CALLOUT" ); - displayCallout( user_data->iv_pData, user_data->iv_Size ); - break; - case ERRORLOG::ERRL_UDT_STRING: - CONSOLE::displayf(NULL, " STRING" ); - CONSOLE::displayf(NULL, - " %s", - reinterpret_cast<char*>( user_data->iv_pData ) ); - break; + TRACDCOMP( g_trac_errldisp, INFO_MRK"msgDisplay: %.8X is INFORMATIONAL/RECOVERED; skipping...", i_err->eid()); + break; + } + const errLogInfo *info = findErrLogInfo ( i_err->moduleId(), + i_err->reasonCode()); + + CONSOLE::displayf(NULL, + "================================================"); + CONSOLE::displayf(NULL, "Error reported by %s (0x%04X)", + findComponentName( i_committerComp ), + i_committerComp ); + CONSOLE::displayf(NULL, " %s", info->descriptString); + CONSOLE::displayf(NULL, " ModuleId 0x%02x %s", + i_err->moduleId(), info->moduleName); + CONSOLE::displayf(NULL, " ReasonCode 0x%04x %s", + i_err->reasonCode(), info->reasonString); + CONSOLE::displayf(NULL, " UserData1 %s : 0x%016lx", + info->userData1String, i_err->getUserData1()); + CONSOLE::displayf(NULL, " UserData2 %s : 0x%016lx", + info->userData2String, i_err->getUserData2()); + + // Loop through and print all of the user data sections. + for ( size_t i = 0; i < i_err->iv_SectionVector.size(); ++i ) + { + ERRORLOG::ErrlUD *user_data = i_err->iv_SectionVector[i]; + CONSOLE::displayf(NULL, "User Data Section %d, type %c%c", (int) i, + (user_data->iv_header.iv_sid >> 8) & 0xff, + user_data->iv_header.iv_sid & 0xff ); + CONSOLE::displayf(NULL, " Subsection type 0x%02x", + user_data->iv_header.iv_sst ); + CONSOLE::displayf(NULL, " ComponentId %s (0x%04x)", + findComponentName( user_data->iv_header.iv_compId ), + user_data->iv_header.iv_compId ); + switch ( user_data->iv_header.iv_sst ) + { + case ERRORLOG::ERRL_UDT_TARGET: + CONSOLE::displayf(NULL, " TARGET" ); + displayTarget( user_data->iv_pData, user_data->iv_Size ); + break; + case ERRORLOG::ERRL_UDT_CALLOUT: + CONSOLE::displayf(NULL, " CALLOUT" ); + displayCallout( user_data->iv_pData, user_data->iv_Size ); + break; + case ERRORLOG::ERRL_UDT_STRING: + CONSOLE::displayf(NULL, " STRING" ); + CONSOLE::displayf(NULL, + " %s", + reinterpret_cast<char*>( user_data->iv_pData ) ); + break; + } } - } - CONSOLE::displayf(NULL, + CONSOLE::displayf(NULL, "================================================" ); - CONSOLE::flush(); + CONSOLE::flush(); + }while( 0 ); TRACDCOMP( g_trac_errldisp, EXIT_MRK "ErrLogDisplay::msgDisplay" ); } diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml index d1cce5b86..9eae63e10 100644 --- a/src/usr/targeting/common/xmltohb/attribute_types.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types.xml @@ -12071,7 +12071,7 @@ firmware notes: Platforms should initialize this attribute to AUTO (0)</descript <description> MFG_Guard policy: Used in MFG only to prevent and disable the following: - . Storing or creation of new Guard records from Diagnostic or other + . Storing or creation of new Guard records from Diagno`stic or other faults through error logs. This is all domains, CEC processor/memory, VPD, FSP, etc. . Storing or creation of Manual Guard record from user. @@ -15463,10 +15463,11 @@ firmware notes: Platforms should initialize this attribute to AUTO (0)</descript <default>0</default> </uint8_t> </simpleType> - <persistency>non-volatile</persistency> - <readable/> + <persistency>non-volatile</persistency> + <readable/> </attribute> + <attribute> <id>BRAZOS_RX_FIFO_OVERRIDE</id> <description> diff --git a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml index ff0109eea..87839cb9a 100644 --- a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml @@ -31,6 +31,46 @@ Contains the definition of hostboot attributes which should not be synced to/from FSP ================================================================= --> +<attribute> + <id>HIDDEN_ERRLOGS_ENABLE</id> + <description> + Used to decide whether or not to prevent INFORMATIONAL/RECOVERED error + logs from being sent to the BMC via SEL/eSEL, saved to the PNOR, and + displayed to the console. + 0 = Prevent INFORMATIONAL/RECOVERED error logs from being processed. + 1 = Send only INFORMATIONAL error logs. + 2 = Send only RECOVERED error logs. + 3 = Allow all hidden error logs to be processed. + </description> + <simpleType> + <uint8_t> + <default>0</default> + </uint8_t> + </simpleType> + <persistency>volatile</persistency> + <readable/> +</attribute> + +<enumerationType> + <id>HIDDEN_ERRLOGS_ENABLE</id> + <description>Enumeration of HIDDEN_ERRLOGS_ENABLE</description> + <enumerator> + <name>NO_HIDDEN_LOGS</name> + <value>0</value> + </enumerator> + <enumerator> + <name>ALLOW_INFORMATIONAL</name> + <value>1</value> + </enumerator> + <enumerator> + <name>ALLOW_RECOVERED</name> + <value>2</value> + </enumerator> + <enumerator> + <name>ALLOW_ALL_LOGS</name> + <value>3</value> + </enumerator> +</enumerationType> <attribute> <id>IS_MPIPL_HB</id> diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml index 6506a7a2a..c3034ef36 100644 --- a/src/usr/targeting/common/xmltohb/target_types.xml +++ b/src/usr/targeting/common/xmltohb/target_types.xml @@ -305,6 +305,7 @@ <attribute><id>FRU_ID</id></attribute> <attribute><id>BMC_FRU_ID</id></attribute> <attribute><id>BRAZOS_RX_FIFO_OVERRIDE</id></attribute> + <attribute><id>HIDDEN_ERRLOGS_ENABLE</id></attribute> </targetType> <targetType> |