summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2013-08-21 17:41:19 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-09-18 13:55:11 -0500
commitd62e12b822f62d13127aa83f7f319eafa70c89d7 (patch)
treeec5c4bc49ef4d827786b25b28fdf3718aacd6737
parent420e5f6b79bca60cdb7b225da706cf847f6ef795 (diff)
downloadtalos-hostboot-d62e12b822f62d13127aa83f7f319eafa70c89d7.tar.gz
talos-hostboot-d62e12b822f62d13127aa83f7f319eafa70c89d7.zip
PRD: Add support for VCM triggers
Change-Id: I885d9ad19a044924d5be4716eff035debb15cc64 RTC: 73051 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5877 Tested-by: Jenkins Server Reviewed-by: Christopher T. Phan <cphan@us.ibm.com> Reviewed-by: Prem Shanker Jha <premjha2@in.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6228
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_common.H36
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C93
-rw-r--r--src/usr/diag/prdf/plat/pegasus/prdfCenMbaTdCtlr.C40
-rw-r--r--src/usr/diag/prdf/plat/pegasus/prdfCenMbaTdCtlr.H2
-rw-r--r--src/usr/diag/prdf/plat/pegasus/prdfPlatCenMembuf.C25
5 files changed, 139 insertions, 57 deletions
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_common.H b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_common.H
index 097928fc3..069747612 100644
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_common.H
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_common.H
@@ -49,6 +49,20 @@ class ExtensibleChip;
*/
class CenMbaTdCtlrCommon
{
+ public: // constants, enums
+
+ /**
+ * @brief This enum will be used to indicate type of TD event requested to
+ * be handled.
+ * @note The order of the enums values is important. It is used for
+ * sorting the TdQueue by event type priority.
+ */
+ enum TdType
+ {
+ VCM_EVENT = 0, ///< A Verify Chip Mark event.
+ TPS_EVENT, ///< A Two-Phase Scrub event.
+ };
+
protected: // constants, enums
/**
@@ -101,6 +115,28 @@ class CenMbaTdCtlrCommon
*/
virtual int32_t handleCmdCompleteEvent( STEP_CODE_DATA_STRUCT & io_sc ) = 0;
+ /**
+ * @brief Adds a TD procedure to the queue.
+ *
+ * TD events are only intended to be handled during FSP runtime, however, it
+ * is possible that a TD events could be triggered in Hostboot after it has
+ * been flushed from the cache to system memory. All requests to handle TD
+ * events during Hostboot will be ignored. Any chip marks placed at this
+ * time will be found when the FSP TD controller is initialized. The error
+ * log for the trigger will be committed and a trace statement will be made
+ * indicating which rank and TD procedure was requested.
+ *
+ * @param io_sc The step code data struct.
+ * @param i_rank The rank in which the event occurred.
+ * @param i_event The event type (see enum TdType).
+ * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
+ * @note If no TD procedures are in progress, it will stop background
+ * scrub and start the next TD procedure.
+ */
+ virtual int32_t handleTdEvent( STEP_CODE_DATA_STRUCT & io_sc,
+ const CenRank & i_rank,
+ const TdType i_event ) = 0;
+
protected: // functions
/**
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C
index a895f689f..32f55e715 100755
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C
@@ -39,6 +39,8 @@
#include <prdfCenAddress.H>
#include <prdfCenMarkstore.H>
#include <prdfCenMbaCaptureData.H>
+#include <prdfCenMbaDataBundle.H>
+#include <prdfCenMbaTdCtlr_common.H>
#include <prdfCenMembufDataBundle.H>
#include <prdfLaneRepair.H>
@@ -390,18 +392,17 @@ PRDF_PLUGIN_DEFINE( Membuf, checkSpareBit );
//##############################################################################
/**
- * @brief MBSECCFIR[0-7] - Fetch Mark Placed Event (MPE).
+ * @brief MBSECCFIR[0-7,20:27] - Fetch/Maintenance Mark Placed Event (MPE).
* @param i_membChip A Centaur chip.
* @param i_sc The step code data struct.
* @param i_mbaPos The MBA position.
* @param i_rank The target rank.
* @return SUCCESS
*/
-int32_t AnalyzeFetchMpe( ExtensibleChip * i_membChip,
- STEP_CODE_DATA_STRUCT & i_sc, uint32_t i_mbaPos,
- uint8_t i_rank )
+int32_t AnalyzeMpe( ExtensibleChip * i_membChip, STEP_CODE_DATA_STRUCT & i_sc,
+ uint32_t i_mbaPos, uint8_t i_rank, bool isFetchError )
{
- #define PRDF_FUNC "[AnalyzeFetchMpe] "
+ #define PRDF_FUNC "[AnalyzeMpe] "
int32_t l_rc = SUCCESS;
@@ -419,13 +420,24 @@ int32_t AnalyzeFetchMpe( ExtensibleChip * i_membChip,
mbaTrgt = mbaChip->GetChipHandle();
- // Get the current marks in hardware.
+ // Add address to UE table.
+ if ( isFetchError )
+ {
+ // TODO: RTC 81713 Add fetch address to UE table.
+ }
+ else
+ {
+ // TODO: RTC 81713 Add maintenance address to UE table.
+ }
+
+ // Get the current mark in hardware.
CenRank rank ( i_rank );
CenMark mark;
- if ( SUCCESS != mssGetMarkStore(mbaTrgt, rank, mark) )
+ l_rc = mssGetMarkStore( mbaTrgt, rank, mark );
+ if ( SUCCESS != l_rc )
{
PRDF_ERR( PRDF_FUNC"mssGetMarkStore() failed");
- l_rc = FAIL; break;
+ break;
}
if ( !mark.getCM().isValid() )
@@ -437,6 +449,16 @@ int32_t AnalyzeFetchMpe( ExtensibleChip * i_membChip,
// Callout the mark.
CalloutUtil::calloutMark( mbaTrgt, rank, mark, i_sc );
+ // Tell TD controller to handle VCM event.
+ CenMbaDataBundle * mbadb = getMbaDataBundle( mbaChip );
+ l_rc = mbadb->iv_tdCtlr.handleTdEvent( i_sc, rank,
+ CenMbaTdCtlrCommon::VCM_EVENT );
+ if ( SUCCESS != l_rc )
+ {
+ PRDF_ERR( PRDF_FUNC"handleTdEvent() failed." );
+ break;
+ }
+
} while (0);
// Add ECC capture data for FFDC.
@@ -674,33 +696,40 @@ PLUGIN_FETCH_ECC_ERROR( Ue, 1 )
#undef PLUGIN_FETCH_ECC_ERROR
// Define the plugins for memory MPE errors.
-#define PLUGIN_FETCH_MPE_ERROR( MBA, RANK ) \
+#define PLUGIN_MEMORY_MPE_ERROR( MBA, RANK ) \
int32_t AnalyzeFetchMpe##MBA##_##RANK( ExtensibleChip * i_membChip, \
- STEP_CODE_DATA_STRUCT & i_sc ) \
+ STEP_CODE_DATA_STRUCT & i_sc ) \
+{ \
+ return AnalyzeMpe( i_membChip, i_sc, MBA, RANK, true ); \
+} \
+PRDF_PLUGIN_DEFINE( Membuf, AnalyzeFetchMpe##MBA##_##RANK ); \
+\
+int32_t AnalyzeMaintMpe##MBA##_##RANK( ExtensibleChip * i_membChip, \
+ STEP_CODE_DATA_STRUCT & i_sc ) \
{ \
- return AnalyzeFetchMpe( i_membChip, i_sc, MBA, RANK ); \
+ return AnalyzeMpe( i_membChip, i_sc, MBA, RANK, false ); \
} \
-PRDF_PLUGIN_DEFINE( Membuf, AnalyzeFetchMpe##MBA##_##RANK );
-
-PLUGIN_FETCH_MPE_ERROR( 0, 0 )
-PLUGIN_FETCH_MPE_ERROR( 0, 1 )
-PLUGIN_FETCH_MPE_ERROR( 0, 2 )
-PLUGIN_FETCH_MPE_ERROR( 0, 3 )
-PLUGIN_FETCH_MPE_ERROR( 0, 4 )
-PLUGIN_FETCH_MPE_ERROR( 0, 5 )
-PLUGIN_FETCH_MPE_ERROR( 0, 6 )
-PLUGIN_FETCH_MPE_ERROR( 0, 7 )
-
-PLUGIN_FETCH_MPE_ERROR( 1, 0 )
-PLUGIN_FETCH_MPE_ERROR( 1, 1 )
-PLUGIN_FETCH_MPE_ERROR( 1, 2 )
-PLUGIN_FETCH_MPE_ERROR( 1, 3 )
-PLUGIN_FETCH_MPE_ERROR( 1, 4 )
-PLUGIN_FETCH_MPE_ERROR( 1, 5 )
-PLUGIN_FETCH_MPE_ERROR( 1, 6 )
-PLUGIN_FETCH_MPE_ERROR( 1, 7 )
-
-#undef PLUGIN_FETCH_MPE_ERROR
+PRDF_PLUGIN_DEFINE( Membuf, AnalyzeMaintMpe##MBA##_##RANK );
+
+PLUGIN_MEMORY_MPE_ERROR( 0, 0 )
+PLUGIN_MEMORY_MPE_ERROR( 0, 1 )
+PLUGIN_MEMORY_MPE_ERROR( 0, 2 )
+PLUGIN_MEMORY_MPE_ERROR( 0, 3 )
+PLUGIN_MEMORY_MPE_ERROR( 0, 4 )
+PLUGIN_MEMORY_MPE_ERROR( 0, 5 )
+PLUGIN_MEMORY_MPE_ERROR( 0, 6 )
+PLUGIN_MEMORY_MPE_ERROR( 0, 7 )
+
+PLUGIN_MEMORY_MPE_ERROR( 1, 0 )
+PLUGIN_MEMORY_MPE_ERROR( 1, 1 )
+PLUGIN_MEMORY_MPE_ERROR( 1, 2 )
+PLUGIN_MEMORY_MPE_ERROR( 1, 3 )
+PLUGIN_MEMORY_MPE_ERROR( 1, 4 )
+PLUGIN_MEMORY_MPE_ERROR( 1, 5 )
+PLUGIN_MEMORY_MPE_ERROR( 1, 6 )
+PLUGIN_MEMORY_MPE_ERROR( 1, 7 )
+
+#undef PLUGIN_MEMORY_MPE_ERROR
} // end namespace Membuf
diff --git a/src/usr/diag/prdf/plat/pegasus/prdfCenMbaTdCtlr.C b/src/usr/diag/prdf/plat/pegasus/prdfCenMbaTdCtlr.C
index aada91165..6fa4088ae 100644
--- a/src/usr/diag/prdf/plat/pegasus/prdfCenMbaTdCtlr.C
+++ b/src/usr/diag/prdf/plat/pegasus/prdfCenMbaTdCtlr.C
@@ -180,6 +180,46 @@ int32_t CenMbaTdCtlr::handleCmdCompleteEvent( STEP_CODE_DATA_STRUCT & io_sc )
}
//------------------------------------------------------------------------------
+
+int32_t CenMbaTdCtlr::handleTdEvent( STEP_CODE_DATA_STRUCT & io_sc,
+ const CenRank & i_rank,
+ const CenMbaTdCtlrCommon::TdType i_event )
+{
+ #define PRDF_FUNC "[CenMbaTdCtlr::handleTdEvent] "
+
+ int32_t o_rc = SUCCESS;
+
+ TargetHandle_t mba = iv_mbaChip->GetChipHandle();
+
+ do
+ {
+ o_rc = initialize();
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC"initialize() failed" );
+ break;
+ }
+
+ // This is a no-op in Hostboot. Instead, print a trace statement
+ // indicating the intended request.
+ PRDF_INF( PRDF_FUNC"TD request found during Hostboot: "
+ "iv_mbaChip=0x%08x i_rank=%d i_event=%d",
+ getHuid(mba), i_rank.flatten(), i_event );
+
+ } while(0);
+
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC"iv_mbaChip:0x%08x iv_initialized:%c iv_tdState:%d",
+ getHuid(mba), iv_initialized ? 'T' : 'F', iv_tdState );
+ }
+
+ return o_rc;
+
+ #undef PRDF_FUNC
+}
+
+//------------------------------------------------------------------------------
// Private Functions
//------------------------------------------------------------------------------
diff --git a/src/usr/diag/prdf/plat/pegasus/prdfCenMbaTdCtlr.H b/src/usr/diag/prdf/plat/pegasus/prdfCenMbaTdCtlr.H
index fd4ffd015..5b89663ad 100644
--- a/src/usr/diag/prdf/plat/pegasus/prdfCenMbaTdCtlr.H
+++ b/src/usr/diag/prdf/plat/pegasus/prdfCenMbaTdCtlr.H
@@ -62,6 +62,8 @@ class CenMbaTdCtlr : public CenMbaTdCtlrCommon
public: // Overloaded functions
int32_t handleCmdCompleteEvent( STEP_CODE_DATA_STRUCT & io_sc );
+ int32_t handleTdEvent( STEP_CODE_DATA_STRUCT & io_sc,
+ const CenRank & i_rank, const TdType i_event );
private: // Overloaded functions
diff --git a/src/usr/diag/prdf/plat/pegasus/prdfPlatCenMembuf.C b/src/usr/diag/prdf/plat/pegasus/prdfPlatCenMembuf.C
index 21c9b7a54..7639704cf 100644
--- a/src/usr/diag/prdf/plat/pegasus/prdfPlatCenMembuf.C
+++ b/src/usr/diag/prdf/plat/pegasus/prdfPlatCenMembuf.C
@@ -62,31 +62,6 @@ PRDF_PLUGIN_DEFINE( Membuf, FUNC );
//
//##############################################################################
-// MBSECCFIR[20-27]
-
-#define PLUGIN_MAINT_MPE_ERROR( MBA, RANK ) \
- PLUGIN_UNEXPECTED_ATTN( AnalyzeMaintMpe##MBA##_##RANK )
-
-PLUGIN_MAINT_MPE_ERROR( 0, 0 )
-PLUGIN_MAINT_MPE_ERROR( 0, 1 )
-PLUGIN_MAINT_MPE_ERROR( 0, 2 )
-PLUGIN_MAINT_MPE_ERROR( 0, 3 )
-PLUGIN_MAINT_MPE_ERROR( 0, 4 )
-PLUGIN_MAINT_MPE_ERROR( 0, 5 )
-PLUGIN_MAINT_MPE_ERROR( 0, 6 )
-PLUGIN_MAINT_MPE_ERROR( 0, 7 )
-
-PLUGIN_MAINT_MPE_ERROR( 1, 0 )
-PLUGIN_MAINT_MPE_ERROR( 1, 1 )
-PLUGIN_MAINT_MPE_ERROR( 1, 2 )
-PLUGIN_MAINT_MPE_ERROR( 1, 3 )
-PLUGIN_MAINT_MPE_ERROR( 1, 4 )
-PLUGIN_MAINT_MPE_ERROR( 1, 5 )
-PLUGIN_MAINT_MPE_ERROR( 1, 6 )
-PLUGIN_MAINT_MPE_ERROR( 1, 7 )
-
-#undef PLUGIN_MAINT_MPE_ERROR
-
// MBSECCFIR[39,41]
#define PLUGIN_MAINT_UE_ERROR( MBA ) \
OpenPOWER on IntegriCloud