diff options
author | sachin gupta <sgupta2m@in.ibm.com> | 2013-09-24 06:48:40 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-11-05 09:37:06 -0600 |
commit | 1a6b3c35f7218f081c870236e7badeb5c3f89923 (patch) | |
tree | 2bca917b86d25ec6ddb524dc20e180cf87abad91 | |
parent | b2b6a84fce495fbbc04eda8808bbd052e9dd8797 (diff) | |
download | talos-hostboot-1a6b3c35f7218f081c870236e7badeb5c3f89923.tar.gz talos-hostboot-1a6b3c35f7218f081c870236e7badeb5c3f89923.zip |
PRD: Handle Centaur secondary FIR bits
Change-Id: I5b46000ca2dfe4185772a519cf2807fa2aca38b3
RTC:86235
CQ: SW225743
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/6317
Tested-by: Jenkins Server
Reviewed-by: Christopher T. Phan <cphan@us.ibm.com>
Reviewed-by: Zane Shelley <zshelle@us.ibm.com>
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/7039
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
6 files changed, 364 insertions, 10 deletions
diff --git a/src/usr/diag/prdf/common/plat/pegasus/Mba.rule b/src/usr/diag/prdf/common/plat/pegasus/Mba.rule index 1d43b7e2f..e8d454fbc 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/Mba.rule +++ b/src/usr/diag/prdf/common/plat/pegasus/Mba.rule @@ -165,6 +165,14 @@ chip Mba capture group FirRegs; }; + register MBACALFIR_AND + { + name "MBU.MBA01.MBA_SRQ.MBACALFIRQ AND"; + scomaddr 0x03010401; + capture group never; + access write_only; + }; + register MBACALFIR_MASK { name "MBU.MBA01.MBA_SRQ.MBACALFIR_MASK"; diff --git a/src/usr/diag/prdf/common/plat/pegasus/Mcs.rule b/src/usr/diag/prdf/common/plat/pegasus/Mcs.rule index 372cd274c..91287c1f3 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/Mcs.rule +++ b/src/usr/diag/prdf/common/plat/pegasus/Mcs.rule @@ -177,7 +177,7 @@ group gMciFir attntype CHECK_STOP, RECOVERABLE, SPECIAL, UNIT_CS /** MCIFIR[0] * MCIFIRQ_REPLAY_TIMEOUT */ - (MciFir, bit(0)) ? calloutDmiBusTh1; + (MciFir, bit(0)) ? clearSecMbsBitsCalloutDmiBusTh1; /** MCIFIR[1] * MCIFIRQ_CHANNEL_FAIL @@ -470,6 +470,13 @@ actionclass calloutDmiBus calloutDmiBusSymFru; }; +/** Clear MBS SecondaryBits and calloutDmiBusTh1 */ +actionclass clearSecMbsBitsCalloutDmiBusTh1 +{ + funccall("ClearMbsSecondaryBits"); + calloutDmiBusTh1; +}; + /** Callout the DMI bus (MEDA), threshold 1 */ actionclass calloutDmiBusTh1 { diff --git a/src/usr/diag/prdf/common/plat/pegasus/Membuf_acts_NEST.rule b/src/usr/diag/prdf/common/plat/pegasus/Membuf_acts_NEST.rule index f2dfda31c..26efe8a9e 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/Membuf_acts_NEST.rule +++ b/src/usr/diag/prdf/common/plat/pegasus/Membuf_acts_NEST.rule @@ -425,7 +425,7 @@ group gMbiFir filter singlebit /** MBIFIR[0] * MBIFIRQ_REPLAY_TIMEOUT */ - (MbiFir, bit(0)) ? calloutDmiBusTh1UE; + (MbiFir, bit(0)) ? clearSecMbsBitsCalloutDmiBusTh1UE; /** MBIFIR[1] * MBIFIRQ_CHANNEL_FAIL @@ -574,12 +574,12 @@ group gMbsFir filter singlebit /** MBSFIR[3] * MBS_FIR_REG_EXTERNAL_TIMEOUT */ - (MbsFir, bit(3)) ? CalloutMcsHighAndThr1UE; + (MbsFir, bit(3)) ? chkChnlReplTOCalloutMcsSelfThr1UE; /** MBSFIR[4] * MBS_FIR_REG_INTERNAL_TIMEOUT */ - (MbsFir, bit(4)) ? SelfMedThr1UE; + (MbsFir, bit(4)) ? chkChnlReplTOSelfMedThr1UE; /** MBSFIR[5] * MBS_FIR_REG_INT_BUFFER_CE @@ -605,12 +605,12 @@ group gMbsFir filter singlebit * MBS_FIR_REG_CACHE_SRW_CE */ #TODO via RTC 22872 ( L4 Line Delete ) - (MbsFir, bit(9)) ? TBDDefaultCallout; + (MbsFir, bit(9)) ? clearSecMbsBitsAndLineDelete; /** MBSFIR[10] * MBS_FIR_REG_CACHE_SRW_UE */ - (MbsFir, bit(10)) ? SelfMedThr1; + (MbsFir, bit(10)) ? clearSecMbsBitsAndSelfMedThr1; /** MBSFIR[11] * MBS_FIR_REG_CACHE_SRW_SUE @@ -621,12 +621,12 @@ group gMbsFir filter singlebit * MBS_FIR_REG_CACHE_CO_CE */ #TODO via RTC 22872 ( L4 Line Delete ) - (MbsFir, bit(12)) ? TBDDefaultCallout; + (MbsFir, bit(12)) ? clearSecMbaCalBitsAndLineDelete; /** MBSFIR[13] * MBS_FIR_REG_CACHE_CO_UE */ - (MbsFir, bit(13)) ? SelfMedThr1; + (MbsFir, bit(13)) ? clearSecMbaCalBitsAndSelfMedThr1; /** MBSFIR[14] * MBS_FIR_REG_CACHE_CO_SUE @@ -1253,6 +1253,13 @@ actionclass calloutDmiBus calloutDmiBusSymFru; }; +/** Clear MBS SecondaryBits and calloutDmiBusTh1UE */ +actionclass clearSecMbsBitsCalloutDmiBusTh1UE +{ + funccall("ClearMbsSecondaryBits"); + calloutDmiBusTh1UE; +}; + /** Callout the DMI bus, threshold 1 */ actionclass calloutDmiBusTh1UE { @@ -1269,13 +1276,30 @@ actionclass calloutDmiBusTh2pday { calloutDmiBus; threshold2pday; }; /** Callout the DMI bus and 2nd Level (LOW), threshold 1 */ actionclass calloutDmiBusLvl2Th1 { calloutDmiBusTh1; callout2ndLvlLow; }; -actionclass CalloutMcsHighAndThr1UE +/** Callout MCS, centaur, threshold 1 and set SUE genreation point */ +actionclass CalloutMcsMedSelfLowThr1UE { - callout(connected(TYPE_MCS),MRU_HIGH); + callout(connected(TYPE_MCS),MRU_MED); + calloutSelfLow; threshold1; SUEGenerationPoint; }; +/** If channel Replay Timeout do nothing else + * execute CalloutMcsMedSelfLowThr1UE + */ +actionclass chkChnlReplTOCalloutMcsSelfThr1UE +{ + try( funccall("checkChnlReplayTimeOut"), CalloutMcsMedSelfLowThr1UE ); +}; + +/** If no channel Replay Timeout, execute SelfMedThr1UE */ +actionclass chkChnlReplTOSelfMedThr1UE +{ + try( funccall("checkChnlReplayTimeOut"), SelfMedThr1UE ); +}; + +/** If no sparebit is set, execute SelfMedThr1UE */ actionclass analyzeSpareBitAndThr { try( funccall("checkSpareBit"), calloutDmiBusTh2pday ); @@ -1416,3 +1440,32 @@ actionclass analyzeMaintUe1 { funccall("AnalyzeMaintUe1"); threshold1; }; actionclass callout2ndLvlMedThr1UE { callout2ndLvlMed; threshold1;SUEGenerationPoint; }; +/** Clear MBS SecondaryBits and Line Delete*/ +actionclass clearSecMbsBitsAndLineDelete +{ + funccall("ClearMbsSecondaryBits"); + #TODO via RTC 22872 ( L4 Line Delete ) + TBDDefaultCallout; +}; + +/** Clear MBACAL SecondaryBits and Line Delete*/ +actionclass clearSecMbaCalBitsAndLineDelete +{ + funccall("ClearMbaCalSecondaryBits"); + #TODO via RTC 22872 ( L4 Line Delete ) + TBDDefaultCallout; +}; + +/** Clear MBACAL SecondaryBits and Line SelfMedThr1*/ +actionclass clearSecMbaCalBitsAndSelfMedThr1 +{ + funccall("ClearMbaCalSecondaryBits"); + SelfMedThr1; +}; + +/** Clear MBS SecondaryBits and Line SelfMedThr1*/ +actionclass clearSecMbsBitsAndSelfMedThr1 +{ + funccall("ClearMbsSecondaryBits"); + SelfMedThr1; +}; diff --git a/src/usr/diag/prdf/common/plat/pegasus/Membuf_regs_NEST.rule b/src/usr/diag/prdf/common/plat/pegasus/Membuf_regs_NEST.rule index 740879f5f..fa10408db 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/Membuf_regs_NEST.rule +++ b/src/usr/diag/prdf/common/plat/pegasus/Membuf_regs_NEST.rule @@ -189,6 +189,14 @@ capture group FirRegs; }; + register MBSFIR_AND + { + name "MBU.MBS.MBS_FIR_REG AND"; + scomaddr 0x02011401; + capture group never; + access write_only; + }; + register MBSFIR_MASK { name "MBU.MBS.MBS_FIR_MASK_REG"; diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C index 124a43af2..144b966df 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C @@ -779,6 +779,235 @@ int32_t AnalyzeFetchUe( ExtensibleChip * i_membChip, //------------------------------------------------------------------------------ +/** + * @fn ClearMbsSecondaryBits + * @brief Clears MBS secondary Fir bits which may come up because of primary + * MBS/MBI FIR bits. + * @param i_chip The Centaur chip. + * @param i_sc ServiceDataColector. + * @return SUCCESS. + + */ +int32_t ClearMbsSecondaryBits( ExtensibleChip * i_chip, + STEP_CODE_DATA_STRUCT & i_sc ) +{ + #define PRDF_FUNC "[ClearMbsSecondaryBits] " + + int32_t l_rc = SUCCESS; + do + { + SCAN_COMM_REGISTER_CLASS * mbsFir = i_chip->getRegister("MBSFIR"); + SCAN_COMM_REGISTER_CLASS * mbsFirMask = + i_chip->getRegister("MBSFIR_MASK"); + SCAN_COMM_REGISTER_CLASS * mbsFirAnd = + i_chip->getRegister("MBSFIR_AND"); + l_rc = mbsFir->Read(); + l_rc |= mbsFirMask->Read(); + if ( SUCCESS != l_rc ) + { + PRDF_ERR( PRDF_FUNC"MBSFIR/MBSFIR_MASK read failed" + "for 0x%08x", i_chip->GetId()); + break; + } + + mbsFirAnd->setAllBits(); + + if ( mbsFir->IsBitSet(26) + && mbsFir->IsBitSet(9) && ( ! mbsFirMask->IsBitSet(9))) + { + mbsFirAnd->ClearBit(26); + } + + if ( mbsFir->IsBitSet(27) + && mbsFir->IsBitSet(10) && ( ! mbsFirMask->IsBitSet(10))) + { + mbsFirAnd->ClearBit(27); + } + + if( mbsFir->IsBitSet(3) || mbsFir->IsBitSet(4) ) + { + SCAN_COMM_REGISTER_CLASS * mbiFir = i_chip->getRegister("MBIFIR"); + SCAN_COMM_REGISTER_CLASS * mbiFirMask = + i_chip->getRegister("MBIFIR_MASK"); + l_rc = mbiFir->Read(); + l_rc |= mbiFirMask->Read(); + if ( SUCCESS != l_rc ) + { + // Do not break from here, just print error trace. + // If there are other secondary bits ( e.g. 26, 27 ), + // we want to clear them. + PRDF_ERR( PRDF_FUNC"MBIFIR/MASK read failed" + "for 0x%08x", i_chip->GetId()); + } + else if ( mbiFir->IsBitSet( 0 ) && ( ! mbiFirMask->IsBitSet( 0 )) ) + { + mbsFirAnd->ClearBit(3); + mbsFirAnd->ClearBit(4); + } + } + + l_rc = mbsFirAnd->Write(); + if ( SUCCESS != l_rc ) + { + PRDF_ERR( PRDF_FUNC"MBSFIR_AND write failed" + "for 0x%08x", i_chip->GetId()); + break; + } + + }while( 0 ); + return SUCCESS; + + #undef PRDF_FUNC +} PRDF_PLUGIN_DEFINE( Membuf, ClearMbsSecondaryBits ); +//------------------------------------------------------------------------------ + +/** + * @fn ClearMbaCalSecondaryBits + * @brief Clears MBACAL secondary Fir bits which may come up because of MBSFIR + * @param i_chip The Centaur chip. + * @param i_sc ServiceDataColector. + * @return SUCCESS. + + */ +int32_t ClearMbaCalSecondaryBits( ExtensibleChip * i_chip, + STEP_CODE_DATA_STRUCT & i_sc ) +{ + #define PRDF_FUNC "[ClearMbaCalSecondaryBits ] " + int32_t l_rc = SUCCESS; + + do + { + SCAN_COMM_REGISTER_CLASS * mbsFir = i_chip->getRegister("MBSFIR"); + SCAN_COMM_REGISTER_CLASS * mbsFirMask = + i_chip->getRegister("MBSFIR_MASK"); + l_rc = mbsFir->Read(); + l_rc |= mbsFirMask->Read(); + if ( SUCCESS != l_rc ) + { + PRDF_ERR( PRDF_FUNC"MBSFIR/MBSFIR_MASK read failed" + "for 0x%08x", i_chip->GetId()); + break; + } + + CenMembufDataBundle * membdb = getMembufDataBundle( i_chip ); + + for( uint32_t i = 0; i < MAX_MBA_PER_MEMBUF; i++ ) + { + ExtensibleChip * mbaChip = membdb->getMbaChip(i); + if ( NULL == mbaChip ) continue; + + SCAN_COMM_REGISTER_CLASS * mbaCalAndFir = + mbaChip->getRegister("MBACALFIR_AND"); + + if( NULL == mbaCalAndFir ) continue; + + mbaCalAndFir->setAllBits(); + + // Not checking if MBACALFir bits are set or not. + // Clearing them blindly as it will give better performance. + + if( mbsFir->IsBitSet(12) && ( ! mbsFirMask->IsBitSet(12) ) ) + { + mbaCalAndFir->ClearBit(10); + mbaCalAndFir->ClearBit(14); + } + + if( mbsFir->IsBitSet(13) && ( ! mbsFirMask->IsBitSet(13) ) ) + { + mbaCalAndFir->ClearBit(9); + mbaCalAndFir->ClearBit(15); + } + + l_rc = mbaCalAndFir->Write(); + if ( SUCCESS != l_rc ) + { + // Do not break. Just print error trace and look for + // other MBA. + PRDF_ERR( PRDF_FUNC"MBACALFIR_AND write failed" + "for 0x%08x", mbaChip->GetId()); + } + } + + }while( 0 ); + + return SUCCESS; + #undef PRDF_FUNC + +} PRDF_PLUGIN_DEFINE( Membuf, ClearMbaCalSecondaryBits ); + +/** + * @fn checkChnlReplayTimeOut + * @brief Check if channel Replay Timeout is present + * + * @param i_chip The Centaur chip. + * @param i_sc ServiceDataColector. + * + * @return SUCCESS if Channel replay Timout bits are set, FAIL otherwise. + + */ +int32_t checkChnlReplayTimeOut( ExtensibleChip * i_chip, + STEP_CODE_DATA_STRUCT & i_sc ) +{ + #define PRDF_FUNC "[checkChnlReplayTimeOut] " + + // We will return FAIL from this function if high priority bits are + // not set. This will trigger rule code to execute alternate resolution + + int32_t l_rc = SUCCESS; + do + { + SCAN_COMM_REGISTER_CLASS * mbiFir = i_chip->getRegister("MBIFIR"); + SCAN_COMM_REGISTER_CLASS * mbiFirMask = + i_chip->getRegister("MBIFIR_MASK"); + + l_rc = mbiFir->Read(); + l_rc |= mbiFirMask->Read(); + if ( SUCCESS != l_rc ) + { + PRDF_ERR( PRDF_FUNC"MBIFIR/MBIFIR_MASK read failed" + "for 0x%08x", i_chip->GetId()); + break; + } + + if( ( mbiFir->IsBitSet(0)) && ( ! mbiFirMask->IsBitSet(0)) ) break; + + CenMembufDataBundle * mbdb = getMembufDataBundle( i_chip ); + ExtensibleChip * mcsChip = mbdb->getMcsChip(); + + if( NULL == mcsChip ) + { + l_rc = FAIL; + break; + } + + SCAN_COMM_REGISTER_CLASS * mciFir = mcsChip->getRegister("MCIFIR"); + SCAN_COMM_REGISTER_CLASS * mciFirMask = + mcsChip->getRegister("MCIFIR_MASK"); + l_rc = mciFir->Read(); + l_rc |= mciFirMask->Read(); + if ( SUCCESS != l_rc ) + { + PRDF_ERR( PRDF_FUNC"MCIFIR/MCIFIR_MASK read failed" + "for 0x%08x", mcsChip->GetId()); + break; + } + if( ( mciFir->IsBitSet(0)) && ( ! mciFirMask->IsBitSet(0)) ) break; + + l_rc = FAIL; + + }while( 0 ); + + // Do not commit error log as primary ( high priority ) + // FIR bits are set and this is just a side effect. + if( SUCCESS == l_rc) + i_sc.service_data->DontCommitErrorLog(); + + return l_rc; + #undef PRDF_FUNC +} PRDF_PLUGIN_DEFINE( Membuf, checkChnlReplayTimeOut ); + +//------------------------------------------------------------------------------ + // Define the plugins for memory ECC errors. #define PLUGIN_FETCH_ECC_ERROR( TYPE, MBA ) \ int32_t AnalyzeFetch##TYPE##MBA( ExtensibleChip * i_membChip, \ diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C b/src/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C index ca520f70c..8fe8a2999 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C @@ -208,6 +208,55 @@ int32_t checkSpareBit( ExtensibleChip * i_mcsChip, } PRDF_PLUGIN_DEFINE( Mcs, checkSpareBit ); +/** + * @fn ClearMbsSecondaryBits + * @brief Clears MBS secondary Fir bits which may come up because of MCIFIR + * @param i_chip The Mcs chip. + * @param i_sc ServiceDataColector. + * @return SUCCESS. + + */ +int32_t ClearMbsSecondaryBits( ExtensibleChip * i_chip, + STEP_CODE_DATA_STRUCT & i_sc ) +{ + #define PRDF_FUNC "[ClearMbsSecondaryBits] " + + int32_t l_rc = SUCCESS; + do + { + P8McsDataBundle * mcsdb = getMcsDataBundle( i_chip ); + ExtensibleChip * membChip = mcsdb->getMembChip(); + + if ( NULL == membChip ) break; + + // Not checking if MBSFIR bits are set or not. + // Clearing them blindly as it will give better performance. + SCAN_COMM_REGISTER_CLASS * mbsAndFir = + membChip->getRegister("MBSFIR_AND"); + + if( NULL == mbsAndFir ) + { + PRDF_ERR( PRDF_FUNC"Can not find MBSFIR_AND " + "for 0x%08x", membChip->GetId()); + break; + } + mbsAndFir->setAllBits(); + + mbsAndFir->ClearBit(3); + mbsAndFir->ClearBit(4); + l_rc = mbsAndFir->Write(); + if ( SUCCESS != l_rc ) + { + PRDF_ERR( PRDF_FUNC"MBSFIR_AND write failed" + "for 0x%08x", membChip->GetId()); + break; + } + }while( 0 ); + return SUCCESS; + + #undef PRDF_FUNC +} PRDF_PLUGIN_DEFINE( Mcs, ClearMbsSecondaryBits ); + } // end namespace Mcs } // end namespace PRDF |