summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard J. Knight <rjknight@us.ibm.com>2015-08-06 18:38:49 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-08-10 10:56:58 -0500
commit6ba2412862a1548c442c9d082b2af1c5ed48a1f9 (patch)
treeaf3cb64553faf6cfbfd5e5d7b3ebb5f8e5276798
parentec6c516c3a2228fe43e61c825ac215cf3e1a70e4 (diff)
downloadtalos-hostboot-6ba2412862a1548c442c9d082b2af1c5ed48a1f9.tar.gz
talos-hostboot-6ba2412862a1548c442c9d082b2af1c5ed48a1f9.zip
No SEL Callouts for Memory injects at runtime
-Fixed runtime resolution of the flag which determines if an error log will be visable to the customer. Change-Id: Id8c44b0dcdb5714c163ac6485a53216786f9fbcf RTC:133158 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/19658 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r--src/include/usr/errl/errlentry.H8
-rw-r--r--src/include/usr/errl/errlmanager.H10
-rw-r--r--src/usr/errl/errlentry.C82
-rw-r--r--src/usr/errl/errlmanager.C9
-rw-r--r--src/usr/errl/errlmanager_common.C2
-rw-r--r--src/usr/errl/runtime/rt_errlmanager.C20
6 files changed, 115 insertions, 16 deletions
diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H
index 6baaccf3b..891300b23 100644
--- a/src/include/usr/errl/errlentry.H
+++ b/src/include/usr/errl/errlentry.H
@@ -644,7 +644,7 @@ private:
* The ErrlManager is the primary user of this call.
*
*/
- void commit( compId_t i_commiterComp );
+ void commit( compId_t i_commiterComp);
/**
@@ -736,6 +736,12 @@ private:
*/
bool getSkipShowingLog();
+ /**
+ * @brief Set iv_skipShowingLogs based on the passed in value
+ *
+ * @return nothing
+ */
+ void checkHiddenLogsEnable( );
/**
diff --git a/src/include/usr/errl/errlmanager.H b/src/include/usr/errl/errlmanager.H
index 89b545263..92fcac9b6 100644
--- a/src/include/usr/errl/errlmanager.H
+++ b/src/include/usr/errl/errlmanager.H
@@ -73,6 +73,16 @@ namespace ERRORLOG
void errlCommit(errlHndl_t& io_err, compId_t i_committerComp );
/**
+ * @brief Global function to determine if INFO and Recovered errors
+ * should be skipped or forwarded
+ *
+ * @param[in] None
+ *
+ * @return iv_hiddenErrLogsEnable
+ */
+uint8_t getHiddenLogsEnable();
+
+/**
* @brief Global enums used by static errlResourceReady function
*/
enum errlManagerNeeds
diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C
index 0344c2b7a..47363a81c 100644
--- a/src/usr/errl/errlentry.C
+++ b/src/usr/errl/errlentry.C
@@ -52,6 +52,7 @@
#include <targeting/common/utilFilter.H>
#include <config.h>
#include <initservice/initserviceif.H>
+#include <attributeenums.H>
// Hostboot Image ID string
@@ -688,11 +689,67 @@ void ErrlEntry::addHbBuildId()
ErrlUserDetailsString(l_pString).addToLog(this);
}
+enum {
+ SKIP_INFO_RECOVERABLE_LOGS =
+ TARGETING::HIDDEN_ERRLOGS_ENABLE_NO_HIDDEN_LOGS,
+ ENABLE_INFORMATIONAL_LOGS =
+ TARGETING::HIDDEN_ERRLOGS_ENABLE_ALLOW_INFORMATIONAL,
+ ENABLE_RECOVERABLE_LOGS =
+ TARGETING::HIDDEN_ERRLOGS_ENABLE_ALLOW_RECOVERED,
+ ENABLE_ALL_LOGS =
+ TARGETING::HIDDEN_ERRLOGS_ENABLE_ALLOW_ALL_LOGS
+};
+
+void ErrlEntry::checkHiddenLogsEnable( )
+{
+
+ // 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.
+
+ uint8_t l_enableLogs = getHiddenLogsEnable();
+
+ // enable all logs to be displayed
+ if( l_enableLogs == ENABLE_ALL_LOGS )
+ {
+ iv_skipShowingLog = false;
+ }
+ else
+ {
+ // need to check based on severity
+ switch( iv_User.iv_severity )
+ {
+ case ERRL_SEV_INFORMATIONAL:
+
+ if(l_enableLogs == ENABLE_INFORMATIONAL_LOGS )
+ {
+ iv_skipShowingLog = false;
+ }
+ break;
+
+ case ERRL_SEV_RECOVERED:
+
+ if(l_enableLogs == ENABLE_RECOVERABLE_LOGS )
+ {
+ iv_skipShowingLog = false;
+ }
+ break;
+
+ default:
+ // For any error log that is not INFORMATIONAL
+ // or RECOVERED, we want to show the log
+ iv_skipShowingLog = false;
+ }
+ }
+}
+
///////////////////////////////////////////////////////////////////////////////
// Called by addHwCallout to get the part and serial numbers from the current
// target so that it can be appended to the error log
-void ErrlEntry::addPartAndSerialNumbersToErrLog
- (const TARGETING::Target * i_target)
+ void ErrlEntry::addPartAndSerialNumbersToErrLog
+(const TARGETING::Target * i_target)
{
TRACDCOMP(g_trac_errl, ENTER_MRK"ErrlEntry::addPartAndSerialNumbersToErrLog()");
@@ -704,29 +761,29 @@ void ErrlEntry::addPartAndSerialNumbersToErrLog
do
{
if((l_type != TARGETING::TYPE_PROC ) &&
- (l_type != TARGETING::TYPE_DIMM ) &&
- (l_type != TARGETING::TYPE_MEMBUF ))
+ (l_type != TARGETING::TYPE_DIMM ) &&
+ (l_type != TARGETING::TYPE_MEMBUF ))
{
TARGETING::PredicatePostfixExpr l_procDimmMembuf;
TARGETING::TargetHandleList l_pList;
TARGETING::PredicateCTM l_procs(TARGETING::CLASS_CHIP,
- TARGETING::TYPE_PROC);
+ TARGETING::TYPE_PROC);
TARGETING::PredicateCTM l_dimms(TARGETING::CLASS_CARD,
- TARGETING::TYPE_DIMM);
+ TARGETING::TYPE_DIMM);
TARGETING::PredicateCTM l_membufs(TARGETING::CLASS_CHIP,
- TARGETING::TYPE_MEMBUF);
+ TARGETING::TYPE_MEMBUF);
l_procDimmMembuf.push(&l_procs).push(&l_dimms).Or()
- .push(&l_membufs).Or();
+ .push(&l_membufs).Or();
// Search for any parents with TYPE_PROC, TYPE_DIMM, or TYPE_MEMBUF
TARGETING::targetService().getAssociated( l_pList, l_target,
- TARGETING::TargetService::PARENT,
- TARGETING::TargetService::ALL,
- &l_procDimmMembuf);
+ TARGETING::TargetService::PARENT,
+ TARGETING::TargetService::ALL,
+ &l_procDimmMembuf);
// If no parent of desired type is present, break
if(!l_pList.size())
{
@@ -780,6 +837,9 @@ void ErrlEntry::commit( compId_t i_committerComponent )
// Add the Hostboot Build ID to the error log
addHbBuildId();
+ // check to see if we should skip info and recoverable errors?
+ checkHiddenLogsEnable();
+
// If this error was a hardware callout, add the serial and part numbers
// to the log. FSP provides this data so if there is no FSP, get them here.
if(!INITSERVICE::spBaseServicesEnabled())
diff --git a/src/usr/errl/errlmanager.C b/src/usr/errl/errlmanager.C
index a3a8c5f12..3ae08dde2 100644
--- a/src/usr/errl/errlmanager.C
+++ b/src/usr/errl/errlmanager.C
@@ -436,9 +436,6 @@ 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
- setErrlSkipFlag(l_err);
-
// Ask the ErrlEntry to assign commit component, commit time
l_err->commit( (compId_t) theMsg->data[0] );
@@ -782,6 +779,12 @@ void errlCommit(errlHndl_t& io_err, compId_t i_committerComp )
return;
}
+// Global function (not a method on an object) to get the hidden logs flag.
+uint8_t getHiddenLogsEnable( )
+{
+ return ERRORLOG::theErrlManager::instance().iv_hiddenErrLogsEnable;
+}
+
///////////////////////////////////////////////////////////////////////////////
// Global function (not a method on an object) to commit the error log.
void ErrlManager::errlResourceReady(errlManagerNeeds i_needs)
diff --git a/src/usr/errl/errlmanager_common.C b/src/usr/errl/errlmanager_common.C
index 38b8b3f3d..3b3f3f03b 100644
--- a/src/usr/errl/errlmanager_common.C
+++ b/src/usr/errl/errlmanager_common.C
@@ -45,7 +45,7 @@ void ErrlManager::sendErrLogToBmc(errlHndl_t &io_err)
// Decide whether we want to skip the error log
if( io_err->getSkipShowingLog() )
{
- TRACDCOMP( g_trac_errl, INFO_MRK
+ TRACFCOMP( g_trac_errl, INFO_MRK
"sendErrLogToBmc: %.8X is INFORMATIONAL/RECOVERED; skipping",
io_err->eid());
break;
diff --git a/src/usr/errl/runtime/rt_errlmanager.C b/src/usr/errl/runtime/rt_errlmanager.C
index 23258c8ec..ff668a7c4 100644
--- a/src/usr/errl/runtime/rt_errlmanager.C
+++ b/src/usr/errl/runtime/rt_errlmanager.C
@@ -37,6 +37,10 @@
namespace ERRORLOG
{
+// Allow Hidden error logs to be shown by default
+uint8_t ErrlManager::iv_hiddenErrLogsEnable =
+ TARGETING::HIDDEN_ERRLOGS_ENABLE_ALLOW_ALL_LOGS;
+
extern trace_desc_t* g_trac_errl;
//////////////////////////////////////////////////////////////////////////////
@@ -75,6 +79,14 @@ ErrlManager::ErrlManager()
if(sys)
{
iv_currLogId = sys->getAttr<TARGETING::ATTR_HOSTSVC_PLID>();
+
+ // set whether we want to skip certain error logs or not.
+ iv_hiddenErrLogsEnable =
+ sys->getAttr<TARGETING::ATTR_HIDDEN_ERRLOGS_ENABLE>();
+
+ TRACFCOMP( g_trac_errl,"iv_hiddenErrorLogsEnable = 0x%x",
+ iv_hiddenErrLogsEnable );
+
}
else
{
@@ -245,6 +257,14 @@ void errlCommit(errlHndl_t& io_err, compId_t i_committerComp )
return;
}
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+// Global function (not a method on an object) to get the hidden logs flag.
+uint8_t getHiddenLogsEnable( )
+{
+ return ERRORLOG::theErrlManager::instance().iv_hiddenErrLogsEnable;
+}
+
///////////////////////////////////////////////////////////////////////////////
// ErrlManager::sendErrlogToMessageQueue()
OpenPOWER on IntegriCloud