summaryrefslogtreecommitdiffstats
path: root/src/usr/hwas/common/deconfigGard.C
diff options
context:
space:
mode:
authorcrgeddes <crgeddes@us.ibm.com>2016-11-02 17:55:55 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-11-03 13:46:19 -0400
commit60ba3fa435a6d5f1560107974626acf699f62fe4 (patch)
tree02b4d5b20a6c9b7607acde3b4a9228793cc69dd6 /src/usr/hwas/common/deconfigGard.C
parent09c1608f2f17e5351a9037fcfd2f9075016a4d96 (diff)
downloadtalos-hostboot-60ba3fa435a6d5f1560107974626acf699f62fe4.tar.gz
talos-hostboot-60ba3fa435a6d5f1560107974626acf699f62fe4.zip
Add logic to deconfig MCA/MCS/MCBIST targets by association
There was some logic missing for P9's newly added targets (MCBIST, MCA) so we had to update the deconfig by association logic to look for these chips in the heirarchy. Change-Id: I59c19f79b1b37ec5e0be31841181c6ca051f1452 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/32160 Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Tested-by: Jenkins OP Build CI <op-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>
Diffstat (limited to 'src/usr/hwas/common/deconfigGard.C')
-rw-r--r--src/usr/hwas/common/deconfigGard.C112
1 files changed, 112 insertions, 0 deletions
diff --git a/src/usr/hwas/common/deconfigGard.C b/src/usr/hwas/common/deconfigGard.C
index abe5dcedd..982e3b019 100644
--- a/src/usr/hwas/common/deconfigGard.C
+++ b/src/usr/hwas/common/deconfigGard.C
@@ -1473,6 +1473,68 @@ void DeconfigGard::_deconfigureByAssoc(
break;
} // TYPE_MEMBUF
+ case TYPE_MCA:
+ {
+ // get parent MCS
+ TargetHandleList pParentMcsList;
+ getParentAffinityTargetsByState(pParentMcsList, &i_target,
+ CLASS_UNIT, TYPE_MCS, UTIL_FILTER_PRESENT);
+
+ HWAS_ASSERT((pParentMcsList.size() == 1),
+ "HWAS _deconfigureByAssoc: pParentMcsList != 1");
+
+ Target *l_parentMcs = pParentMcsList[0];
+ // if parent MCS hasn't already been deconfigured
+ if (!pParentMcsList.empty() &&
+ isFunctional(l_parentMcs) &&
+ !anyChildFunctional(*l_parentMcs))
+ {
+ // deconfigure parent MCS
+ HWAS_INF("_deconfigureByAssoc MCS parent with no functional MCAs: %.8X", get_huid(l_parentMcs));
+ _deconfigureTarget(*l_parentMcs,
+ i_errlEid, NULL, i_deconfigRule);
+ _deconfigureByAssoc(*l_parentMcs,
+ i_errlEid,i_deconfigRule);
+ }
+
+ // and we're done, so break;
+ break;
+ }
+
+ case TYPE_MCS:
+ {
+ // get parent MCBIST
+ TargetHandleList pParentMcbistList;
+ getParentAffinityTargetsByState(pParentMcbistList, &i_target,
+ CLASS_UNIT, TYPE_MCBIST, UTIL_FILTER_PRESENT);
+
+ HWAS_ASSERT((pParentMcbistList.size() <= 1),
+ "HWAS _deconfigureByAssoc: MCS has multiple MCBIST parents, this is impossible");
+
+ Target *l_parentMcbist = pParentMcbistList[0];
+
+ // if parent MCBIST hasn't already been deconfigured
+ if (!pParentMcbistList.empty() &&
+ isFunctional(l_parentMcbist) &&
+ !anyChildFunctional(*l_parentMcbist))
+ {
+ // deconfigure parent MCBIST
+ HWAS_INF("_deconfigureByAssoc MCBIST parent with no functional children: %.8X",
+ get_huid(l_parentMcbist));
+ _deconfigureTarget(*l_parentMcbist,
+ i_errlEid, NULL, i_deconfigRule);
+ _deconfigureByAssoc(*l_parentMcbist,
+ i_errlEid,i_deconfigRule);
+ }
+ else
+ {
+ HWAS_ASSERT((pParentMcbistList.size() <= 1),
+ "HWAS _deconfigureByAssoc: No MCBIST parents for for MCS w/ HUID: %lx", get_huid(&i_target));
+ }
+ // and we're done, so break;
+ break;
+ }
+
case TYPE_MBA:
{
// get parent MEMBUF (Centaur)
@@ -1695,6 +1757,54 @@ void DeconfigGard::_deconfigureByAssoc(
_deconfigureByAssoc(const_cast<Target &> (*l_parentMba),
i_errlEid, i_deconfigRule);
}
+
+ TargetHandleList pParentMcaList;
+ PredicateCTM predMca(CLASS_UNIT, TYPE_MCA);
+ PredicatePostfixExpr funcMca;
+ funcMca.push(&predMca).push(&isFunctional).And();
+ targetService().getAssociated(pParentMcaList,
+ &i_target,
+ TargetService::PARENT_BY_AFFINITY,
+ TargetService::ALL,
+ &funcMca);
+
+ HWAS_ASSERT((pParentMcaList.size() <= 1),
+ "HWAS _deconfigureByAssoc: pParentMcaList > 1");
+
+ // if parent MCA hasn't already been deconfigured
+ if (!pParentMcaList.empty())
+ {
+ Target *l_parentMca = pParentMcaList[0];
+
+ // get children DIMM that are functional
+ // NOTE cannot use anyChildFunctional to determine this
+ // because we need to look at affinity path
+ TargetHandleList pDimmList;
+ PredicateCTM predDimm(CLASS_LOGICAL_CARD, TYPE_DIMM);
+ PredicatePostfixExpr funcDimms;
+ funcDimms.push(&predDimm).push(&isFunctional).And();
+ targetService().getAssociated(pDimmList,
+ l_parentMca,
+ TargetService::CHILD_BY_AFFINITY,
+ TargetService::ALL,
+ &funcDimms);
+
+ // if parent MCA has no functional memory
+ if (pDimmList.empty())
+ {
+ // deconfigure parent MCA
+ HWAS_INF("_deconfigureByAssoc MCA parent with no memory: %.8X",
+ get_huid(l_parentMca));
+ _deconfigureTarget(const_cast<Target &> (*l_parentMca),
+ i_errlEid, NULL, i_deconfigRule);
+ _deconfigureByAssoc(const_cast<Target &> (*l_parentMca),
+ i_errlEid, i_deconfigRule);
+
+ // and we're done, so break;
+ break;
+ }
+
+ }
break;
} // TYPE_DIMM
@@ -2541,6 +2651,8 @@ void DeconfigGard::_clearFCODeconfigure(ConstTargetHandle_t i_nodeTarget)
}
//******************************************************************************
+//Note this will not find child DIMMs because they are
+//affinity children, not physical
bool DeconfigGard::anyChildFunctional(Target & i_parent)
{
bool retVal = false;
OpenPOWER on IntegriCloud