summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2017-07-24 13:26:11 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2017-07-27 12:19:01 -0400
commit0fd2495490d8f71ecd35aca2f85d7b33f0f26d8b (patch)
treeb8cfac94ba90764d4f42fdba551d2b5e55d8ebf5 /src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C
parent4c996c92d557b46280ba5cdd93f3d19a1a02efc3 (diff)
downloadtalos-hostboot-0fd2495490d8f71ecd35aca2f85d7b33f0f26d8b.tar.gz
talos-hostboot-0fd2495490d8f71ecd35aca2f85d7b33f0f26d8b.zip
PRD: handle nullptr returned from getConnectedChild()
Change-Id: I6af579583bbe3033df99d6ba2f6e57c7e79166a9 CQ: SW396395 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43556 Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43695 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C')
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C
index fbd3526c4..6454ed7fe 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C
@@ -384,9 +384,8 @@ uint32_t MemTdCtlr<TYPE_MCBIST>::maskEccAttns()
uint32_t o_rc = SUCCESS;
// Loop through all MCAs.
- for ( uint32_t ps = 0; ps < MAX_PORT_PER_MCBIST; ps++ )
+ for ( auto mcaChip : getConnected(iv_chip, TYPE_MCA) )
{
- ExtensibleChip * mcaChip = getConnectedChild( iv_chip, TYPE_MCA, ps );
SCAN_COMM_REGISTER_CLASS * mask =
mcaChip->getRegister( "MCAECCFIR_MASK_OR" );
@@ -421,9 +420,8 @@ uint32_t MemTdCtlr<TYPE_MCBIST>::unmaskEccAttns()
// thresholded so clear and unmask them as well.
// Loop through all MCAs.
- for ( uint32_t ps = 0; ps < MAX_PORT_PER_MCBIST; ps++ )
+ for ( auto mcaChip : getConnected(iv_chip, TYPE_MCA) )
{
- ExtensibleChip * mcaChip = getConnectedChild( iv_chip, TYPE_MCA, ps );
SCAN_COMM_REGISTER_CLASS * fir =
mcaChip->getRegister( "MCAECCFIR_AND" );
SCAN_COMM_REGISTER_CLASS * mask =
@@ -433,7 +431,7 @@ uint32_t MemTdCtlr<TYPE_MCBIST>::unmaskEccAttns()
// Don't clear the NCE and TCE attentions if specified to save the mask
// in the iv_saveEccMask array.
- if ( !iv_saveEccMask[ps] )
+ if ( !iv_saveEccMask[mcaChip->getPos()%MAX_PORT_PER_MCBIST] )
{
fir->ClearBit(8); mask->ClearBit(8); // Mainline read NCE
fir->ClearBit(9); mask->ClearBit(9); // Mainline read TCE
OpenPOWER on IntegriCloud