Skip to content

Commit

Permalink
PRD: Ban TPS on a rank after first mainline UE
Browse files Browse the repository at this point in the history
Change-Id: I225ab5b7ba8f6d74406ded26786e926083e95f67
CQ: SW404330
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48263
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48345
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>
  • Loading branch information
cnpalmer authored and zane131 committed Oct 15, 2017
1 parent 387febc commit 83ca368
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 17 deletions.
3 changes: 3 additions & 0 deletions src/usr/diag/prdf/common/plat/mem/prdfP9McaDataBundle.H
Expand Up @@ -199,6 +199,9 @@ class McaDataBundle : public DataBundle
* scrubbing is resumed. */
bool iv_maskMainlineNceTce = false;

/** Map to keep track of ranks that have banned TPS. */
std::map<MemRank, bool> iv_tpsBans;

#endif
};

Expand Down
8 changes: 6 additions & 2 deletions src/usr/diag/prdf/plat/mem/prdfMemTps.H
Expand Up @@ -54,7 +54,7 @@ class TpsEvent : public TdEntry
* @param i_ban True to ban all subsequent requests for TPS on this rank.
*/
TpsEvent<T>( ExtensibleChip * i_chip, MemRank i_rank, bool i_ban = false ) :
TdEntry(TPS_EVENT, i_chip, i_rank)
TdEntry(TPS_EVENT, i_chip, i_rank), iv_ban(i_ban)
{
PRDF_ASSERT( nullptr != i_chip );
PRDF_ASSERT( T == i_chip->getType() );
Expand Down Expand Up @@ -136,9 +136,13 @@ class TpsEvent : public TdEntry
*/
uint32_t analyzeCe( STEP_CODE_DATA_STRUCT & io_sc );


#endif // __HOSTBOOT_RUNTIME


private: // instance variables

/** True to ban all subsequent requests for TPS on this rank. */
bool iv_ban = false;
};

} // end namespace PRDF
Expand Down
48 changes: 33 additions & 15 deletions src/usr/diag/prdf/plat/mem/prdfMemTps_rt.C
Expand Up @@ -349,6 +349,14 @@ uint32_t TpsEvent<T>::analyzeTpsPhase1_rt( STEP_CODE_DATA_STRUCT & io_sc,
// At this point, we are done with the procedure.
o_done = true;

// If iv_ban is true, then ban TPS on this rank.
if ( iv_ban )
{
// It doesn't matter what we set the value to, we just need to
// make sure the rank exists in the map.
getMcaDataBundle(iv_chip)->iv_tpsBans[iv_rank] = true;
}

// Since TPS is complete, clear the CE table for this slave rank.
getMcaDataBundle(iv_chip)->iv_ceTable.deactivateRank( iv_rank );

Expand Down Expand Up @@ -1116,25 +1124,35 @@ uint32_t TpsEvent<TYPE_MCA>::nextStep( STEP_CODE_DATA_STRUCT & io_sc,

o_done = false;

switch ( iv_phase )
do
{
case TD_PHASE_0:
// Start TPS phase 1
o_rc = startTpsPhase1_rt( io_sc );
break;
case TD_PHASE_1:
// Analyze TPS phase 1
o_rc = analyzeTpsPhase1_rt( io_sc, o_done );
// Check if TPS is banned on this rank.
if ( 1 == getMcaDataBundle(iv_chip)->iv_tpsBans.count(iv_rank) )
{
// If TPS is banned, abort the procedure.
o_done = true;
break;
default: PRDF_ASSERT( false ); // invalid phase
}

}
switch ( iv_phase )
{
case TD_PHASE_0:
// Start TPS phase 1
o_rc = startTpsPhase1_rt( io_sc );
break;
case TD_PHASE_1:
// Analyze TPS phase 1
o_rc = analyzeTpsPhase1_rt( io_sc, o_done );
break;
default: PRDF_ASSERT( false ); // invalid phase
}

if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "TPS failed: 0x%08x,0x%02x", iv_chip->getHuid(),
getKey() );
}
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "TPS failed: 0x%08x,0x%02x", iv_chip->getHuid(),
getKey() );
}
}while(0);

return o_rc;

Expand Down

0 comments on commit 83ca368

Please sign in to comment.