summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/prdfCenMba.C67
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/prdfCenPll.C72
-rwxr-xr-xsrc/usr/diag/prdf/common/prd_pegasus.mk1
-rw-r--r--src/usr/diag/prdf/framework/service/prdfPlatServices.C16
-rwxr-xr-xsrc/usr/diag/prdf/makefile4
-rw-r--r--src/usr/diag/prdf/plat/pegasus/prdfPlatCenMba.C125
-rw-r--r--src/usr/diag/prdf/plat/pegasus/prdfPlatCenPll.C103
-rw-r--r--src/usr/diag/prdf/prdf_hb_only.mk7
8 files changed, 250 insertions, 145 deletions
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMba.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMba.C
index f3db8441c..318df04b6 100755
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMba.C
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMba.C
@@ -61,50 +61,6 @@ int32_t Initialize( ExtensibleChip * i_mbaChip )
}
PRDF_PLUGIN_DEFINE( Mba, Initialize );
-//------------------------------------------------------------------------------
-
-/**
- * @brief Plugin function called after analysis is complete but before PRD
- * exits.
- * @param i_mbaChip A Centaur MBA chip.
- * @param i_sc The step code data struct.
- * @note This is especially useful for any analysis that still needs to be
- * done after the framework clears the FIR bits that were at attention.
- * @return SUCCESS.
- */
-int32_t PostAnalysis( ExtensibleChip * i_mbaChip,
- STEP_CODE_DATA_STRUCT & i_sc )
-{
- #ifdef __HOSTBOOT_MODULE
-
- using namespace TARGETING;
-
- // Send command complete to MDIA.
- // This must be done in post analysis after attentions have been cleared.
-
- TargetHandle_t mbaTarget = i_mbaChip->GetChipHandle();
- CenMbaDataBundle * mbadb = getMbaDataBundle( i_mbaChip );
-
- if ( mbadb->iv_sendCmdCompleteMsg )
- {
- mbadb->iv_sendCmdCompleteMsg = false;
-
- int32_t l_rc = mdiaSendEventMsg( mbaTarget,
- mbadb->iv_cmdCompleteMsgData );
-
- if ( l_rc )
- {
- PRDF_ERR( "[Mba::PostAnalysis] PlatServices::mdiaSendEventMsg"
- " failed" );
- }
- }
-
- #endif // __HOSTBOOT_MODULE
-
- return SUCCESS;
-}
-PRDF_PLUGIN_DEFINE( Mba, PostAnalysis );
-
//##############################################################################
//
// MBASPA
@@ -187,28 +143,5 @@ int32_t MaintCmdComplete( ExtensibleChip * i_mbaChip,
}
PRDF_PLUGIN_DEFINE( Mba, MaintCmdComplete );
-/**
- * @brief Plugin to send a Skip MBA message for Memory Diagnositics.
- * @note Does nothing in non-MDIA mode.
- * @note Will stop any maintenance commands in progress.
- * @param i_chip mba target
- * @param i_sc The step code data struct.
- * @return SUCCESS
- */
-// FIXME: Story 51702 will implement this
-int32_t SkipMbaMsg( ExtensibleChip * i_chip,
- STEP_CODE_DATA_STRUCT & i_sc )
-{
- using namespace TARGETING;
- int32_t o_rc = SUCCESS;
- TargetHandle_t mbaTarget = i_chip->GetChipHandle();
-
- PRDF_ERR("[SkipMbaMsg] MBA 0x%08x : this function is not yet implemented!",
- PlatServices::getHuid(mbaTarget));
-
- return o_rc;
-}
-PRDF_PLUGIN_DEFINE( Mba, SkipMbaMsg );
-
} // end namespace Mba
} // end namespace PRDF
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenPll.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenPll.C
index 1beeedbe3..51c51a2dd 100755
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenPll.C
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenPll.C
@@ -21,19 +21,13 @@
/* */
/* IBM_PROLOG_END_TAG */
-/**
- * @file prdfCenPLL.C
- * @brief chip Plug-in code for centaur pll support
+/** @file prdfCenPLL.C
+ * @brief Contains all common plugin code for the Centaur PLL logic.
*/
#include <iipServiceDataCollector.h>
#include <prdfExtensibleChip.H>
#include <prdfPluginMap.H>
-#include <prdfBitString.H>
-#include <iipscr.h>
-#include <prdfPlatServices.H>
-#include <prdfGlobal.H>
-#include <iipSystem.h>
namespace PRDF
{
@@ -41,7 +35,6 @@ namespace PRDF
namespace Membuf
{
-
enum
{
PLL_DETECT_CENT_NEST = 19, // nest PLL error bit
@@ -83,7 +76,6 @@ int32_t QueryPll( ExtensibleChip * i_chip,
} while(0);
return rc;
-
}
PRDF_PLUGIN_DEFINE( Membuf, QueryPll );
@@ -109,7 +101,6 @@ int32_t ClearPll( ExtensibleChip * i_chip,
}
return rc;
-
}
PRDF_PLUGIN_DEFINE( Membuf, ClearPll );
@@ -157,65 +148,6 @@ int32_t CalloutPll( ExtensibleChip * i_chip,
}
PRDF_PLUGIN_DEFINE( Membuf, CalloutPll );
-/**
- Send a PLL error message on Centaur Plugin.
- @param i_chip the chip that this is for.
- @param i_sc service data.
- @returns Failure Or Success of message call.
- @note
- */
-int32_t PllPostAnalysis( ExtensibleChip * i_chip,
- STEP_CODE_DATA_STRUCT & i_sc )
-{
- using namespace TARGETING;
- int32_t l_rc = SUCCESS;
-
-// Need to send MBA Skip Message to MDIA in Hostboot only
-#ifdef __HOSTBOOT_MODULE
-
- TargetHandle_t l_cenHandle = i_chip->GetChipHandle();
-
- do
- {
- TargetHandleList list = PlatServices::getConnected(l_cenHandle , TYPE_MBA);
- if ( 0 == list.size() )
- {
- PRDF_ERR("[PllPostAnalysis] failed to get MBAs connected to this "
- "Membuf: 0x%08x", PlatServices::getHuid(l_cenHandle) );
- l_rc = FAIL;
- break;
- }
-
- for (TargetHandleList::iterator mbaIt = list.begin(); mbaIt != list.end(); ++mbaIt)
- {
- // Get the extensible chip for this mba
- ExtensibleChip *l_mbaChip = (ExtensibleChip *)systemPtr->GetChip(*mbaIt);
-
- //Check to make sure we are at threshold and have something garded.
- if( (NULL != l_mbaChip) &&
- (i_sc.service_data->IsAtThreshold()) &&
- (i_sc.service_data->QueryGard() != GardResolution::NoGard) )
- {
- //Call the Skip Maintanence Command on this mba
- ExtensibleChipFunction * l_skipMbaMsg =
- l_mbaChip->getExtensibleFunction("SkipMbaMsg", true);
-
- // This call will return an error if it doesn't complete.
- // Don't fail on error. keep going.
- l_rc |= (*l_skipMbaMsg)(l_mbaChip,
- PluginDef::bindParm<STEP_CODE_DATA_STRUCT &>(i_sc));
- }
- }
-
- } while(0);
-
-#endif // ifdef __HOSTBOOT_MODULE
-
- return l_rc;
-}
-PRDF_PLUGIN_DEFINE( Membuf, PllPostAnalysis );
-
-
} // end namespace Membuf
} // end namespace PRDF
diff --git a/src/usr/diag/prdf/common/prd_pegasus.mk b/src/usr/diag/prdf/common/prd_pegasus.mk
index 4ba281ce0..8ea8860ce 100755
--- a/src/usr/diag/prdf/common/prd_pegasus.mk
+++ b/src/usr/diag/prdf/common/prd_pegasus.mk
@@ -28,6 +28,7 @@ PRDF_RULE_PLUGINS_PEGASUS = \
prdfP8Mcs.o \
prdfP8Pll.o \
prdfCenMba.o \
+ prdfPlatCenMba.o \
prdfCenMembuf.o \
prdfCenPll.o
diff --git a/src/usr/diag/prdf/framework/service/prdfPlatServices.C b/src/usr/diag/prdf/framework/service/prdfPlatServices.C
index 71b1382ac..c6477ca85 100644
--- a/src/usr/diag/prdf/framework/service/prdfPlatServices.C
+++ b/src/usr/diag/prdf/framework/service/prdfPlatServices.C
@@ -129,16 +129,19 @@ bool isInMdiaMode()
int32_t mdiaSendEventMsg( TargetHandle_t i_mbaTarget,
MDIA::MaintCommandEventType i_eventType )
{
+ #define PRDF_FUNC "[PlatServices::mdiaSendCmdComplete] "
+
int32_t o_rc = SUCCESS;
do
{
+ if ( !isInMdiaMode() ) break; // no-op
+
// Verify type.
TYPE l_type = getTargetType(i_mbaTarget);
if ( TYPE_MBA != l_type )
{
- PRDF_ERR( "[PlatServices::mdiaSendCmdComplete] unsupported target "
- "type %d", l_type );
+ PRDF_ERR( PRDF_FUNC"unsupported target type %d", l_type );
o_rc = FAIL;
break;
}
@@ -152,8 +155,7 @@ int32_t mdiaSendEventMsg( TargetHandle_t i_mbaTarget,
errlHndl_t errl = MDIA::processEvent( l_mdiaEvent );
if ( NULL != errl )
{
- PRDF_ERR( "[PlatServices::mdiaSendCmdComplete] MDIA::processEvent "
- "failed" );
+ PRDF_ERR( PRDF_FUNC"MDIA::processEvent() failed" );
PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT );
o_rc = FAIL;
break;
@@ -163,11 +165,13 @@ int32_t mdiaSendEventMsg( TargetHandle_t i_mbaTarget,
if ( SUCCESS != o_rc )
{
- PRDF_ERR( "[PlatServices::mdiaSendCmdComplete] Failed: i_target=0x%08x",
- getHuid(i_mbaTarget) );
+ PRDF_ERR( PRDF_FUNC"Failed: i_target=0x%08x i_eventType=%d",
+ getHuid(i_mbaTarget), i_eventType );
}
return o_rc;
+
+ #undef PRDF_FUNC
}
//------------------------------------------------------------------------------
diff --git a/src/usr/diag/prdf/makefile b/src/usr/diag/prdf/makefile
index 5bd295d58..c43c92f17 100755
--- a/src/usr/diag/prdf/makefile
+++ b/src/usr/diag/prdf/makefile
@@ -100,6 +100,7 @@ OBJS = \
${prd_pegasus_specific} \
${prd_pegasus_specific_HB} \
${PRDF_RULE_PLUGINS_PEGASUS} \
+ ${PRDF_RULE_PLUGINS_PEGASUS_HB} \
${PRDF_RULE_PLUGINS_PEGASUS_WSIM} \
#------------------------------------------------------------------------------
@@ -119,7 +120,6 @@ ${MFG_THRES_PATH} : ${MFG_THRES_LIST}
EXTRA_CLEAN = ${MFG_THRES_PATH}
-
-
+#------------------------------------------------------------------------------
include ${ROOTPATH}/config.mk
diff --git a/src/usr/diag/prdf/plat/pegasus/prdfPlatCenMba.C b/src/usr/diag/prdf/plat/pegasus/prdfPlatCenMba.C
new file mode 100644
index 000000000..bad120204
--- /dev/null
+++ b/src/usr/diag/prdf/plat/pegasus/prdfPlatCenMba.C
@@ -0,0 +1,125 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/plat/pegasus/prdfPlatCenMba.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+/** @file prdfCenMba.C
+ * @brief Contains all Hostboot specific plugin code for the PRD Centaur MBA.
+ */
+
+// Framework includes
+#include <iipServiceDataCollector.h>
+#include <prdfExtensibleChip.H>
+#include <prdfPlatServices.H>
+#include <prdfPluginMap.H>
+
+// Pegasus includes
+#include <prdfCenMbaCaptureData.H>
+#include <prdfCenMbaDataBundle.H>
+
+using namespace TARGETING;
+
+namespace PRDF
+{
+
+using namespace PlatServices;
+
+namespace Mba
+{
+
+//##############################################################################
+//
+// Special plugins
+//
+//##############################################################################
+
+/**
+ * @brief Plugin function called after analysis is complete but before PRD
+ * exits.
+ * @param i_mbaChip A Centaur MBA chip.
+ * @param i_sc The step code data struct.
+ * @note This is especially useful for any analysis that still needs to be
+ * done after the framework clears the FIR bits that were at attention.
+ * @return SUCCESS.
+ */
+int32_t PostAnalysis( ExtensibleChip * i_mbaChip,
+ STEP_CODE_DATA_STRUCT & i_sc )
+{
+ #define PRDF_FUNC "[Mba::PostAnalysis] "
+
+ // Send command complete to MDIA.
+ // This must be done in post analysis after attentions have been cleared.
+
+ TargetHandle_t mbaTarget = i_mbaChip->GetChipHandle();
+ CenMbaDataBundle * mbadb = getMbaDataBundle( i_mbaChip );
+
+ if ( mbadb->iv_sendCmdCompleteMsg )
+ {
+ mbadb->iv_sendCmdCompleteMsg = false;
+
+ int32_t l_rc = mdiaSendEventMsg( mbaTarget,
+ mbadb->iv_cmdCompleteMsgData );
+ if ( SUCCESS != l_rc )
+ {
+ PRDF_ERR( PRDF_FUNC"PlatServices::mdiaSendEventMsg() failed" );
+ }
+ }
+
+ return SUCCESS; // Intentionally return SUCCESS for this plugin
+
+ #undef PRDF_FUNC
+}
+PRDF_PLUGIN_DEFINE( Mba, PostAnalysis );
+
+/**
+ * @brief Plugin to send a SKIP_MBA message for Memory Diagnositics.
+ * @note Does nothing in non-MDIA mode.
+ * @note Will stop any maintenance commands in progress.
+ * @param i_mbaChip A Centaur MBA chip.
+ * @param i_sc The step code data struct.
+ * @return SUCCESS.
+ */
+int32_t SkipMbaMsg( ExtensibleChip * i_mbaChip, STEP_CODE_DATA_STRUCT & i_sc )
+{
+ #define PRDF_FUNC "[Mba::SkipMbaMsg] "
+
+ int32_t l_rc = SUCCESS;
+
+ TargetHandle_t mbaTrgt = i_mbaChip->GetChipHandle();
+
+ l_rc = mdiaSendEventMsg( mbaTrgt, MDIA::SKIP_MBA );
+ if ( SUCCESS != l_rc )
+ {
+ PRDF_ERR( PRDF_FUNC"mdiaSendEventMsg(0x%08x, SKIP_MBA) failed",
+ getHuid(mbaTrgt) );
+ // Keep going.
+ }
+
+ return SUCCESS; // Intentionally return SUCCESS for this plugin
+
+ #undef PRDF_FUNC
+}
+PRDF_PLUGIN_DEFINE( Mba, SkipMbaMsg );
+
+} // end namespace Mba
+
+} // end namespace PRDF
+
diff --git a/src/usr/diag/prdf/plat/pegasus/prdfPlatCenPll.C b/src/usr/diag/prdf/plat/pegasus/prdfPlatCenPll.C
new file mode 100644
index 000000000..1632d8b96
--- /dev/null
+++ b/src/usr/diag/prdf/plat/pegasus/prdfPlatCenPll.C
@@ -0,0 +1,103 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/plat/pegasus/prdfPlatCenPll.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+/** @file prdfPlatCenPLL.C
+ * @brief Contains all Hostboot-only plugin code for the Centaur PLL logic.
+ */
+
+// Framework includes
+#include <iipServiceDataCollector.h>
+#include <prdfExtensibleChip.H>
+#include <prdfPluginMap.H>
+#include <prdfPlatServices.H>
+
+using namespace TARGETING;
+
+namespace PRDF
+{
+
+using namespace PlatServices;
+
+namespace Membuf
+{
+
+/**
+ * @brief Optional plugin function called after analysis is complete but
+ * before PRD exits.
+ * @param i_cenChip A Centaur MBA chip.
+ * @param i_sc The step code data struct.
+ * @note This is especially useful for any analysis that still needs to be
+ * done after the framework clears the FIR bits that were at attention.
+ * @return SUCCESS.
+ */
+int32_t PllPostAnalysis( ExtensibleChip * i_cenChip,
+ STEP_CODE_DATA_STRUCT & i_sc )
+{
+ #define PRDF_FUNC "[Membuf::PllPostAnalysis] "
+
+ int32_t o_rc = SUCCESS;
+
+ TargetHandle_t cenTrgt = i_cenChip->GetChipHandle();
+
+ do
+ {
+ // Check to make sure we are at threshold and have something garded.
+ if ( !i_sc.service_data->IsAtThreshold() ||
+ (GardResolution::NoGard == i_sc.service_data->QueryGard()) )
+ {
+ break; // nothing to do
+ }
+
+ TargetHandleList list = getConnected( cenTrgt, TYPE_MBA );
+ if ( 0 == list.size() )
+ {
+ PRDF_ERR( PRDF_FUNC"getConnected(0x%08x, TYPE_MBA) failed",
+ getHuid(cenTrgt) );
+ o_rc = FAIL; break;
+ }
+
+ // Send SKIP_MBA message for each MBA.
+ for ( TargetHandleList::iterator mbaIt = list.begin();
+ mbaIt != list.end(); ++mbaIt )
+ {
+ int32_t l_rc = mdiaSendEventMsg( *mbaIt, MDIA::SKIP_MBA );
+ if ( SUCCESS != l_rc )
+ {
+ PRDF_ERR( PRDF_FUNC"mdiaSendEventMsg(0x%08x, SKIP_MBA) failed",
+ getHuid(*mbaIt) );
+ o_rc |= FAIL;
+ continue; // keep going
+ }
+ }
+
+ } while(0);
+
+ return o_rc;
+
+ #undef PRDF_FUNC
+}
+PRDF_PLUGIN_DEFINE( Membuf, PllPostAnalysis );
+
+} // end namespace Membuf
+
+} // end namespace PRDF
diff --git a/src/usr/diag/prdf/prdf_hb_only.mk b/src/usr/diag/prdf/prdf_hb_only.mk
index b8ad36280..acb774ebe 100644
--- a/src/usr/diag/prdf/prdf_hb_only.mk
+++ b/src/usr/diag/prdf/prdf_hb_only.mk
@@ -22,6 +22,13 @@
# IBM_PROLOG_END_TAG
################################################################################
+# PRD rule plugin object files (Hostboot only).
+################################################################################
+
+PRDF_RULE_PLUGINS_PEGASUS_HB = \
+ prdfPlatCenPll.o
+
+################################################################################
# PRD object files (Hostboot only).
################################################################################
OpenPOWER on IntegriCloud