summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2018-05-17 10:32:52 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2018-05-23 15:11:38 -0400
commitc7867f1449a1434338c2513c90b4a40438fa94d2 (patch)
tree23580546c9c6c033fff6184e06eb79ace68406b6 /src/usr/diag/prdf/common
parentaa0df6e89b162c23dba8ae758bbb31badf2eb1cb (diff)
downloadtalos-hostboot-c7867f1449a1434338c2513c90b4a40438fa94d2.tar.gz
talos-hostboot-c7867f1449a1434338c2513c90b4a40438fa94d2.zip
PRD: flush CE and RCE tables when a TD procedure is complete
Change-Id: I38cd427015efae87396189420c23f9549eec3db5 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59116 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: Matt Derksen <mderkse1@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/59232 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/common')
-rw-r--r--src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.C11
-rw-r--r--src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.H5
-rw-r--r--src/usr/diag/prdf/common/plat/mem/prdfMemDbUtils.H28
-rw-r--r--src/usr/diag/prdf/common/plat/mem/prdfMemRceTable.C14
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/mem/prdfMemRceTable.H3
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.C45
6 files changed, 51 insertions, 55 deletions
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.C b/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.C
index 493c45280..652f27dc6 100644
--- a/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.C
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2017 */
+/* Contributors Listed Below - COPYRIGHT 2013,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -167,15 +167,20 @@ uint32_t MemCeTable<T>::addEntry( const MemAddr & i_addr,
//------------------------------------------------------------------------------
template <TARGETING::TYPE T>
-void MemCeTable<T>::deactivateRank( const MemRank & i_rank )
+void MemCeTable<T>::deactivateRank( const MemRank & i_rank,
+ AddrRangeType i_type )
{
// NOTE: We don't want to reset the count here because it will be used for
// FFDC. Instead the count will be reset in addEntry() if the entry is
// not active.
for ( auto & entry : iv_table )
{
- if ( entry.addr.getRank() == i_rank )
+ if ( ( (SLAVE_RANK == i_type) && (entry.addr.getRank() == i_rank) ) ||
+ ( (MASTER_RANK == i_type) &&
+ (entry.addr.getRank().getMaster() == i_rank.getMaster()) ) )
+ {
entry.active = false;
+ }
}
}
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.H b/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.H
index 0f21ff457..b0fd50520 100644
--- a/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.H
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2017 */
+/* Contributors Listed Below - COPYRIGHT 2013,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -114,8 +114,9 @@ class MemCeTable
/**
* @brief Deactivates all entries covered by a rank.
* @param i_rank The target rank.
+ * @param i_type See enum AddrRangeType.
*/
- void deactivateRank( const MemRank & i_rank );
+ void deactivateRank( const MemRank & i_rank, AddrRangeType i_type );
/**
* @brief Gathers all table data to be stored in capture data.
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemDbUtils.H b/src/usr/diag/prdf/common/plat/mem/prdfMemDbUtils.H
index 9028dec8e..5bc67e60c 100644
--- a/src/usr/diag/prdf/common/plat/mem/prdfMemDbUtils.H
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemDbUtils.H
@@ -98,6 +98,34 @@ void addUeTableEntry<TARGETING::TYPE_MBA>( ExtensibleChip * i_chip,
getMbaDataBundle(i_chip)->iv_ueTable.addEntry( i_type, i_addr );
}
+/**
+ * @brief Generic wrapper to reset ECC FFDC for a rank.
+ * @param i_chip MCA or MBA.
+ * @param i_rank Target rank.
+ * @param i_type See enum AddrRangeType.
+ * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
+ */
+template<TARGETING::TYPE T>
+void resetEccFfdc( ExtensibleChip * i_chip, const MemRank & i_rank,
+ AddrRangeType i_type );
+
+template<> inline
+void resetEccFfdc<TARGETING::TYPE_MCA>( ExtensibleChip * i_chip,
+ const MemRank & i_rank,
+ AddrRangeType i_type )
+{
+ getMcaDataBundle(i_chip)->iv_ceTable.deactivateRank( i_rank, i_type );
+}
+
+template<> inline
+void resetEccFfdc<TARGETING::TYPE_MBA>( ExtensibleChip * i_chip,
+ const MemRank & i_rank,
+ AddrRangeType i_type )
+{
+ getMbaDataBundle(i_chip)->iv_ceTable.deactivateRank( i_rank, i_type );
+ getMbaDataBundle(i_chip)->iv_rceTable.flushEntry( i_rank, i_type );
+}
+
//##############################################################################
// Hostboot IPL/Runtime wrappers
//##############################################################################
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemRceTable.C b/src/usr/diag/prdf/common/plat/mem/prdfMemRceTable.C
index 9655db669..344a40722 100644
--- a/src/usr/diag/prdf/common/plat/mem/prdfMemRceTable.C
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemRceTable.C
@@ -63,11 +63,17 @@ bool MemRceTable::addEntry( const MemRank & i_rank,
//------------------------------------------------------------------------------
-void MemRceTable::flushEntry( const MemRank & i_rank )
+void MemRceTable::flushEntry( const MemRank & i_rank, AddrRangeType i_type )
{
- RceTable::iterator it = iv_table.find( i_rank );
- if ( iv_table.end() != it )
- it->second.reset();
+ for ( auto & entry : iv_table )
+ {
+ if ( ( (SLAVE_RANK == i_type) && (entry.first == i_rank) ) ||
+ ( (MASTER_RANK == i_type) &&
+ (entry.first.getMaster() == i_rank.getMaster()) ) )
+ {
+ entry.second.reset();
+ }
+ }
}
//------------------------------------------------------------------------------
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemRceTable.H b/src/usr/diag/prdf/common/plat/mem/prdfMemRceTable.H
index f475c38d4..5cebcdb68 100755
--- a/src/usr/diag/prdf/common/plat/mem/prdfMemRceTable.H
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemRceTable.H
@@ -79,8 +79,9 @@ class MemRceTable
/**
* @brief Flush entry covered by a rank.
* @param i_rank The target rank.
+ * @param i_type See enum AddrRangeType.
*/
- void flushEntry( const MemRank & i_rank );
+ void flushEntry( const MemRank & i_rank, AddrRangeType i_type );
/**
* @brief Gathers all table data to be stored in capture data.
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.C
index 313f55f9f..88fd4dc00 100755
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.C
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.C
@@ -596,51 +596,6 @@ int32_t CenMbaTdCtlr::startTpsPhase1( STEP_CODE_DATA_STRUCT & io_sc )
//------------------------------------------------------------------------------
-int32_t CenMbaTdCtlr::handleTdComplete( STEP_CODE_DATA_STRUCT & io_sc )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::handleTdComplete] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- // A TD procedure has completed. Deactivate all entries in the CE table
- // for the rank that was just targeted. This must be done before finding
- // the next good rank so that iv_rank will contain the rank that was
- // just targeted. Also remove the entry from RCE table.
- CenMbaDataBundle * mbadb = getMbaDataBundle( iv_mbaChip );
- mbadb->iv_ceTable.deactivateRank( iv_rank );
- mbadb->iv_rceTable.flushEntry( iv_rank );
-
- // Clear out the mark, just in case. This is so we don't accidentally
- // callout this mark on another rank in an error path scenario.
- iv_mark = CenMark();
-
- // Remove TD request from the queue.
- o_rc = removeTdQueueEntry();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "removeTdQueueEntry() failed" );
- break;
- }
-
- // Move on to the next TD procedure or restart background scrubbing.
- o_rc = startNextTd( io_sc );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "startNextTd() failed" );
- break;
- }
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
int32_t CenMbaTdCtlr::addTdQueueEntryTPS( const CenRank & i_rank,
STEP_CODE_DATA_STRUCT & io_sc,
bool i_banTps )
OpenPOWER on IntegriCloud