summaryrefslogtreecommitdiffstats
path: root/src/usr/errl
diff options
context:
space:
mode:
authorBill Hoffa <wghoffa@us.ibm.com>2016-09-08 16:35:01 -0500
committerMatthew A. Ploetz <maploetz@us.ibm.com>2016-09-12 14:08:46 -0400
commit4d7850eb4d6dd8a433abef0aa36b8815bb3b0d75 (patch)
tree6a3aff77a546648c9fcce55d0a7edcdcbd1f5a6d /src/usr/errl
parent4a6f519abeba64bdc33d15bc97b07e54471609d1 (diff)
downloadtalos-hostboot-4d7850eb4d6dd8a433abef0aa36b8815bb3b0d75.tar.gz
talos-hostboot-4d7850eb4d6dd8a433abef0aa36b8815bb3b0d75.zip
Allow garding of CORE targets
Change-Id: I1d605593309eb132334b749b8bc2ba84d5177f20 RTC: 158588 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29392 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: DHRUVARAJ SUBHASH CHANDRAN <dhruvaraj@in.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com>
Diffstat (limited to 'src/usr/errl')
-rw-r--r--src/usr/errl/errlentry.C57
-rw-r--r--src/usr/errl/test/errltest.H69
2 files changed, 69 insertions, 57 deletions
diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C
index ace3ac0d7..8f430a70b 100644
--- a/src/usr/errl/errlentry.C
+++ b/src/usr/errl/errlentry.C
@@ -594,62 +594,7 @@ void ErrlEntry::addHwCallout(const TARGETING::Target *i_target,
TARGETING::ATTR_ECID).addToLog(this);
}
- if (l_type == TARGETING::TYPE_CORE)
- {
- //IF the type being garded is a Core the associated EX Chiplet
- // needs to be found and garded instead because the core is
- // not gardable
- TRACFCOMP(g_trac_errl, INFO_MRK
- "addHwCallout - Callout on Core type, use EX Chiplet instead"
- " because Core is not gardable");
- TARGETING::TargetHandleList targetList;
- getParentAffinityTargets(targetList,
- i_target,
- TARGETING::CLASS_UNIT,
- TARGETING::TYPE_EX);
- if ( targetList.size() != 1 )
- {
- TRACFCOMP(g_trac_errl, ERR_MRK
- "addHwCallout - Found No EX Chiplet for this Core");
-
- //Just use the the Core itself in the gard operation
- ep = i_target->getAttr<TARGETING::ATTR_PHYS_PATH>();
-
- /*@ errorlog tag
- * @errortype ERRL_SEV_UNRECOVERABLE
- * @moduleid ERRL_ADD_HW_CALLOUT_ID
- * @reasoncode ERRL_CORE_EX_TARGET_NULL
- * @userdata1 Core HUID that has bad EX association
- * @userdata2 Number of EX chips associatd with core
- *
- * @devdesc Hardware callout could not Gard target
- * because it could not find EX chip
- * associated with the Core to be called out
- *
- */
- errlHndl_t l_errl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_UNRECOVERABLE,
- ERRORLOG::ERRL_ADD_HW_CALLOUT_ID,
- ERRORLOG::ERRL_CORE_EX_TARGET_NULL,
- get_huid(i_target), targetList.size(),
- true);
-
- if (l_errl)
- {
- errlCommit(l_errl, ERRL_COMP_ID);
- }
-
- }
- else
- {
- //Use the EX target found in below logic to gard
- ep = targetList[0]->getAttr<TARGETING::ATTR_PHYS_PATH>();
- }
- }
- else
- {
- ep = i_target->getAttr<TARGETING::ATTR_PHYS_PATH>();
- }
+ ep = i_target->getAttr<TARGETING::ATTR_PHYS_PATH>();
// size is total EntityPath size minus unused path elements
uint32_t size1 = sizeof(ep) -
diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H
index 6dd7c599b..3de01fb52 100644
--- a/src/usr/errl/test/errltest.H
+++ b/src/usr/errl/test/errltest.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2015 */
+/* Contributors Listed Below - COPYRIGHT 2011,2016 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -868,7 +868,74 @@ public:
return l_dataMatching;
}
+ /**
+ * @brief Test CORE callout
+ */
+ void testErrl7(void)
+ {
+ TS_TRACE( "test testErrl7");
+#if 1
+ // these tests deconfigure and gard targets. and even tho they
+ // restore their state after the tests, since the cxxtests are
+ // all run in parallel, during the time that a target is non-
+ // functional due to this test, another test may be running that
+ // might be adversly affected.
+ // tests are left in the code so that a developer can enable them
+ // to test these specific functions - just keep in mind that there
+ // could be side effects in other cxxtests.
+ TS_TRACE( " - SKIPPING -- other tests could be adversly affected");
+#else
+ do
+ {
+ // find a core unit that we can play with
+ TARGETING::Target * pSys;
+ TARGETING::targetService().getTopLevelTarget(pSys);
+
+ TARGETING::PredicateCTM predCore(TARGETING::CLASS_UNIT,
+ TARGETING::TYPE_CORE);
+ TARGETING::PredicateHwas predFunctional;
+ predFunctional.poweredOn(true).present(true).functional(true);
+ TARGETING::PredicatePostfixExpr checkExpr;
+ checkExpr.push(&predCore).push(&predFunctional).And();
+
+ TARGETING::TargetHandleList l_coreList;
+ TARGETING::targetService().getAssociated( l_coreList, pSys,
+ TARGETING::TargetService::CHILD, TARGETING::TargetService::ALL,
+ &checkExpr );
+
+ if (l_coreList.empty())
+ {
+ TS_FAIL("test callout: empty l_coreList");
+ break;
+ }
+
+ TARGETING::TargetHandle_t l_target = *l_coreList.begin();
+
+ // Create an error log
+ errlHndl_t errl = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ ERRORLOG::ERRL_TEST_MOD_ID,
+ ERRORLOG::ERRL_TEST_REASON_CODE);
+
+ // test the different callout types
+ TS_TRACE( "test callout l_core %p", l_target);
+ ERRORLOG::ErrlUserDetailsTarget(l_target).addToLog(errl);
+
+ errl->addHwCallout(l_target,
+ HWAS::SRCI_PRIORITY_HIGH,
+ HWAS::DECONFIG,
+ HWAS::GARD_User_Manual);
+
+ errlCommit(errl, CXXTEST_COMP_ID);
+
+ TS_TRACE("testErrl7 done");
+ }
+ while(0);
+#endif
+ }
+
};
}
+
#endif
OpenPOWER on IntegriCloud