summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2014-03-04 17:42:07 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-03-20 16:58:41 -0500
commita5a132a1c27b5fae0ad5a3c5aaa25d7f4cecd701 (patch)
treec26a092d7f095f8d3824fd51d1dbb36ba27d3970 /src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C
parent4a1c826da12ff99c5f078d7ed13a82aea51659ce (diff)
downloadtalos-hostboot-a5a132a1c27b5fae0ad5a3c5aaa25d7f4cecd701.tar.gz
talos-hostboot-a5a132a1c27b5fae0ad5a3c5aaa25d7f4cecd701.zip
PRD: Added callout support for ECC errors on spare DRAMs
Change-Id: Ibdacb838430469463d4f68d7c5965b3b0356120c Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9301 Tested-by: Jenkins Server Reviewed-by: Christopher T. Phan <cphan@us.ibm.com> Reviewed-by: Bilicon Patil <bilpatil@in.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: BENJAMIN J. WEISENBECK <bweisenb@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9473
Diffstat (limited to 'src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C')
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C66
1 files changed, 51 insertions, 15 deletions
diff --git a/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C b/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C
index f79f197b7..0288031b1 100755
--- a/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C
+++ b/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C
@@ -413,23 +413,55 @@ int32_t mssGetMarkStore( TargetHandle_t i_mba, const CenRank & i_rank,
int32_t o_rc = SUCCESS;
- errlHndl_t errl = NULL;
+ do
+ {
+ errlHndl_t errl = NULL;
+ uint8_t symbolMark, chipMark;
+ PRD_FAPI_TO_ERRL( errl, mss_get_mark_store, getFapiTarget(i_mba),
+ i_rank.getMaster(), symbolMark, chipMark );
- uint8_t symbolMark, chipMark;
- PRD_FAPI_TO_ERRL( errl, mss_get_mark_store, getFapiTarget(i_mba),
- i_rank.getMaster(), symbolMark, chipMark );
+ if ( NULL != errl )
+ {
+ PRDF_ERR( PRDF_FUNC"mss_get_mark_store() failed. HUID: 0x%08x "
+ "rank: %d", getHuid(i_mba), i_rank.getMaster() );
+ PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT );
+ o_rc = FAIL; break;
+ }
- if ( NULL != errl )
- {
- PRDF_ERR( PRDF_FUNC"mss_get_mark_store() failed. HUID: 0x%08x rank: %d",
- getHuid(i_mba), i_rank.getMaster() );
- PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT );
- o_rc = FAIL;
- }
- else
- {
- o_mark = CenMark( i_mba, i_rank, symbolMark, chipMark );
- }
+ CenSymbol sm = CenSymbol::fromSymbol( i_mba, i_rank, symbolMark );
+ CenSymbol cm = CenSymbol::fromSymbol( i_mba, i_rank, chipMark );
+
+ // Check if the chip or symbol mark are on any of the spares.
+ CenSymbol sp0, sp1, ecc;
+ o_rc = mssGetSteerMux( i_mba, i_rank, sp0, sp1, ecc );
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC"mssGetSteerMux() failed. HUID: 0x%08x "
+ "rank: %d", getHuid(i_mba), i_rank.getMaster() );
+ break;
+ }
+
+ if ( sp0.isValid() )
+ {
+ if ( sp0.getDram() == sm.getDram() ) sm.setDramSpared();
+ if ( sp0.getDram() == cm.getDram() ) cm.setDramSpared();
+ }
+
+ if ( sp1.isValid() )
+ {
+ if ( sp1.getDram() == sm.getDram() ) sm.setDramSpared();
+ if ( sp1.getDram() == cm.getDram() ) cm.setDramSpared();
+ }
+
+ if ( ecc.isValid() )
+ {
+ if ( ecc.getDram() == sm.getDram() ) sm.setEccSpared();
+ if ( ecc.getDram() == cm.getDram() ) cm.setEccSpared();
+ }
+
+ o_mark = CenMark( sm, cm );
+
+ } while (0);
return o_rc;
@@ -519,6 +551,10 @@ int32_t mssGetSteerMux( TargetHandle_t i_mba, const CenRank & i_rank,
o_port0Spare = CenSymbol::fromSymbol( i_mba, i_rank, port0Spare );
o_port1Spare = CenSymbol::fromSymbol( i_mba, i_rank, port1Spare );
o_eccSpare = CenSymbol::fromSymbol( i_mba, i_rank, eccSpare );
+
+ if ( o_port0Spare.isValid() ) o_port0Spare.setDramSpared();
+ if ( o_port1Spare.isValid() ) o_port1Spare.setDramSpared();
+ if ( o_eccSpare.isValid() ) o_eccSpare.setEccSpared();
}
return o_rc;
OpenPOWER on IntegriCloud