diff options
author | sachin gupta <sgupta2m@in.ibm.com> | 2013-04-24 02:42:29 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-09-11 14:40:10 -0500 |
commit | 45582a26440be119bc57606a99ee85f7f2726c31 (patch) | |
tree | f44feab84933a2a25b2cb19fa4bf0a51754038ab /src/usr/diag/prdf/prdfMain.C | |
parent | 5c3ade25a9bc86a41a4a9840202ead6ae4f3e7fc (diff) | |
download | talos-hostboot-45582a26440be119bc57606a99ee85f7f2726c31.tar.gz talos-hostboot-45582a26440be119bc57606a99ee85f7f2726c31.zip |
PRD: IPL MNFG CE support
RTC: 47290
Change-Id: I94bd86b7b902a20e4f945abbac3b5556cd07f1bc
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4187
Tested-by: Jenkins Server
Reviewed-by: Zane Shelley <zshelle@us.ibm.com>
Reviewed-by: Christopher T. Phan <cphan@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5974
Diffstat (limited to 'src/usr/diag/prdf/prdfMain.C')
-rwxr-xr-x | src/usr/diag/prdf/prdfMain.C | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/usr/diag/prdf/prdfMain.C b/src/usr/diag/prdf/prdfMain.C index 94bebcb31..79806b071 100755 --- a/src/usr/diag/prdf/prdfMain.C +++ b/src/usr/diag/prdf/prdfMain.C @@ -30,10 +30,19 @@ */ #include <prdfMain.H> +#include <prdfCenMbaDataBundle.H> +#include <prdfExtensibleChip.H> +#include <prdfErrlUtil.H> +#include <prdfPlatServices.H> + +using namespace TARGETING; +using namespace HWAS; namespace PRDF { +using namespace PlatServices; + //------------------------------------------------------------------------------ // Platform specific helper function for PRDF::initialize() //------------------------------------------------------------------------------ @@ -43,4 +52,55 @@ void initPlatSpecific() // Currently no-op in Hostboot. } +//------------------------------------------------------------------------------ +// External functions - declared in prdfMain.H +//------------------------------------------------------------------------------ + +int32_t analyzeIplCEStats( TargetHandle_t i_mba, bool &o_calloutMade ) +{ + #define PRDF_FUNC "PRDF::analyzeIplCEStats" + + PRDF_ENTER( PRDF_FUNC"(0x%08x)", getHuid(i_mba) ); + + int32_t o_rc = SUCCESS; + o_calloutMade = false; + + ExtensibleChip * mbaChip = (ExtensibleChip *)systemPtr->GetChip( i_mba ); + CenMbaDataBundle * mbadb = getMbaDataBundle( mbaChip ); + + o_rc = mbadb->getIplCeStats()->analyzeStats( o_calloutMade ); + + if ( SUCCESS != o_rc ) + { + PRDF_ERR( "["PRDF_FUNC"] analyzeStats() failed"); + + // Get user data + uint64_t ud12 = PRDF_GET_UINT64_FROM_UINT32( getHuid(i_mba), 0 ); + uint64_t ud34 = PRDF_GET_UINT64_FROM_UINT32( PRDFSIG_MnfgIplFail, 0 ); + + // Create error log + errlHndl_t errl = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_PREDICTIVE, // severity + PRDF_MNFG_IPL_CE_ANALYSIS, // module ID + PRDF_DETECTED_FAIL_SOFTWARE, // reason code + ud12, ud34 ); // user data 1-4 + + // Add 2nd level support + errl->addProcedureCallout( EPUB_PRC_LVL_SUPP, SRCI_PRIORITY_HIGH ); + + // Add traces + errl->collectTrace( PRDF_COMP_NAME, 512 ); + + // Commit the error log + ERRORLOG::errlCommit( errl, PRDF_COMP_ID ); + } + + PRDF_EXIT( PRDF_FUNC"(0x%08x), o_calloutMade:%u", + getHuid(i_mba), o_calloutMade ); + + return o_rc; + + #undef PRDF_FUNC +} + } // end namespace PRDF |