summaryrefslogtreecommitdiffstats
path: root/src/usr/errl
diff options
context:
space:
mode:
authorAndres Lugo-Reyes <aalugore@us.ibm.com>2015-05-20 14:12:35 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-07-02 13:38:01 -0500
commitad46bacd1b73e03203bbee12ce94867f0b291f57 (patch)
tree60f578c664b2bd831597aeea944dd100be75ff23 /src/usr/errl
parente70e9e57950904ae9d137df53961498c3e286295 (diff)
downloadtalos-hostboot-ad46bacd1b73e03203bbee12ce94867f0b291f57.tar.gz
talos-hostboot-ad46bacd1b73e03203bbee12ce94867f0b291f57.zip
Ignore info/recovered logs in OpenPower boxes
Change-Id: Icb6f8b39ee7ab299f4292ac2d775adaf9c16721b RTC:126449 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17807 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/errl')
-rw-r--r--src/usr/errl/errlentry.C3
-rw-r--r--src/usr/errl/errlmanager.C77
-rw-r--r--src/usr/errl/errlmanager_common.C9
3 files changed, 74 insertions, 15 deletions
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;
OpenPOWER on IntegriCloud