summaryrefslogtreecommitdiffstats
path: root/src/usr/hwas/common
diff options
context:
space:
mode:
authorSakethan R Kotta <sakkotta@in.ibm.com>2017-08-11 06:31:50 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-08-18 14:24:08 -0400
commita9512e1702f68f4f3b13fe13663094eedd24c22a (patch)
tree2f340d55d9c2942d8a5545652725f14b35fe59c8 /src/usr/hwas/common
parent25a46875b4bd8e7da5d5b2e342467ee2183e228b (diff)
downloadtalos-hostboot-a9512e1702f68f4f3b13fe13663094eedd24c22a.tar.gz
talos-hostboot-a9512e1702f68f4f3b13fe13663094eedd24c22a.zip
Added HWAS support for Cumulus and Centaur targets
Change-Id: I764527b57f07ce5d2c95283ba08fd7dd96d1222c RTC:178217 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44516 Tested-by: Jenkins Server <pfd-jenkins+hostboot@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> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/hwas/common')
-rw-r--r--src/usr/hwas/common/deconfigGard.C290
-rw-r--r--src/usr/hwas/common/hwas.C321
2 files changed, 356 insertions, 255 deletions
diff --git a/src/usr/hwas/common/deconfigGard.C b/src/usr/hwas/common/deconfigGard.C
index d6b2f93e0..0a4367cae 100644
--- a/src/usr/hwas/common/deconfigGard.C
+++ b/src/usr/hwas/common/deconfigGard.C
@@ -1549,54 +1549,25 @@ void DeconfigGard::_deconfigureByAssoc(
case TYPE_MEMBUF:
{
- // 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");
- const Target *l_parentMcs = pParentMcsList[0];
+ // get parent DMI
+ TargetHandleList pParentDmiList;
+ getParentAffinityTargetsByState(pParentDmiList, &i_target,
+ CLASS_UNIT, TYPE_DMI, UTIL_FILTER_PRESENT);
+ HWAS_ASSERT((pParentDmiList.size() == 1),
+ "HWAS _deconfigureByAssoc: pParentDmiList > 1");
+ const Target *l_parentDmi = pParentDmiList[0];
// If parent is functional, deconfigure it
- if (isFunctional(l_parentMcs))
+ if (isFunctional(l_parentDmi))
{
// deconfigure the parent
- HWAS_INF("_deconfigureByAssoc MEMBUF parent MCS: %.8X",
- get_huid(l_parentMcs));
- _deconfigureTarget(const_cast<Target &> (*l_parentMcs),
+ HWAS_INF("_deconfigureByAssoc MEMBUF parent DMI: %.8X",
+ get_huid(l_parentDmi));
+ _deconfigureTarget(const_cast<Target &> (*l_parentDmi),
i_errlEid, NULL, i_deconfigRule);
- _deconfigureByAssoc(const_cast<Target &> (*l_parentMcs),
+ _deconfigureByAssoc(const_cast<Target &> (*l_parentDmi),
i_errlEid, i_deconfigRule);
}
-
- Target *pSys;
- targetService().getTopLevelTarget(pSys);
- HWAS_ASSERT(pSys, "HWAS _deconfigureByAssoc: no TopLevelTarget");
-
-#if 0 //@TODO RTC 178216 Re-Add this after proc_setup_bars_memory_attributes.xml
- // is imported from ekb
- // done if not in interleaved mode
- if (!pSys->getAttr<ATTR_ALL_MCS_IN_INTERLEAVING_GROUP>())
- {
- break;
- }
-#endif
- // if paired mode (interleaved)
- // deconfigure paired MCS and MEMBUF (Centaur)
- // find paired MCS / MEMBUF (Centaur)
- const Target *l_partnerMcs = findPartnerForMcs(l_parentMcs);
-
- // If partner MCS is functional or not spec deconfigured
- if (l_partnerMcs && isFunctional(l_partnerMcs))
- {
- // deconfigure the paired MCS
- HWAS_INF("_deconfigureByAssoc MCS (& MEMBUF) paired: %.8X",
- get_huid(l_partnerMcs));
- _deconfigureTarget(const_cast<Target &> (*l_partnerMcs),
- i_errlEid, NULL,i_deconfigRule);
- _deconfigureByAssoc(const_cast<Target &> (*l_partnerMcs),
- i_errlEid,i_deconfigRule);
- }
break;
} // TYPE_MEMBUF
@@ -1665,6 +1636,74 @@ void DeconfigGard::_deconfigureByAssoc(
// and we're done, so break;
break;
}
+
+ case TYPE_MI:
+ {
+ // get parent MC
+ TargetHandleList pParentMctList;
+ getParentAffinityTargetsByState(pParentMctList, &i_target,
+ CLASS_UNIT, TYPE_MC, UTIL_FILTER_PRESENT);
+
+ HWAS_ASSERT((pParentMctList.size() <= 1),
+ "HWAS _deconfigureByAssoc: MI has multiple MC parents, this is impossible");
+
+ Target *l_parentMc = pParentMctList[0];
+
+ // if parent MC hasn't already been deconfigured
+ if (!pParentMctList.empty() &&
+ isFunctional(l_parentMc) &&
+ !anyChildFunctional(*l_parentMc))
+ {
+ // deconfigure parent MC
+ HWAS_INF("_deconfigureByAssoc MC parent with no functional children: %.8X",
+ get_huid(l_parentMc));
+ _deconfigureTarget(*l_parentMc,
+ i_errlEid, NULL, i_deconfigRule);
+ _deconfigureByAssoc(*l_parentMc,
+ i_errlEid,i_deconfigRule);
+ }
+ else
+ {
+ HWAS_ASSERT((pParentMctList.size() <= 1),
+ "HWAS _deconfigureByAssoc: No MC parents for for MI w/ HUID: %lx", get_huid(&i_target));
+ }
+ // and we're done, so break;
+ break;
+ }
+
+ case TYPE_DMI:
+ {
+ // get parent MI
+ TargetHandleList pParentMitList;
+ getParentAffinityTargetsByState(pParentMitList, &i_target,
+ CLASS_UNIT, TYPE_MC, UTIL_FILTER_PRESENT);
+
+ HWAS_ASSERT((pParentMitList.size() <= 1),
+ "HWAS _deconfigureByAssoc: DMI has multiple MI parents, this is impossible");
+
+ Target *l_parentMi = pParentMitList[0];
+
+ // if parent MI hasn't already been deconfigured
+ if (!pParentMitList.empty() &&
+ isFunctional(l_parentMi) &&
+ !anyChildFunctional(*l_parentMi))
+ {
+ // deconfigure parent MI
+ HWAS_INF("_deconfigureByAssoc MI parent with no functional children: %.8X",
+ get_huid(l_parentMi));
+ _deconfigureTarget(*l_parentMi,
+ i_errlEid, NULL, i_deconfigRule);
+ _deconfigureByAssoc(*l_parentMi,
+ i_errlEid,i_deconfigRule);
+ }
+ else
+ {
+ HWAS_ASSERT((pParentMitList.size() <= 1),
+ "HWAS _deconfigureByAssoc: No MI parents for for DMI w/ HUID: %lx", get_huid(&i_target));
+ }
+ // and we're done, so break;
+ break;
+ }
case TYPE_MBA:
{
@@ -1692,174 +1731,9 @@ void DeconfigGard::_deconfigureByAssoc(
i_errlEid, NULL, i_deconfigRule);
_deconfigureByAssoc(const_cast<Target &> (*l_parentMembuf),
i_errlEid, i_deconfigRule);
-
- // and we're done, so break;
- break;
}
-
- // parent MEMBUF still has functional memory
- Target *pSys;
- targetService().getTopLevelTarget(pSys);
- HWAS_ASSERT(pSys, "HWAS _deconfigureByAssoc: no TopLevelTarget");
-
-#if 0 //@TODO RTC 178216 Re-Add this after proc_setup_bars_memory_attributes.xml
- // is imported from ekb
- // done if not in interleaved mode
- if (!pSys->getAttr<ATTR_ALL_MCS_IN_INTERLEAVING_GROUP>())
- {
- break;
- }
-#endif
- // we need to make sure that MBA memory is balanced.
-
- // find parent MCS
- TargetHandleList pParentMcsList;
- PredicateCTM predMcs(CLASS_UNIT, TYPE_MCS);
- PredicatePostfixExpr funcMcs;
- funcMcs.push(&predMcs).push(&isFunctional).And();
- targetService().getAssociated(pParentMcsList,
- l_parentMembuf,
- TargetService::PARENT_BY_AFFINITY,
- TargetService::ALL,
- &funcMcs);
-
- HWAS_ASSERT((pParentMcsList.size() <= 1),
- "HWAS _deconfigureByAssoc: pParentMcsList > 1");
-
- if (pParentMcsList.empty())
- {
- // MCS is already deconfigured, we're done
- break;
- }
-
- // MEMBUF only has 1 parent
- const Target *l_parentMcs = pParentMcsList[0];
-
- // find paired MCS / MEMBUF (Centaur)
- const Target *l_partnerMcs = findPartnerForMcs(l_parentMcs);
-
- // If partner MCS is non-functional
- // (findPartnerForMcs returned NULL) or speculated deconfig
- if (!(l_partnerMcs && isFunctional(l_partnerMcs)))
- {
- // We're done.
- break;
- }
-
- // Obtain MBA targets related to paired MCS
- TargetHandleList pMbaList;
- PredicateCTM predMba(CLASS_UNIT, TYPE_MBA);
- PredicatePostfixExpr funcMba;
- funcMba.push(&predMba).push(&isFunctional).And();
- targetService().getAssociated(pMbaList,
- l_partnerMcs,
- TargetService::CHILD_BY_AFFINITY,
- TargetService::ALL,
- &funcMba);
-
-
- // Declare list to hold any MBA targets we need to deconfigure
- // as we look for matches. This list will be used to run
- // the subsequent _deconfigureByAssoc
- TargetHandleList l_deconfigList;
-
- // Now we will check the memory size of each MBA target
- // of the paired MCS. If an MBAs memory size matches that
- // of the original MBA (i_target), then we will deconfigure it
- // If ATTR_EFF_DIMM_SIZE has not been set yet (returns 0), then
- // we will deconfigure the MBA whose position matches that of
- // the original.
-
- // how much memory does this MBA have
- ATTR_EFF_DIMM_SIZE_type l_dimmSize;
- i_target.tryGetAttr<ATTR_EFF_DIMM_SIZE>(l_dimmSize);
- const uint64_t l_mbaDimmSize =
- l_dimmSize[0][0] + l_dimmSize[0][1] +
- l_dimmSize[1][0] + l_dimmSize[1][1];
-
- if (l_mbaDimmSize == 0)
- {
- // before this attribute has been set
- HWAS_INF("ATTR_EFF_DIMMSIZE not set (returned 0)."
- " Deconfiguring same-position MBA of paried MCS.");
-
- // Get this MBAs position
- const ATTR_CHIP_UNIT_type l_mbaPos =
- i_target.getAttr<ATTR_CHIP_UNIT>();
-
- // Assumes 2 MBA per MEMBUF. if this changes, then instead
- // of '1', count the number of MBAs under this MEMBUF and
- // use that as the comparison.
- if (pMbaList.size() != 1) // this != myMbaCount
- {
- // Iterate through MBAs looking for position match
- for (TargetHandleList::iterator
- pMba_it = pMbaList.begin();
- pMba_it != pMbaList.end();
- ++pMba_it)
- {
- // Capture current MBA
- TargetHandle_t pMba = *pMba_it;
-
- // If position matches
- if (l_mbaPos == pMba->getAttr<ATTR_CHIP_UNIT>())
- {
- // Deconfigure it
- HWAS_INF("_deconfigureByAssoc MBA matched: %.8X",
- get_huid(pMba));
- _deconfigureTarget(*pMba, i_errlEid,
- NULL, i_deconfigRule);
- l_deconfigList.push_back(pMba);
- break; // only need to do 1 MBA - we're done.
- }
- }// 2 functional MBAs
- }// size != 1
- }// ATTR_EFF_DIMM_SIZE not set
- else
- {
- // ATTR_EFF_DIMM_SIZE was set
- if (pMbaList.size() != 1) // this != myMbaCount
- {
- // unbalanced, so lets find one to deconfigure
- for (TargetHandleList::iterator
- pMba_it = pMbaList.begin();
- pMba_it != pMbaList.end();
- ++pMba_it)
- {
- TargetHandle_t pMba = *pMba_it;
- pMba->tryGetAttr<ATTR_EFF_DIMM_SIZE>(l_dimmSize);
- const uint64_t l_thisDimmSize =
- l_dimmSize[0][0] + l_dimmSize[0][1] +
- l_dimmSize[1][0] + l_dimmSize[1][1];
-
- // if this MBA matches, deconfigure it.
- if (l_mbaDimmSize == l_thisDimmSize)
- {
- HWAS_INF("_deconfigureByAssoc MBA matched: %.8X",
- get_huid(pMba));
- _deconfigureTarget(*pMba, i_errlEid,
- NULL, i_deconfigRule);
- l_deconfigList.push_back(pMba);
- break; // only need to do 1 MBA - we're done.
- }
- } // for MBA
- } // if 2 functional MBA
- }// else
-
- // now loop thru and do the ByAssoc deconfig for each of the
- // MBA targets. this should get the CHILD associations, but
- // won't cause any pair deconfigs, since we coverered that
- // already.
- for (TargetHandleList::iterator
- pMba_it = l_deconfigList.begin();
- pMba_it != l_deconfigList.end();
- ++pMba_it)
- {
- TargetHandle_t pMba = *pMba_it;
- HWAS_INF("_deconfigureByAssoc MBA matched (bA): %.8X",
- get_huid(pMba));
- _deconfigureByAssoc(*pMba, i_errlEid,i_deconfigRule);
- } // for
+
+ // and we're done, so break;
break;
} // TYPE_MBA
diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C
index f9ce03e3f..539a9e185 100644
--- a/src/usr/hwas/common/hwas.C
+++ b/src/usr/hwas/common/hwas.C
@@ -2053,23 +2053,23 @@ void invokePresentByAssoc()
// make one list
TargetHandleList l_funcTargetList;
- // get the functional MCBISTs
+ // get the functional MCBISTs (for Nimbus based systems)
TargetHandleList l_funcMCBISTTargetList;
getAllChiplets(l_funcMCBISTTargetList, TYPE_MCBIST, true );
l_funcTargetList.insert(l_funcTargetList.begin(),
l_funcMCBISTTargetList.begin(),
l_funcMCBISTTargetList.end());
- // If VPO, dump targets (MCBIST) for verification & debug purposes
- #ifdef CONFIG_VPO_COMPILE
+// If VPO, dump targets (MCBIST) for verification & debug purposes
+#ifdef CONFIG_VPO_COMPILE
HWAS_INF("invokePresentByAssoc(): MCBIST targets:");
for (auto l_MCBIST : l_funcMCBISTTargetList)
{
HWAS_INF(" MCBIST: HUID %.8x", TARGETING::get_huid(l_MCBIST));
}
- #endif
+#endif
- // get the functional MCSs
+ // get the functional MCSs (for Nimbus based systems)
TargetHandleList l_funcMCSTargetList;
getAllChiplets(l_funcMCSTargetList, TYPE_MCS, true );
l_funcTargetList.insert(l_funcTargetList.begin(),
@@ -2085,8 +2085,56 @@ void invokePresentByAssoc()
}
#endif
+ // get the functional MCs (for Cumulus based systems)
+ TargetHandleList l_funcMCTargetList;
+ getAllChiplets(l_funcMCTargetList, TYPE_MC, true );
+ l_funcTargetList.insert(l_funcTargetList.begin(),
+ l_funcMCTargetList.begin(),
+ l_funcMCTargetList.end());
+
+// If VPO, dump targets (MC) for verification & debug purposes
+#ifdef CONFIG_VPO_COMPILE
+ HWAS_INF("invokePresentByAssoc(): MC targets:");
+ for (auto l_MC : l_funcMCTargetList)
+ {
+ HWAS_INF(" MC: HUID %.8x", TARGETING::get_huid(l_MC));
+ }
+#endif
+
+ // get the functional MIs (for Cumulus based systems)
+ TargetHandleList l_funcMITargetList;
+ getAllChiplets(l_funcMITargetList, TYPE_MI, true );
+ l_funcTargetList.insert(l_funcTargetList.begin(),
+ l_funcMITargetList.begin(),
+ l_funcMITargetList.end());
+
+// If VPO, dump targets (MI) for verification & debug purposes
+#ifdef CONFIG_VPO_COMPILE
+ HWAS_INF("invokePresentByAssoc(): MI targets:");
+ for (auto l_MI : l_funcMITargetList)
+ {
+ HWAS_INF(" MI: HUID %.8x", TARGETING::get_huid(l_MI));
+ }
+#endif
+
+ // get the functional DMIs (for Cumulus based systems)
+ TargetHandleList l_funcDMITargetList;
+ getAllChiplets(l_funcDMITargetList, TYPE_DMI, true );
+ l_funcTargetList.insert(l_funcTargetList.begin(),
+ l_funcDMITargetList.begin(),
+ l_funcDMITargetList.end());
+
+// If VPO, dump targets (DMI) for verification & debug purposes
+#ifdef CONFIG_VPO_COMPILE
+ HWAS_INF("invokePresentByAssoc(): MI targets:");
+ for (auto l_DMI : l_funcDMITargetList)
+ {
+ HWAS_INF(" DMI: HUID %.8x", TARGETING::get_huid(l_DMI));
+ }
+#endif
+
// get the functional membufs
- // note: do not expect membufs for NIMBUS direct memory attach
+ // note: do not expect membufs for NIMBUS
TargetHandleList l_funcMembufTargetList;
getAllChips(l_funcMembufTargetList, TYPE_MEMBUF, true );
l_funcTargetList.insert(l_funcTargetList.begin(),
@@ -2103,7 +2151,7 @@ void invokePresentByAssoc()
#endif
// get the functional mbas
- // note: do not expect mbas for NIMBUS direct memory attach
+ // note: do not expect mbas for NIMBUS
TargetHandleList l_funcMBATargetList;
getAllChiplets(l_funcMBATargetList, TYPE_MBA, true );
l_funcTargetList.insert(l_funcTargetList.begin(),
@@ -2191,27 +2239,33 @@ void presentByAssoc(TargetInfoVector& io_funcTargets,
// Sort entire vector by affinity path. This provides the algorithm with
// an ordered vector of targets, making it easy to check if:
- // for direct attach memory -
+ // for NIMBUS direct attach memory -
// MCS has child MCA
// MCA has child DIMM and parent MCS
// DIMM has parent MCA.
- // for non direct attach memory -
- // MCS has child MEMBUF
- // MEMBUF has parent MCS and child MBA
- // MBA has child DIMM and parnent MEMBUF
+ // for CUMULUS non direct attach memory -
+ // MC has child MI
+ // MI has parent MC and child DMI
+ // DMI has parent MI and child MEMBUF
+ // MEMBUF has parent DMI and child MBA
+ // MBA has parent MEMBUF and child DIMM
// DIMM has parent MBA.
std::sort(io_funcTargets.begin(), io_funcTargets.end(),
compareAffinity);
- // Keep track of the most recently seen MCS MEMBUF and MBA. This allows the
+ // Keep track of the most recently seen MCBIST, MCS & MCA for NIMBUS
+ // MC, MI, DMI, MEMBUF and MBA for CUMULUS. This allows the
// algorithm to quickly check if targets share a MCS or MEMBUF and used
// for backtracking after deleting a target from the vector
size_t l_MCBISTIndex = __INT_MAX__;
size_t l_MCSIndex = __INT_MAX__;
- size_t l_MEMBUFIndex = __INT_MAX__;
- size_t l_MBAIndex = __INT_MAX__;
size_t l_MCAIndex = __INT_MAX__;
+ size_t l_MCIndex = __INT_MAX__;
+ size_t l_MIIndex = __INT_MAX__;
+ size_t l_DMIIndex = __INT_MAX__;
+ size_t l_MEMBUFIndex = __INT_MAX__;
+ size_t l_MBAIndex = __INT_MAX__;
size_t i = 0;
// Perform presentByAssoc algorithm
@@ -2237,7 +2291,7 @@ void presentByAssoc(TargetInfoVector& io_funcTargets,
switch (l_curTargetInfo.type)
{
- case TYPE_MCBIST:
+ case TYPE_MCBIST: //NIMBUS
{
// No Child MCSs
// If next is not a MCS sharing the same MCAs, deconfig MCBIST
@@ -2268,18 +2322,18 @@ void presentByAssoc(TargetInfoVector& io_funcTargets,
}
break;
}// MCBIST
- case TYPE_MCS:
+
+ case TYPE_MCS: //NIMBUS
{
- // No Child MEMBUFs or MCAs
- // If next is not a MEMBUF or MCA sharing the same MCS, deconfig MCS
+ // No Child MCAs
+ // If next is not an MCA sharing the same MCS, deconfig MCS
if ( (l_nextTargetInfo == NULL) ||
- ( (l_nextTargetInfo->type != TYPE_MEMBUF) &&
- (l_nextTargetInfo->type != TYPE_MCA) ) ||
+ (l_nextTargetInfo->type != TYPE_MCA) ||
!isSameSubPath(l_curTargetInfo, *l_nextTargetInfo) )
{
- // Disable MCS - NO_CHILD_MEMBUF_OR_MCA
+ // Disable MCS - NO_CHILD_MCA
l_curTargetInfo.reason =
- DeconfigGard::DECONFIGURED_BY_NO_CHILD_MEMBUF_OR_MCA;
+ DeconfigGard::DECONFIGURED_BY_NO_CHILD_MCA;
}
// No Parent MCBIST
@@ -2319,7 +2373,143 @@ void presentByAssoc(TargetInfoVector& io_funcTargets,
break;
} // MCS
- case TYPE_MEMBUF:
+ case TYPE_MC: //CUMULUS
+ {
+ // No Child MIs
+ // If next is not a MI sharing the same MC, deconfig MC
+ if ( (l_nextTargetInfo == NULL) ||
+ (l_nextTargetInfo->type != TYPE_MI) ||
+ !isSameSubPath(l_curTargetInfo, *l_nextTargetInfo) )
+ {
+ // Disable MC - NO_CHILD_MI
+ l_curTargetInfo.reason =
+ DeconfigGard::DECONFIGURED_BY_NO_CHILD_MI;
+ // Add target to Deconfig vector to be deconfigured later
+ o_targToDeconfig.push_back(l_curTargetInfo);
+ // Remove target from funcTargets
+ io_funcTargets.erase(it);
+
+ //Just erased current MC, so MI/DMI index invalid
+ l_MIIndex = __INT_MAX__;
+ l_DMIIndex = __INT_MAX__;
+ }
+ // Update MC Index
+ else
+ {
+ l_MCIndex = i;
+ l_MIIndex = __INT_MAX__; //New MC,so MI index invalid
+ l_DMIIndex = __INT_MAX__; //New MC,so DMI index invalid
+ i++;
+ continue;
+ }
+ break;
+ }// MC
+
+ case TYPE_MI: //CUMULUS
+ {
+ // No Child DMIs
+ // If next is not a DMI sharing the same MI, deconfig MI
+ if ( (l_nextTargetInfo == NULL) ||
+ ( l_nextTargetInfo->type != TYPE_DMI) ||
+ !isSameSubPath(l_curTargetInfo, *l_nextTargetInfo) )
+ {
+ // Disable MI - NO_CHILD_DMI
+ l_curTargetInfo.reason =
+ DeconfigGard::DECONFIGURED_BY_NO_CHILD_DMI;
+
+ }
+ // No Parent MC
+ // If MI doesn't share the same MC as MIIndex, deconfig MI
+ else if ( (l_MCIndex == __INT_MAX__) ||
+ !isSameSubPath(l_curTargetInfo, io_funcTargets[l_MCIndex]))
+ {
+ // Disable MI - NO_PARENT_MC
+ l_curTargetInfo.reason =
+ DeconfigGard::DECONFIGURED_BY_NO_PARENT_MC;
+ }
+ // Update MI Index
+ else
+ {
+ l_MIIndex = i;
+ l_DMIIndex = __INT_MAX__; //New MI, so DMI index invalid
+ i++;
+ continue;
+ }
+ // Add target to Deconfig vector to be deconfigured later
+ o_targToDeconfig.push_back(l_curTargetInfo);
+ // Remove target from funcTargets
+ io_funcTargets.erase(it);
+
+ // Backtrack to last MC
+ if ( l_MCIndex != __INT_MAX__ )
+ {
+ i = l_MCIndex;
+ l_MIIndex = __INT_MAX__; //New MC, MI index invalid
+ l_DMIIndex = __INT_MAX__; //New MC, DMI index invalid
+ }
+ // Backtrack to beginning if no MC has been seen yet
+ else
+ {
+ i = 0;
+ }
+ break;
+ } // MI
+
+ case TYPE_DMI: //CUMULUS
+ {
+ // No Child MEMBUFs
+ // If next is not a MEMBUF sharing the same DMI, deconfig DMI
+ if ( (l_nextTargetInfo == NULL) ||
+ ( l_nextTargetInfo->type != TYPE_MEMBUF) ||
+ !isSameSubPath(l_curTargetInfo, *l_nextTargetInfo) )
+ {
+ // Disable DMI - NO_CHILD_MEMBUF
+ l_curTargetInfo.reason =
+ DeconfigGard::DECONFIGURED_BY_NO_CHILD_MEMBUF;
+
+ }
+ // No Parent MI
+ // If DMI doesn't share the same MI as DMIIndex, deconfig DMI
+ else if ( (l_MIIndex == __INT_MAX__) ||
+ !isSameSubPath(l_curTargetInfo, io_funcTargets[l_MIIndex]))
+ {
+ // Disable DMI - NO_PARENT_MI
+ l_curTargetInfo.reason =
+ DeconfigGard::DECONFIGURED_BY_NO_PARENT_MI;
+ }
+ // Update DMI Index
+ else
+ {
+ l_DMIIndex = i;
+ i++;
+ continue;
+ }
+ // Add target to Deconfig vector to be deconfigured later
+ o_targToDeconfig.push_back(l_curTargetInfo);
+ // Remove target from funcTargets
+ io_funcTargets.erase(it);
+
+ // Backtrack to last MI
+ if ( l_MIIndex != __INT_MAX__ )
+ {
+ i = l_MIIndex;
+ l_DMIIndex = __INT_MAX__; //New MI, DMI index invalid
+ }
+ //Backtrack to last MC, if no MI has been seen yet
+ else if ( l_MCIndex != __INT_MAX__ )
+ {
+ i = l_MCIndex;
+ l_DMIIndex = __INT_MAX__; //New MC, DMI index invalid
+ }
+ // Backtrack to beginning if no MI has been seen yet
+ else
+ {
+ i = 0;
+ }
+ break;
+ } // DMI
+
+ case TYPE_MEMBUF: // CUMULUS
{
// No Child MBAs
// If next is not a MBA sharing the same MEMBUF, deconfig MEMBUF
@@ -2331,14 +2521,15 @@ void presentByAssoc(TargetInfoVector& io_funcTargets,
l_curTargetInfo.reason =
DeconfigGard::DECONFIGURED_BY_NO_CHILD_MBA;
}
- // No Parent MCS
- // If MEMBUF doesn't share the same MCS as MCSIndex, deconfig MEMBUF
- else if ( (l_MCSIndex == __INT_MAX__) ||
- !isSameSubPath(l_curTargetInfo, io_funcTargets[l_MCSIndex]))
+ // No Parent DMI (CUMULUS)
+ // If MEMBUF doesn't share the same same DMI as DMIIndex (for CUMULUS),
+ // deconfig MEMBUF
+ else if ((l_DMIIndex == __INT_MAX__) ||
+ !isSameSubPath(l_curTargetInfo, io_funcTargets[l_DMIIndex]))
{
- // Disable MEMBUF - NO_PARENT_MCS
+ // Disable MEMBUF - NO_PARENT_MCS_OR_DMI
l_curTargetInfo.reason =
- DeconfigGard::DECONFIGURED_BY_NO_PARENT_MCS;
+ DeconfigGard::DECONFIGURED_BY_NO_PARENT_DMI;
}
// Update MEMBUF Index
else
@@ -2353,12 +2544,23 @@ void presentByAssoc(TargetInfoVector& io_funcTargets,
// Remove target from funcTargets
io_funcTargets.erase(it);
- // Backtrack to last MCS
- if ( l_MCSIndex != __INT_MAX__ )
+ //Backtrack to last DMI (CUMULUS), if no MEMBUF has been seen yet
+ if ( l_DMIIndex != __INT_MAX__ )
{
- i = l_MCSIndex;
+ i = l_DMIIndex;
}
- // Backtrack to beginning if no MCS has been seen yet
+ //Backtrack to last MI (CUMULUS), if no DMI has been seen yet
+ else if ( l_MIIndex != __INT_MAX__ )
+ {
+ i = l_MIIndex;
+ }
+ //Backtrack to last MC (CUMULUS), if no MI has been seen yet
+ else if ( l_MCIndex != __INT_MAX__ )
+ {
+ i = l_MCIndex;
+ }
+ // Backtrack to beginning if no MCS (NIMBUS) or DMI (CUMULUS)
+ // has been seen yet
else
{
i = 0;
@@ -2366,7 +2568,7 @@ void presentByAssoc(TargetInfoVector& io_funcTargets,
break;
} // MEMBUF
- case TYPE_MBA:
+ case TYPE_MBA: //CUMULUS
{
// No Child DIMMs
// If next is not a DIMM sharing the same MBA, deconfig MBA
@@ -2405,12 +2607,22 @@ void presentByAssoc(TargetInfoVector& io_funcTargets,
{
i = l_MEMBUFIndex;
}
- // Backtrack to last MCS if no MEMBUF has been seen yet
- else if ( l_MCSIndex != __INT_MAX__)
+ //Backtrack to last DMI (CUMULUS), if no MEMBUF has been seen yet
+ else if ( l_DMIIndex != __INT_MAX__ )
{
- i = l_MCSIndex;
+ i = l_DMIIndex;
}
- // Backtrack to beginning if no MCS has been seen yet
+ //Backtrack to last MI (CUMULUS), if no DMI has been seen yet
+ else if ( l_MIIndex != __INT_MAX__ )
+ {
+ i = l_MIIndex;
+ }
+ //Backtrack to last MC (CUMULUS), if no MI has been seen yet
+ else if ( l_MCIndex != __INT_MAX__ )
+ {
+ i = l_MCIndex;
+ }
+ // Backtrack to beginning
else
{
i = 0;
@@ -2495,26 +2707,41 @@ void presentByAssoc(TargetInfoVector& io_funcTargets,
{
i = l_MBAIndex;
}
- // Backtrack to last MCA
+ // Backtrack to last MCA (NIMBUS)
else if ( l_MCAIndex != __INT_MAX__)
{
i = l_MCAIndex;
}
- // Backtrack to last MEMBUF if no MBA has been seen yet
- else if ( l_MEMBUFIndex != __INT_MAX__)
- {
- i = l_MEMBUFIndex;
- }
- // Backtrack to last MCS if no MEMBUF has been seen yet
+ // Backtrack to last MCS (NIMBUS) if no MCA has been seen yet
else if ( l_MCSIndex != __INT_MAX__)
{
i = l_MCSIndex;
}
- // Backtrack to last MCS if no MEMBUF has been seen yet
+ // Backtrack to last MCBIST (NIMBUS) if no MCS has been seen yet
else if ( l_MCBISTIndex != __INT_MAX__)
{
i = l_MCBISTIndex;
}
+ // Backtrack to last MEMBUF (CUMULUS) if no MBA has been seen yet
+ else if ( l_MEMBUFIndex != __INT_MAX__)
+ {
+ i = l_MEMBUFIndex;
+ }
+ //Backtrack to last DMI (CUMULUS),if no MEMBUF has been seen yet
+ else if ( l_DMIIndex != __INT_MAX__ )
+ {
+ i = l_DMIIndex;
+ }
+ //Backtrack to last MI (CUMULUS), if no DMI has been seen yet
+ else if ( l_MIIndex != __INT_MAX__ )
+ {
+ i = l_MIIndex;
+ }
+ //Backtrack to last MC (CUMULUS), if no MI has been seen yet
+ else if ( l_MCIndex != __INT_MAX__ )
+ {
+ i = l_MCIndex;
+ }
// Backtrack to beginning if no MCS has been seen yet
else
{
OpenPOWER on IntegriCloud