summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/plat/mem
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2018-04-14 22:24:26 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2018-04-19 16:45:37 -0400
commiteb9479855310fb1897fd14294cbdfc9564bf3605 (patch)
tree6348365d6ad43dd3d30eaed82c10c2e51cdba836 /src/usr/diag/prdf/plat/mem
parent81c7d1cc28c7dc7a6b208165031aeab1f459fcbc (diff)
downloadtalos-hostboot-eb9479855310fb1897fd14294cbdfc9564bf3605.tar.gz
talos-hostboot-eb9479855310fb1897fd14294cbdfc9564bf3605.zip
PRD: Simplified use of pushToQueue() and handleTdEvent()
Change-Id: Iaaa137886feb30d034360e8a16a74e98b0aaece3 RTC: 188516 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/57234 Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Matt Derksen <mderkse1@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/57477 CI-Ready: Zane C. Shelley <zshelle@us.ibm.com> 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')
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.H44
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_ipl.C16
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C8
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemTps_ipl.C8
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfP9Mca.C8
5 files changed, 28 insertions, 56 deletions
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.H b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.H
index 3f3f354fc..06d4bef58 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.H
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.H
@@ -79,40 +79,32 @@ class MemTdCtlr
*/
uint32_t handleCmdComplete( STEP_CODE_DATA_STRUCT & io_sc );
+ /**
+ * @brief This only pushes a new TdEntry to the back of iv_queue.
+ * @post Fetch attentions must also call handleTdEvent() to trigger
+ * diagnostics, if not already in progress.
+ * @param i_entry The new TD queue entry.
+ */
+ void pushToQueue( TdEntry * i_entry ) { iv_queue.push(i_entry); }
+
+ #ifdef __HOSTBOOT_RUNTIME
/**
- * @brief Adds a new TD procedure to the queue.
- *
- * During runtime, this is used to process TD requests during analysis of
- * attentions other than the command complete attention (i.e. memory CEs
- * and UEs). If there isn't a current TD procedure in progress, this
- * function will stop background scrubbing and start this new procedure.
- * Otherwise, this new procedure is simply added to the queue.
- *
- * It is possible that some of the other attentions may occur during the IPL
- * after Hostboot has been flushed from the cache to system memory. At that
- * point we don't have time to complete a TD procedure. Therefore, the
- * requests will be ignored. Any chip marks placed during this time will be
- * redetected when the runtime TD controller is initialized.
+ * @brief This tells the TD controller there was a TdEntry added to the
+ * queue (via pushToQueue) because of a fetch attention and
+ * additional processing may be needed to start the next TD
+ * procedure. If there isn't a current TD procedure in progress,
+ * this function will stop background scrubbing and starts the first
+ * procedure in the queue.
*
- * During MemDiags, this will simply add a new procedure to the queue, since
- * we know a TD procedure will already be in progress when this is called.
+ * @pre A TdEntry must be added to the queue (via pushToQueue) before
+ * calling this function.
*
* @note Initializes the TD controller, if needed.
* @param io_sc The step code data struct.
- * @param i_entry The new TD queue entry.
* @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
*/
- uint32_t handleTdEvent( STEP_CODE_DATA_STRUCT & io_sc,
- TdEntry * i_entry );
-
- /**
- * @brief Pushes a new TdEntry to the back of iv_queue.
- * @param i_entry The new TD queue entry.
- */
- void pushToQueue( TdEntry * i_entry ) { iv_queue.push(i_entry); }
-
- #ifdef __HOSTBOOT_RUNTIME
+ uint32_t handleTdEvent( STEP_CODE_DATA_STRUCT & io_sc );
/**
* @brief Handles reset-reload or FO scenario.
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_ipl.C b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_ipl.C
index 7caba811b..1d25a9ecd 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_ipl.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_ipl.C
@@ -49,22 +49,6 @@ using namespace PlatServices;
//------------------------------------------------------------------------------
template <TARGETING::TYPE T>
-uint32_t MemTdCtlr<T>::handleTdEvent( STEP_CODE_DATA_STRUCT & io_sc,
- TdEntry * i_entry )
-{
- #define PRDF_FUNC "[MemTdCtlr::handleTdEvent] "
-
- // Add this entry to the queue.
- iv_queue.push( i_entry );
-
- return SUCCESS;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-template <TARGETING::TYPE T>
uint32_t MemTdCtlr<T>::initialize()
{
#define PRDF_FUNC "[MemTdCtlr::initialize] "
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
index f3693355e..a028f5b86 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr_rt.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2017 */
+/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -164,8 +164,7 @@ void __recaptureRegs<TYPE_MBA>( STEP_CODE_DATA_STRUCT & io_sc,
//------------------------------------------------------------------------------
template <TARGETING::TYPE T>
-uint32_t MemTdCtlr<T>::handleTdEvent( STEP_CODE_DATA_STRUCT & io_sc,
- TdEntry * i_entry )
+uint32_t MemTdCtlr<T>::handleTdEvent( STEP_CODE_DATA_STRUCT & io_sc )
{
#define PRDF_FUNC "[MemTdCtlr::handleTdEvent] "
@@ -182,9 +181,6 @@ uint32_t MemTdCtlr<T>::handleTdEvent( STEP_CODE_DATA_STRUCT & io_sc,
break;
}
- // Add this entry to the queue.
- iv_queue.push( i_entry );
-
// Don't interrupt a TD procedure if one is already in progress.
if ( nullptr != iv_curProcedure ) break;
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTps_ipl.C b/src/usr/diag/prdf/plat/mem/prdfMemTps_ipl.C
index da993d51e..993216f9f 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemTps_ipl.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemTps_ipl.C
@@ -26,6 +26,7 @@
/** @file prdfMemTps_ipl.C */
// Platform includes
+#include <prdfMemDbUtils.H>
#include <prdfMemEccAnalysis.H>
#include <prdfMemIplCeStats.H>
#include <prdfMemMark.H>
@@ -157,9 +158,10 @@ uint32_t TpsEvent<TYPE_MCA>::nextStep( STEP_CODE_DATA_STRUCT & io_sc,
chipMark.getSymbol() );
io_sc.service_data->SetCallout( memmru );
- //Add a VCM procedure to the queue
- MemEcc::addVcmEvent<TYPE_MCA, McaDataBundle *>(iv_chip, iv_rank,
- chipMark, io_sc);
+ // Add a VCM procedure to the queue.
+ TdEntry * entry = new VcmEvent<TYPE_MCA> { iv_chip, iv_rank,
+ chipMark };
+ MemDbUtils::pushToQueue<TYPE_MCA>( iv_chip, entry );
//Abort this procedure
o_done = true;
diff --git a/src/usr/diag/prdf/plat/mem/prdfP9Mca.C b/src/usr/diag/prdf/plat/mem/prdfP9Mca.C
index a08385e5c..7a5d10d64 100644
--- a/src/usr/diag/prdf/plat/mem/prdfP9Mca.C
+++ b/src/usr/diag/prdf/plat/mem/prdfP9Mca.C
@@ -29,15 +29,14 @@
#include <prdfPluginMap.H>
// Platform includes
+#include <prdfMemDbUtils.H>
#include <prdfMemEccAnalysis.H>
-#include <prdfP9McaDataBundle.H>
#include <prdfP9McbistDataBundle.H>
#include <prdfPlatServices.H>
#ifdef __HOSTBOOT_RUNTIME
#include <prdfMemTps.H>
#endif
-
using namespace TARGETING;
namespace PRDF
@@ -150,8 +149,6 @@ int32_t RcdParityError( ExtensibleChip * i_mcaChip,
{
io_sc.service_data->setServiceCall();
- McbistDataBundle * mcbdb = getMcbistDataBundle( mcbChip );
-
std::vector<MemRank> list;
getSlaveRanks<TYPE_MCA>( i_mcaChip->getTrgt(), list );
PRDF_ASSERT( !list.empty() ); // target configured with no ranks
@@ -159,7 +156,8 @@ int32_t RcdParityError( ExtensibleChip * i_mcaChip,
for ( auto & r : list )
{
TdEntry * entry = new TpsEvent<TYPE_MCA>( i_mcaChip, r );
- uint32_t rc = mcbdb->getTdCtlr()->handleTdEvent( io_sc, entry );
+ MemDbUtils::pushToQueue<TYPE_MCA>( i_mcaChip, entry );
+ uint32_t rc = MemDbUtils::handleTdEvent<TYPE_MCA>(i_mcaChip, io_sc);
if ( SUCCESS != rc )
{
PRDF_ERR( PRDF_FUNC "handleTdEvent() failed on 0x%08x",
OpenPOWER on IntegriCloud