summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/plat
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2017-06-23 17:08:20 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2017-06-30 14:47:51 -0400
commit7351357827bbfa5fa39fe7fe5e063080940e803a (patch)
tree22ea4804133f2faf7e4adbef0db8128b0f717ba0 /src/usr/diag/prdf/plat
parent2ea31dc4009102c57c94fcb87c1c781d5c613481 (diff)
downloadtalos-hostboot-7351357827bbfa5fa39fe7fe5e063080940e803a.tar.gz
talos-hostboot-7351357827bbfa5fa39fe7fe5e063080940e803a.zip
PRD: Bugs related to banning analysis in MNFG IPL CE Handling
Change-Id: I5a6aba740c775a71fef436f739047761d82fc62a CQ: SW394179 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42398 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@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/42631 Tested-by: Jenkins OP Build CI <op-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')
-rwxr-xr-xsrc/usr/diag/prdf/plat/mem/prdfMemIplCeStats.C129
-rwxr-xr-xsrc/usr/diag/prdf/plat/mem/prdfMemIplCeStats.H38
2 files changed, 83 insertions, 84 deletions
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemIplCeStats.C b/src/usr/diag/prdf/plat/mem/prdfMemIplCeStats.C
index d2227240d..12517c857 100755
--- a/src/usr/diag/prdf/plat/mem/prdfMemIplCeStats.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemIplCeStats.C
@@ -57,53 +57,51 @@ using namespace PARSERUTILS;
//------------------------------------------------------------------------------
template<>
-void MemIplCeStats<TYPE_MBA>::banAnalysis( const MemRank & i_rank )
+void MemIplCeStats<TYPE_MBA>::banAnalysis( uint8_t i_dimmSlct,
+ uint8_t i_portSlct )
{
- for ( uint8_t i = 0; i < MAX_PORT_PER_MBA; i++ )
- {
- HalfRankKey banKey = { i_rank, i };
- iv_bannedAnalysis[banKey] = true;
- }
+ PRDF_ASSERT( i_dimmSlct < MAX_DIMM_PER_PORT );
+ PRDF_ASSERT( i_portSlct < MAX_PORT_PER_MBA );
+
+ DimmKey banKey = { i_dimmSlct, i_portSlct };
+ iv_bannedAnalysis[banKey] = true;
}
//------------------------------------------------------------------------------
template<>
-void MemIplCeStats<TYPE_MCA>::banAnalysis( const MemRank & i_rank )
+void MemIplCeStats<TYPE_MCA>::banAnalysis( uint8_t i_dimmSlct,
+ uint8_t i_portSlct )
{
- for ( uint8_t i = 0; i < MAX_PORT_PER_MCBIST; i++ )
- {
- HalfRankKey banKey = { i_rank, i };
- iv_bannedAnalysis[banKey] = true;
- }
-}
+ PRDF_ASSERT( i_dimmSlct < MAX_DIMM_PER_PORT );
+ PRDF_ASSERT( 0 == i_portSlct );
+ DimmKey banKey = { i_dimmSlct, i_portSlct };
+ iv_bannedAnalysis[banKey] = true;
+}
//------------------------------------------------------------------------------
-template<TYPE T>
-int32_t MemIplCeStats<T>::banAnalysis( const MemRank & i_rank,
- uint8_t i_portSlct )
-{
- int32_t o_rc = SUCCESS;
- do
+template<>
+void MemIplCeStats<TYPE_MBA>::banAnalysis( uint8_t i_dimmSlct )
+{
+ // Two DIMMs per DIMM select on MBA.
+ for ( uint8_t ps = 0; ps < MAX_PORT_PER_MBA; ps++ )
{
- if ( i_portSlct >= MAX_PORT_PER_MBA )
- {
- PRDF_ERR("[banAnalysis] i_portSlct (0x%02x) is invalid",
- i_portSlct );
- o_rc = FAIL;
- break;
- }
-
- HalfRankKey banKey = { i_rank, i_portSlct };
- iv_bannedAnalysis[banKey] = true;
+ banAnalysis( i_dimmSlct, ps );
+ }
+}
- } while (0);
+//------------------------------------------------------------------------------
- return o_rc;
+template<>
+void MemIplCeStats<TYPE_MCA>::banAnalysis( uint8_t i_dimmSlct )
+{
+ // Only one DIMM per DIMM select on MCA.
+ banAnalysis( i_dimmSlct, 0 );
}
+
//------------------------------------------------------------------------------
template<TYPE T>
@@ -134,13 +132,8 @@ int32_t MemIplCeStats<T>::collectStats( const MemRank & i_stopRank )
uint8_t portSlct = symData[i].symbol.getPortSlct();
// Check if analysis is banned
- HalfRankKey banKey = { i_stopRank, portSlct };
-
- // Check if the rank has already been banned. Note that [] will
- // create an entry if one does not exist, so used find() instead to
- // check for existence in the map.
- if ( iv_bannedAnalysis.end() != iv_bannedAnalysis.find(banKey) )
- continue;
+ DimmKey banKey = { dimmSlct, portSlct };
+ if ( iv_bannedAnalysis[banKey] ) continue;
// Update iv_ceSymbols with the new symbol data.
SymbolKey symkey = { symData[i].symbol };
@@ -209,12 +202,8 @@ int32_t MemIplCeStats<T>::calloutHardCes( const MemRank & i_stopRank )
uint8_t portSlct = symData[i].symbol.getPortSlct();
// Check if analysis is banned.
- HalfRankKey banKey = { i_stopRank, portSlct };
-
- bool& isBanned = iv_bannedAnalysis[banKey];
-
- if ( isBanned )
- continue;
+ DimmKey banKey = { i_stopRank.getDimmSlct(), portSlct };
+ if ( iv_bannedAnalysis[banKey] ) continue;
// At this point a hard CE was found, callout the symbol.
MemoryMru memMru ( trgt, symData[i].symbol.getRank(),
@@ -238,11 +227,13 @@ int32_t MemIplCeStats<T>::calloutHardCes( const MemRank & i_stopRank )
0, PRDFSIG_MnfgIplHardCE, 0);
addMruAndCommitErrl( memMru, l_errl);
- // Ban the half rank.
- isBanned = true;
+ iv_bannedAnalysis[banKey] = true; // ban this DIMM
}
- }while(0);
+
+ } while (0);
+
return o_rc;
+
#undef PRDF_FUNC
}
@@ -259,13 +250,9 @@ bool MemIplCeStats<T>::calloutCePerDram()
dramIter != iv_dramMap.end(); dramIter++ )
{
// First, check if this half rank is banned from analysis
- HalfRankKey banKey = { dramIter->first.rank, dramIter->first.portSlct };
-
- // Check if the rank has already been banned. Note that [] will create
- // the entry if one does not exist, so used find() instead to check
- // for existence in the map.
- if ( iv_bannedAnalysis.end() != iv_bannedAnalysis.find(banKey) )
- continue;
+ DimmKey banKey = { dramIter->first.rank.getDimmSlct(),
+ dramIter->first.portSlct };
+ if ( iv_bannedAnalysis[banKey] ) continue;
// Get the CEs per DRAM threshold.
uint32_t dramTh = 1, junk0, junk1;
@@ -302,8 +289,8 @@ bool MemIplCeStats<T>::calloutCePerDram()
addMruAndCommitErrl( memMru, l_errl);
- // Ban the half rank.
- iv_bannedAnalysis[banKey] = true;
+ iv_bannedAnalysis[banKey] = true; // ban this DIMM
+
o_callOutsMade = true;
// Only one symbol needs to be called out, so exit on first
@@ -329,13 +316,9 @@ bool MemIplCeStats<T>::calloutCePerRank()
rankIter != iv_rankMap.end(); rankIter++ )
{
// First, check if this half rank is banned from analysis
- HalfRankKey banKey = { rankIter->first.rank, rankIter->first.portSlct };
-
- // Check if the rank has already been banned. Note that [] will create
- // the an entry if one does not exist, so used find() instead to check
- // for existence in the map.
- if ( iv_bannedAnalysis.end() != iv_bannedAnalysis.find(banKey) )
- continue;
+ DimmKey banKey = { rankIter->first.rank.getDimmSlct(),
+ rankIter->first.portSlct };
+ if ( iv_bannedAnalysis[banKey] ) continue;
// Get the CEs per rank threshold.
uint32_t junk0, rankTh, junk1;
@@ -371,8 +354,9 @@ bool MemIplCeStats<T>::calloutCePerRank()
0, PRDFSIG_MnfgIplRankCTE, 0);
addMruAndCommitErrl( memMru, l_errl);
- // Ban the half rank.
- iv_bannedAnalysis[banKey] = true;
+
+ iv_bannedAnalysis[banKey] = true; // ban this DIMM
+
o_callOutsMade = true;
// Only one symbol needs to be called out, so exit on first
@@ -398,13 +382,9 @@ bool MemIplCeStats<T>::calloutCePerDs()
dsIter != iv_dsMap.end(); dsIter++ )
{
// First, check if this half fimm select is banned from analysis
- HalfRankKey banKey = { dsIter->first.rank, dsIter->first.portSlct };
-
- // Check if the rank has already been banned. Note that [] will create
- // the an entry if one does not exist, so used find() instead to check
- // for existence in the map.
- if ( iv_bannedAnalysis.end() != iv_bannedAnalysis.find(banKey) )
- continue;
+ DimmKey banKey = { dsIter->first.rank.getDimmSlct(),
+ dsIter->first.portSlct };
+ if ( iv_bannedAnalysis[banKey] ) continue;
// Get the CEs per dimm select threshold.
uint32_t junk0, junk1, dsTh;
@@ -440,8 +420,9 @@ bool MemIplCeStats<T>::calloutCePerDs()
0, PRDFSIG_MnfgIplDsCTE, 0);
addMruAndCommitErrl( memMru, l_errl);
- // Ban the half dimm select.
- iv_bannedAnalysis[banKey] = true;
+
+ iv_bannedAnalysis[banKey] = true; // ban this DIMM
+
o_callOutsMade = true;
// Only one symbol needs to be called out, so exit on first
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemIplCeStats.H b/src/usr/diag/prdf/plat/mem/prdfMemIplCeStats.H
index 846df1669..09c632b49 100755
--- a/src/usr/diag/prdf/plat/mem/prdfMemIplCeStats.H
+++ b/src/usr/diag/prdf/plat/mem/prdfMemIplCeStats.H
@@ -65,18 +65,17 @@ class MemIplCeStats
~MemIplCeStats() {}
/**
- * @brief Bans analysis of the given rank.
- * @param i_rank The rank to ban.
+ * @brief Bans analysis of the given DIMM select.
+ * @param i_dimmSlct The DIMM select.
*/
- void banAnalysis( const MemRank & i_rank );
+ void banAnalysis( uint8_t i_dimmSlct );
/**
- * @brief Bans analysis of the given half rank (Only needed for centaur).
- * @param i_rank The rank.
- * @param i_portSlct The port select.
- * @return Non-SUCCESS if the parameters are invalid, SUCCESS otherwise.
+ * @brief Bans analysis of the given DIMM select and port select.
+ * @param i_dimmSlct The DIMM select.
+ * @param i_portSlct The port select.
*/
- int32_t banAnalysis( const MemRank & i_rank, uint8_t i_portSlct );
+ void banAnalysis( uint8_t i_dimmSlct, uint8_t i_portSlct );
/**
* @brief Will collect all the maintenance statistics and store them for
@@ -136,6 +135,25 @@ class MemIplCeStats
}
};
+ /** @brief The key to identify a DIMM. This key will be used to ban analysis
+ * on a DIMM after a DIMM has been called out. */
+ struct DimmKey
+ {
+ uint8_t dimmSlct; ///< The DIMM select
+ uint8_t portSlct; ///< The port select
+
+ /** @brief Overrides the '==' operator. */
+ bool operator==( const DimmKey & i ) const
+ { return ( (dimmSlct == i.dimmSlct) && (portSlct == i.portSlct) ); }
+
+ /** @brief Overrides the '<' operator. */
+ bool operator<( const DimmKey & i ) const
+ {
+ return ( (dimmSlct < i.dimmSlct) ||
+ ((dimmSlct == i.dimmSlct) && (portSlct < i.portSlct)) );
+ }
+ };
+
/** @brief The key type for each entry in iv_dramMap. */
struct DramKey
{
@@ -166,8 +184,8 @@ class MemIplCeStats
typedef std::map<HalfRankKey, uint32_t> CePerHalfDsMap;
// data type to collect all symbol statistics for a rank.
typedef std::map<HalfRankKey, uint32_t> CePerHalfRankMap;
- // data type to store banned half ranks on which analysis is not required.
- typedef std::map<HalfRankKey, bool> BannedAnalysisMap;
+ // data type to store banned DIMMs on which analysis is not required.
+ typedef std::map<DimmKey, bool> BannedAnalysisMap;
// data type to collect all symbol statistics for a dram.
typedef std::map<DramKey, uint32_t> CePerDramMap;
OpenPOWER on IntegriCloud