summaryrefslogtreecommitdiffstats
path: root/src/usr/errl
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2017-07-18 13:23:54 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-07-21 11:40:53 -0400
commit2db396365b7d86474564e5896a5524806a7fe6a2 (patch)
tree0bd692bd9cf9185129af402d5eed56679a22f97f /src/usr/errl
parent152aabbb036689a3fca32422cad11455a2ee04b2 (diff)
downloadtalos-hostboot-2db396365b7d86474564e5896a5524806a7fe6a2.tar.gz
talos-hostboot-2db396365b7d86474564e5896a5524806a7fe6a2.zip
Avoid callouts, deconfigs, and gards for all non-visible errors
Fixed the deferred deconfig path that was still applying callouts for info logs Simplified where the check is for regular deconfigs Change-Id: I49ff4b0fe4ee81c28fde594c15bfd8f38bea1afc Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43289 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/errl')
-rw-r--r--src/usr/errl/errlentry.C47
-rw-r--r--src/usr/errl/test/errltest.H77
2 files changed, 121 insertions, 3 deletions
diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C
index 5c1c681a5..3c5cdb638 100644
--- a/src/usr/errl/errlentry.C
+++ b/src/usr/errl/errlentry.C
@@ -582,11 +582,11 @@ void ErrlEntry::checkHiddenLogsEnable( )
else
{
// need to check based on severity
- switch( iv_User.iv_severity )
+ switch( sev() )
{
case ERRL_SEV_INFORMATIONAL:
- if(l_enableLogs == ENABLE_INFORMATIONAL_LOGS )
+ if(l_enableLogs & ENABLE_INFORMATIONAL_LOGS )
{
iv_skipShowingLog = false;
}
@@ -594,7 +594,7 @@ void ErrlEntry::checkHiddenLogsEnable( )
case ERRL_SEV_RECOVERED:
- if(l_enableLogs == ENABLE_RECOVERABLE_LOGS )
+ if(l_enableLogs & ENABLE_RECOVERABLE_LOGS )
{
iv_skipShowingLog = false;
}
@@ -1109,6 +1109,13 @@ void ErrlEntry::processCallout()
{
TRACDCOMP(g_trac_errl, INFO_MRK"errlEntry::processCallout");
+ // Skip all callouts if this is a non-visible log
+ if( !isSevVisible() )
+ {
+ TRACDCOMP(g_trac_errl, "Error log is non-visible - skipping callouts");
+ return;
+ }
+
// see if HWAS has been loaded and has set the processCallout function
HWAS::processCalloutFn pFn =
ERRORLOG::theErrlManager::instance().getHwasProcessCalloutFn();
@@ -1161,6 +1168,13 @@ void ErrlEntry::deferredDeconfigure()
TRACDCOMP(g_trac_errl, INFO_MRK"errlEntry::deferredDeconfigure");
+ // Skip all callouts if this is a non-visible log
+ if( !isSevVisible() )
+ {
+ TRACDCOMP(g_trac_errl, "Error log is non-visible - skipping callouts");
+ return;
+ }
+
// see if HWAS has been loaded and has set the processCallout function
HWAS::processCalloutFn pFn =
ERRORLOG::theErrlManager::instance().getHwasProcessCalloutFn();
@@ -1543,5 +1557,32 @@ std::vector<void*> ErrlEntry::getUDSections(compId_t i_compId,
return copy_vector;
}
+/**
+ * @brief Check if the severity of this log indicates it is
+ * customer visible, note this ignores any override flags that
+ * might change standard behavior
+ * @return true if log is visible
+ */
+bool ErrlEntry::isSevVisible( void )
+{
+ bool l_vis = true;
+ switch( sev() )
+ {
+ // Hidden logs
+ case( ERRL_SEV_INFORMATIONAL ): l_vis = false; break;
+ case( ERRL_SEV_RECOVERED ): l_vis = false; break;
+
+ // Visible logs
+ case( ERRL_SEV_PREDICTIVE ): l_vis = true; break;
+ case( ERRL_SEV_UNRECOVERABLE ): l_vis = true; break;
+ case( ERRL_SEV_CRITICAL_SYS_TERM ): l_vis = true; break;
+
+ // Error case, shouldn't happen so make it show up
+ case( ERRL_SEV_UNKNOWN ): l_vis = true; break;
+ }
+ return l_vis;
+}
+
+
} // End namespace
diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H
index 8ca85d69a..4fa789b53 100644
--- a/src/usr/errl/test/errltest.H
+++ b/src/usr/errl/test/errltest.H
@@ -40,6 +40,7 @@
#include <errl/errludtarget.H>
#include <targeting/common/target.H>
+#include <targeting/namedtarget.H>
#include <targeting/common/iterators/rangefilter.H>
#include <targeting/common/predicates/predicates.H>
#include <hwas/common/hwasCallout.H>
@@ -1098,6 +1099,82 @@ public:
}
}
+
+ /**
+ * @brief Guarantee non-visible logs do not post callouts
+ */
+ void testErrl_hidecallouts(void)
+ {
+ // Find a non-master core that is currently functional
+ TARGETING::TargetHandleList l_cores;
+ TARGETING::getAllChiplets( l_cores, TARGETING::TYPE_CORE, true );
+ TARGETING::Target* l_victim = nullptr;
+ const TARGETING::Target* l_master = TARGETING::getMasterCore();
+ for( auto c : l_cores )
+ {
+ if( c != l_master )
+ {
+ l_victim = c;
+ break;
+ }
+ }
+ if( l_victim == nullptr )
+ {
+ TS_FAIL( "Could not find a non-master core" );
+ return;
+ }
+
+ // Create an informational log
+ errlHndl_t l_err = nullptr;
+ l_err = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ ERRORLOG::ERRL_TEST_MOD_ID,
+ ERRORLOG::ERRL_TEST_REASON_CODE,
+ 0x494E464F, //INFO
+ 0 );
+ // Add a callout with deconfig and gard
+ l_err->addHwCallout( l_victim,
+ HWAS::SRCI_PRIORITY_HIGH,
+ HWAS::DECONFIG,
+ HWAS::GARD_Fatal );
+ // Commit the log
+ errlCommit(l_err,CXXTEST_COMP_ID);
+
+ // Verify that the target wasn't actually deconfigured
+ TARGETING::ATTR_HWAS_STATE_type l_state =
+ l_victim->getAttr<TARGETING::ATTR_HWAS_STATE>();
+ if( !l_state.functional )
+ {
+ TS_FAIL( "Info log incorrectly caused deconfig" );
+ }
+
+
+ // Create a recovered log
+ l_err = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_RECOVERED,
+ ERRORLOG::ERRL_TEST_MOD_ID,
+ ERRORLOG::ERRL_TEST_REASON_CODE,
+ 0x52454300, //REC
+ 0 );
+ // Add a callout with deconfig and gard
+ l_err->addHwCallout( l_victim,
+ HWAS::SRCI_PRIORITY_HIGH,
+ HWAS::DECONFIG,
+ HWAS::GARD_Fatal );
+ // Commit the log
+ errlCommit(l_err,CXXTEST_COMP_ID);
+
+ // Verify that the target wasn't actually deconfigured
+ l_state =
+ l_victim->getAttr<TARGETING::ATTR_HWAS_STATE>();
+ if( !l_state.functional )
+ {
+ TS_FAIL( "Recovered log incorrectly caused deconfig" );
+ }
+ }
+
+
+
};
}
OpenPOWER on IntegriCloud