summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Palmer <cnpalmer@us.ibm.com>2017-01-31 15:58:05 -0600
committerZane C. Shelley <zshelle@us.ibm.com>2017-02-06 16:58:57 -0500
commitc0a19dc50ff60aedb7ebeb853dcb67c6de7ea44e (patch)
treec786219b8bc8422b90f4d0bf37d531d3f28dc449
parent181cf8de4b300935ce7a10a180200379dfcd354f (diff)
downloadtalos-hostboot-c0a19dc50ff60aedb7ebeb853dcb67c6de7ea44e.tar.gz
talos-hostboot-c0a19dc50ff60aedb7ebeb853dcb67c6de7ea44e.zip
MDIA: Update getMemTargetsForQueryOrClear for P9
Change-Id: I7da8a0ebcf4aebebd43e17aa26a9aa6e58670783 RTC: 168270 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35678 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> Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
-rw-r--r--src/usr/diag/mdia/mdiamba.C163
1 files changed, 97 insertions, 66 deletions
diff --git a/src/usr/diag/mdia/mdiamba.C b/src/usr/diag/mdia/mdiamba.C
index 564f1c1bc..4b39d9f70 100644
--- a/src/usr/diag/mdia/mdiamba.C
+++ b/src/usr/diag/mdia/mdiamba.C
@@ -71,7 +71,6 @@ errlHndl_t getDiagnosticMode(
o_mode = ONE_PATTERN;
}
-/* TODO RTC 168270
// Only need to check hw changed state attributes
// when not already set to exhaustive and not in simics
if(( NINE_PATTERNS != o_mode ) &&
@@ -82,7 +81,6 @@ errlHndl_t getDiagnosticMode(
o_mode = NINE_PATTERNS;
}
}
-*/
} while(0);
@@ -186,95 +184,128 @@ TargetHandleList getMemTargetsForQueryOrClear(
if( ! dimmList.empty() )
{
- o_list.insert(o_list.begin(), dimmList.begin(),
- dimmList.end());
+ o_list.insert(o_list.begin(), dimmList.begin(), dimmList.end());
}
- // add associated Centaur
- TargetHandleList targetList;
- getParentAffinityTargets(targetList,
- i_trgt,
- CLASS_CHIP,
- TYPE_MEMBUF);
+ TYPE trgtType = i_trgt->getAttr<ATTR_TYPE>();
- if( targetList.empty() )
+ // mcbist target
+ if ( TYPE_MCBIST == trgtType )
{
- MDIA_FAST(FUNC "no connected centaur "
- "for mba: %x", get_huid(i_trgt));
- break;
- }
+ // add associated MCBIST
+ o_list.push_back( i_trgt );
- TargetHandle_t centaur = targetList[0];
+ // add associated MCAs
+ TargetHandleList mcaList;
+ getChildAffinityTargets(mcaList, i_trgt, CLASS_UNIT, TYPE_MCA);
+
+ if ( !mcaList.empty() )
+ {
+ o_list.insert( o_list.end(), mcaList.begin(), mcaList.end() );
+ }
- // if query flag is not set, check to make sure
- // all of the dimms connected to this centaur
- // have cleared hw chagned state attributes
- // before adding this centaur/mcs to the list.
- // This is needed because we only clear
- // the centaur/mcs attribute when all of the
- // dimms' attributes from both mbas have cleared.
- if(false == i_queryOnly)
+ }
+ // MBA target
+ else
{
- targetList.clear();
- getChildAffinityTargets(targetList,
- centaur,
- CLASS_NA,
- TYPE_DIMM);
+ // add associated Centaur
+ TargetHandleList targetList;
+ getParentAffinityTargets(targetList,
+ i_trgt,
+ CLASS_CHIP,
+ TYPE_MEMBUF);
+
+ if( targetList.empty() )
+ {
+ MDIA_FAST(FUNC "no connected centaur "
+ "for mba: %x", get_huid(i_trgt));
+ break;
+ }
+
+ TargetHandle_t centaur = targetList[0];
- if( ! targetList.empty() )
+ // if query flag is not set, check to make sure
+ // all of the dimms connected to this centaur
+ // have cleared hw chagned state attributes
+ // before adding this centaur/mcs to the list.
+ // This is needed because we only clear
+ // the centaur/mcs attribute when all of the
+ // dimms' attributes from both mbas have cleared.
+ if(false == i_queryOnly)
{
- TargetHandleList::iterator target;
+ targetList.clear();
+ getChildAffinityTargets(targetList,
+ centaur,
+ CLASS_NA,
+ TYPE_DIMM);
- for(target = targetList.begin();
- target != targetList.end(); ++target)
+ if( ! targetList.empty() )
{
- // exclude dimms belong to the current mba
- // because their attributes will be cleared
- if(dimmList.end() !=
- std::find(dimmList.begin(),
- dimmList.end(), *target))
- {
- continue;
- }
+ TargetHandleList::iterator target;
- ATTR_HWAS_STATE_CHANGED_FLAG_type hwChangeFlag;
- hwChangeFlag =
- (*target)->getAttr<ATTR_HWAS_STATE_CHANGED_FLAG>();
-
- if(HWAS_CHANGED_BIT_MEMDIAG & hwChangeFlag)
+ for(target = targetList.begin();
+ target != targetList.end(); ++target)
{
- MDIA_FAST(FUNC "hwChangedState is not cleared "
- "for dimm: %x", get_huid(*target));
- centaur = NULL; // don't add centaur and mcs
- break;
+ // exclude dimms belong to the current mba
+ // because their attributes will be cleared
+ if(dimmList.end() !=
+ std::find(dimmList.begin(),
+ dimmList.end(), *target))
+ {
+ continue;
+ }
+
+ ATTR_HWAS_STATE_CHANGED_FLAG_type hwChangeFlag;
+ hwChangeFlag =
+ (*target)->getAttr<ATTR_HWAS_STATE_CHANGED_FLAG>();
+
+ if(HWAS_CHANGED_BIT_MEMDIAG & hwChangeFlag)
+ {
+ MDIA_FAST(FUNC "hwChangedState is not cleared "
+ "for dimm: %x", get_huid(*target));
+ centaur = NULL; // don't add centaur and mcs and mba
+ break;
+ }
}
}
}
- }
- if(NULL == centaur)
- {
- break;
- }
+ if(NULL == centaur)
+ {
+ break;
+ }
- o_list.push_back(centaur);
+ o_list.push_back(centaur);
- // get connected mcs target
- targetList.clear();
+ // get connected mcs target
+ targetList.clear();
- getParentAffinityTargets(targetList,
- centaur,
- CLASS_UNIT,
- TYPE_MCS);
+ getParentAffinityTargets(targetList,
+ centaur,
+ CLASS_UNIT,
+ TYPE_MCS);
+
+ if( !targetList.empty() )
+ {
+ o_list.push_back(targetList[0]);
+ }
+
+ // add associated MBAs
+ targetList.clear();
+
+ getChildAffinityTargets(targetList, i_trgt, CLASS_UNIT, TYPE_MBA);
+
+ if ( !targetList.empty() )
+ {
+ o_list.insert( o_list.end(), targetList.begin(),
+ targetList.end() );
+ }
- if( ! targetList.empty() )
- {
- o_list.push_back(targetList[0]);
}
} while(0);
- MDIA_DBG(FUNC "mba: %x, size: %d",
+ MDIA_DBG(FUNC "i_trgt HUID: %x, size: %d",
get_huid(i_trgt), o_list.size());
return o_list;
OpenPOWER on IntegriCloud