diff options
author | Prem Shanker Jha <premjha2@in.ibm.com> | 2013-10-30 10:26:21 +0530 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-12-02 18:00:45 -0600 |
commit | 03d39f2bbcef34ef34eabdf8e64b5cfe52f2d6f7 (patch) | |
tree | df4e6178f334331204a90f141a86849e93bc9c05 /src/usr/diag/prdf | |
parent | 554aa3dbb530d6da0de7c83bf23346ae5f6032eb (diff) | |
download | talos-hostboot-03d39f2bbcef34ef34eabdf8e64b5cfe52f2d6f7.tar.gz talos-hostboot-03d39f2bbcef34ef34eabdf8e64b5cfe52f2d6f7.zip |
PRDF:Handling multiple chips of a domain at error
Depends-On: Ib42b269d2e9fd5588b58950949c379bdc8518bfc
RTC:85138
Change-Id: Id4d785f72c928498dbcbee729e9644a8464fc0ae
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/7459
Reviewed-by: Zane Shelley <zshelle@us.ibm.com>
Tested-by: Jenkins Server
Squashed: Ic871fdfb693a4cc174c72e1583a3373524277559
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/14573
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf')
17 files changed, 398 insertions, 247 deletions
diff --git a/src/usr/diag/prdf/common/framework/config/iipDomainContainer.C b/src/usr/diag/prdf/common/framework/config/iipDomainContainer.C index 76c10870b..3fe03b258 100755 --- a/src/usr/diag/prdf/common/framework/config/iipDomainContainer.C +++ b/src/usr/diag/prdf/common/framework/config/iipDomainContainer.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 1996,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -111,22 +113,21 @@ chips() // dg04 - remove size from arg list template<class T> inline -bool DomainContainer<T>::Query(ATTENTION_TYPE attentionType) // DG03 +bool DomainContainer<T>::Query( ATTENTION_TYPE attentionType ) { - bool rc = false; - - SYSTEM_DEBUG_CLASS sysdebug; - unsigned int size = GetSize(); - for(unsigned int i = 0;(i < size) && (rc == false);i++) - { - TARGETING::TargetHandle_t l_pchipHandle = LookUp(i)->GetChipHandle(); - if(sysdebug.IsAttentionActive(l_pchipHandle) == true) + bool o_rc = false; + SYSTEM_DEBUG_CLASS sysdebug; + unsigned int size = GetSize(); + + for( unsigned int i = 0; i < size; i++ ) { - if(sysdebug.GetAttentionType(l_pchipHandle) == attentionType) rc = true; + TARGETING::TargetHandle_t l_pchipHandle = LookUp(i)->GetChipHandle(); + o_rc = + sysdebug.isActiveAttentionPending( l_pchipHandle, attentionType ); + if( true == o_rc ) break; } - } - return(rc); + return(o_rc); } template<class T> @@ -134,9 +135,14 @@ inline int32_t DomainContainer<T>::Analyze(STEP_CODE_DATA_STRUCT & serviceData, ATTENTION_TYPE attentionType) { - serviceData.service_data->GetErrorSignature()->clear(); - Order(attentionType); // DG01 DG02 - return(LookUp(0)->Analyze(serviceData, attentionType)); + SYSTEM_DEBUG_CLASS sysdebug; + serviceData.service_data->GetErrorSignature()->clear(); + Order(attentionType); + ExtensibleChip * l_chip = LookUp(0); + int32_t o_rc = ( l_chip->Analyze( serviceData, attentionType ) ); + sysdebug.clearAttnPendingStatus( l_chip->GetChipHandle(), attentionType ); + + return o_rc; } template<class T> diff --git a/src/usr/diag/prdf/common/framework/config/iipSystem.C b/src/usr/diag/prdf/common/framework/config/iipSystem.C index ab083751a..47e0d0210 100755 --- a/src/usr/diag/prdf/common/framework/config/iipSystem.C +++ b/src/usr/diag/prdf/common/framework/config/iipSystem.C @@ -279,21 +279,25 @@ int32_t System::Analyze(STEP_CODE_DATA_STRUCT & serviceData, startAttention = RECOVERABLE; ATTENTION_TYPE atnType = startAttention; - for(atnType = startAttention; - domainAtAttentionPtr == NULL && atnType >= attentionType ; - --atnType) + + for( atnType = startAttention; + domainAtAttentionPtr == NULL && atnType >= attentionType ; + --atnType) { - for(DomainContainerType::iterator domainIterator = prioritizedDomains.begin(); - domainIterator != prioritizedDomains.end() && domainAtAttentionPtr == NULL; - domainIterator++) + DomainContainerType::iterator domainIterator; + + for( domainIterator = prioritizedDomains.begin(); + domainIterator != prioritizedDomains.end() && + domainAtAttentionPtr == NULL; ) { + bool l_continueInDomain = false; domainAtAttentionPtr = ((*domainIterator)->Query(atnType)) ? (*domainIterator) : NULL; if(domainAtAttentionPtr != NULL) { serviceData.service_data->SetCauseAttentionType(atnType); rc = domainAtAttentionPtr->Analyze(serviceData, atnType); if((rc == PRD_SCAN_COMM_REGISTER_ZERO) || - (rc == PRD_POWER_FAULT)) + (rc == PRD_POWER_FAULT) ) { // save sdc, and continue if(l_saved_sdc == NULL) @@ -302,7 +306,20 @@ int32_t System::Analyze(STEP_CODE_DATA_STRUCT & serviceData, *serviceData.service_data); l_saved_rc = rc; } - // TODO clear serviceData ? + + if( ( PRD_SCAN_COMM_REGISTER_ZERO == rc ) && + ( serviceData.service_data->isPrimaryPass() ) && + serviceData.service_data->isSecondaryErrFound() ) + { + //So, the chip was reporting attention but none of + //the FIR read had any Primary bit set. But some + //secondary bits are on though. So, we would like + //to investigate if there are other chips in + //the domain which are reporting primary attention. + l_continueInDomain = true; + serviceData.service_data->clearSecondaryErrFlag(); + } + domainAtAttentionPtr = NULL; if(rc == PRD_POWER_FAULT) @@ -311,6 +328,7 @@ int32_t System::Analyze(STEP_CODE_DATA_STRUCT & serviceData, break; } } + else if ( ( attentionType == MACHINE_CHECK ) && ( atnType != MACHINE_CHECK ) ) { @@ -344,6 +362,16 @@ int32_t System::Analyze(STEP_CODE_DATA_STRUCT & serviceData, } } // end domainAtAttentionPtr != NULL + + //so if a chip of a domain is at attention and gave us dd02, we + //would like to see other chips of the domain before moving on + //to next domain. + + if( !l_continueInDomain ) + { + domainIterator++; + } + } // end inner for loop } // end outer for loop diff --git a/src/usr/diag/prdf/common/framework/config/prdfFabricDomain.C b/src/usr/diag/prdf/common/framework/config/prdfFabricDomain.C index 58af81048..d499c3ae9 100755 --- a/src/usr/diag/prdf/common/framework/config/prdfFabricDomain.C +++ b/src/usr/diag/prdf/common/framework/config/prdfFabricDomain.C @@ -116,7 +116,6 @@ int32_t FabricDomain::Analyze(STEP_CODE_DATA_STRUCT & serviceData, void FabricDomain::Order(ATTENTION_TYPE attentionType) { - using PluginDef::bindParm; if (attentionType == MACHINE_CHECK) { @@ -130,14 +129,16 @@ void FabricDomain::Order(ATTENTION_TYPE attentionType) else // Recovered or Special { SYSTEM_DEBUG_CLASS sysdbug; - for (int32_t i = (GetSize() - 1); i >= 0; --i) //pw03 + for (int32_t i = (GetSize() - 1); i >= 0; --i) { RuleChip * l_fabChip = LookUp(i); - TARGETING::TargetHandle_t l_pchipHandle = l_fabChip->GetChipHandle(); - if ((sysdbug.IsAttentionActive(l_pchipHandle)) && - (sysdbug.GetAttentionType(l_pchipHandle ) == attentionType)) + TARGETING::TargetHandle_t l_pchipHandle = + l_fabChip->GetChipHandle(); + bool l_analysisPending = + sysdbug.isActiveAttentionPending(l_pchipHandle, attentionType ); + if ( l_analysisPending ) { - MoveToFront(i); //pw03 + MoveToFront(i); break; } } @@ -327,48 +328,22 @@ void FabricDomain::SortForRecov() std::fill(&l_sev[0], &l_sev[GetSize()], 0); // Loop through all chips. - for (uint32_t i = 0; i < GetSize(); ++i) + for ( uint32_t i = 0; i < GetSize(); ++i ) { RuleChip * l_fabChip = LookUp(i); TARGETING::TargetHandle_t l_pchipHandle = l_fabChip->GetChipHandle(); - if (sysdbug.IsAttentionActive(l_pchipHandle)) // If at attention, check. - { - - if (RECOVERABLE == sysdbug.GetAttentionType( l_pchipHandle)) - { - // Recovered, set sev 1. - l_sev[i] = 1; - } - else if (CHECK_STOP == sysdbug.GetAttentionType(l_pchipHandle)) - { - // Check for recovered error at checkstop. - ExtensibleChipFunction * l_extFunc - = l_fabChip->getExtensibleFunction("CheckForRecovered"); - - bool l_hasRer = false; - - (*l_extFunc)(l_fabChip, bindParm<bool &>(l_hasRer)); - - if (l_hasRer) - { - // Has a recovered error, sev 1. - l_sev[i] = 1; - } - } - - // Find real severity level. - if (0 != l_sev[i]) - { - ExtensibleChipFunction * l_extFunc - = l_fabChip->getExtensibleFunction( - "CheckForRecoveredSev"); - uint32_t l_cSev = 1; - (*l_extFunc)(l_fabChip, bindParm<uint32_t &>(l_cSev)); + //check if chip has an attention which has not been analyzed as yet + if( sysdbug.isActiveAttentionPending( l_pchipHandle, RECOVERABLE ) ) + { + // Find severity level. + ExtensibleChipFunction * l_extFunc + = l_fabChip->getExtensibleFunction( + "CheckForRecoveredSev"); - l_sev[i] = l_cSev; - } + (*l_extFunc)(l_fabChip, bindParm<uint32_t &>( l_sev[i] )); } + } // Find item with highest severity. @@ -376,7 +351,7 @@ void FabricDomain::SortForRecov() std::max_element(&l_sev[0], &l_sev[GetSize()], __prdfFabricDomain::lessThanOperator)) - ); //pw03 + ); } diff --git a/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C b/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C index 83c3d014f..d949a20d7 100755 --- a/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C +++ b/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C @@ -97,9 +97,13 @@ bool PllDomain::Query(ATTENTION_TYPE attentionType) for(unsigned int index = 0; (index < GetSize()) && (atAttn == false); ++index) { - if(sysdbug.IsAttentionActive(LookUp(index)->GetChipHandle())) + ExtensibleChip * l_chip = LookUp( index ); + TARGETING::TargetHandle_t l_chipTgt = l_chip->GetChipHandle(); + bool l_analysisPending = + sysdbug.isActiveAttentionPending( l_chipTgt, RECOVERABLE ); + + if( l_analysisPending ) { - ExtensibleChip * l_chip = LookUp(index); ExtensibleChipFunction * l_query = l_chip->getExtensibleFunction(QueryPllFunc); int32_t rc = (*l_query)(l_chip,PluginDef::bindParm<bool &>(atAttn)); diff --git a/src/usr/diag/prdf/common/framework/config/prdfRuleChipDomain.C b/src/usr/diag/prdf/common/framework/config/prdfRuleChipDomain.C index af0ce57ae..9c3fa4524 100755 --- a/src/usr/diag/prdf/common/framework/config/prdfRuleChipDomain.C +++ b/src/usr/diag/prdf/common/framework/config/prdfRuleChipDomain.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2008,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -46,65 +48,44 @@ bool RuleChipDomain::Query( ATTENTION_TYPE i_attnType ) RuleChip * chip = LookUp(i); TARGETING::TargetHandle_t l_pchipHandle = LookUp(i)->GetChipHandle(); - if ( sysdbug.IsAttentionActive(l_pchipHandle) ) + if ( sysdbug.isActiveAttentionPending( l_pchipHandle, i_attnType ) ) { - // First check if this chip is reporting the correct attention type. - if ( sysdbug.GetAttentionType(l_pchipHandle) == i_attnType ) + // If the attention type is a checkstop, check if the chip is + // reporting based on an externally signaled error condition. If + // so, ignore this chip (the chip reporting the checkstop will + // be found later). + + const char * funcName; + + switch(i_attnType) { - // If the attention type is a checkstop, check if the chip is - // reporting based on an externally signaled error condition. If - // so, ignore this chip (the chip reporting the checkstop will - // be found later). - - // If the attention type is RECOVERABLE and if the SN chip has an - // attached MC with a checkstop, ignore this Rec attn. - //mp01 c Start - const char * funcName; - - switch(i_attnType) - { - case CHECK_STOP: - case UNIT_CS: - funcName = "IgnoreCheckstopAttn"; - break; - case RECOVERABLE: - funcName = "IgnoreRecoveredAttn"; - break; - case SPECIAL: - funcName = "IgnoreSpecialAttn"; - break; - default: - continue; - } - - ExtensibleChipFunction * ef - = chip->getExtensibleFunction( funcName, true ); - - bool ignore = false; - (*ef)( chip, bindParm<bool &, const ATTENTION_TYPE> - (ignore, i_attnType) ); - - if ( ignore ) + case CHECK_STOP: + case UNIT_CS: + funcName = "IgnoreCheckstopAttn"; + break; + case RECOVERABLE: + funcName = "IgnoreRecoveredAttn"; + break; + case SPECIAL: + funcName = "IgnoreSpecialAttn"; + break; + default: continue; + } - o_rc = true; - break; - //mp01 c Stop + ExtensibleChipFunction * ef + = chip->getExtensibleFunction( funcName, true ); - } + bool ignore = false; + (*ef)( chip, bindParm<bool &, const ATTENTION_TYPE> + (ignore, i_attnType) ); - // If the attention type is recoverable and this chip is reporting a - // checkstop, check for recovereable errors on this chip. - if ( (i_attnType == RECOVERABLE) && - ( (sysdbug.GetAttentionType(l_pchipHandle) == CHECK_STOP) || - (sysdbug.GetAttentionType(l_pchipHandle) == UNIT_CS) ) ) - { - ExtensibleChipFunction * ef - = chip->getExtensibleFunction("CheckForRecovered"); - (*ef)(chip, bindParm<bool &>(o_rc)); + if ( ignore ) + continue; - if ( o_rc ) break; - } + o_rc = true; + + break; } } @@ -125,68 +106,36 @@ void RuleChipDomain::Order( ATTENTION_TYPE i_attnType ) RuleChip * chip = LookUp(i); TARGETING::TargetHandle_t l_pchipHandle = LookUp(i)->GetChipHandle(); - if ( sysdbug.IsAttentionActive(l_pchipHandle) ) + if ( sysdbug.isActiveAttentionPending( l_pchipHandle, i_attnType ) ) { - // Move the first chip with this attention type to the front of the - // list. - if ( sysdbug.GetAttentionType(l_pchipHandle) == i_attnType ) + switch(i_attnType) { - // If the attention type is a checkstop, check if the chip is - // reporting based on an externally signaled error condition. If - // so, ignore this chip (the chip reporting the checkstop will - // be found later). - - // If the attention type is RECOVERABLE and if the SN chip has an - // attached MC with a checkstop, ignore this Rec attn. - //mp01 c Start - switch(i_attnType) - { - case CHECK_STOP: - case UNIT_CS: - funcName = "IgnoreCheckstopAttn"; - break; - case RECOVERABLE: - funcName = "IgnoreRecoveredAttn"; - break; - case SPECIAL: - funcName = "IgnoreSpecialAttn"; - break; - default: - continue; - } - - ExtensibleChipFunction * ef - = chip->getExtensibleFunction( funcName, true ); - - bool ignore = false; - (*ef)( chip, bindParm<bool &, const ATTENTION_TYPE> - (ignore, i_attnType) ); - - if ( ignore ) + case CHECK_STOP: + case UNIT_CS: + funcName = "IgnoreCheckstopAttn"; + break; + case RECOVERABLE: + funcName = "IgnoreRecoveredAttn"; + break; + case SPECIAL: + funcName = "IgnoreSpecialAttn"; + break; + default: continue; - - MoveToFront(i); - break; - //mp01 c Stop } - // If the attention type is recoverable and this chip is reporting a - // checkstop, check for recovereable errors on this chip. - if ( (i_attnType == RECOVERABLE) && - ( (sysdbug.GetAttentionType(l_pchipHandle) == CHECK_STOP) || - (sysdbug.GetAttentionType(l_pchipHandle) == UNIT_CS) ) ) - { - ExtensibleChipFunction * ef - = chip->getExtensibleFunction("CheckForRecovered"); - bool hasRer = false; - (*ef)(chip, bindParm<bool &>(hasRer)); - - if ( hasRer ) - { - MoveToFront(i); - break; - } - } + ExtensibleChipFunction * ef + = chip->getExtensibleFunction( funcName, true ); + + bool ignore = false; + (*ef)( chip, bindParm<bool &, const ATTENTION_TYPE> + (ignore, i_attnType) ); + + if ( ignore ) + continue; + + MoveToFront(i); + break; } } } diff --git a/src/usr/diag/prdf/common/framework/register/prdfErrorRegister.C b/src/usr/diag/prdf/common/framework/register/prdfErrorRegister.C index dee5ae1fc..848d3f56d 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfErrorRegister.C +++ b/src/usr/diag/prdf/common/framework/register/prdfErrorRegister.C @@ -88,8 +88,7 @@ int32_t ErrorRegister::SetErrorSignature( STEP_CODE_DATA_STRUCT & error, switch( blen ) { case 0: - (error.service_data->GetErrorSignature())->setErrCode( - PRD_SCAN_COMM_REGISTER_ZERO ); + esig->setErrCode( PRD_SCAN_COMM_REGISTER_ZERO ); if( error.service_data->isPrimaryPass() ) { rc = PRD_SCAN_COMM_REGISTER_ZERO; @@ -130,16 +129,17 @@ ErrorRegister::ErrorRegister( SCAN_COMM_REGISTER_CLASS & r, ResolutionMap & rm, int32_t ErrorRegister::Analyze(STEP_CODE_DATA_STRUCT & error) { int32_t rc = SUCCESS; - uint32_t l_savedErrSig = 0; + ErrorSignature * esig = error.service_data->GetErrorSignature(); + if(xScrId == 0x0fff) { - ( error.service_data->GetErrorSignature() )->setRegId(scr.GetAddress()); + esig->setRegId(scr.GetAddress()); } else { - ( error.service_data->GetErrorSignature() )->setRegId( xScrId ); + esig->setRegId( xScrId ); } // Get Data from hardware @@ -154,7 +154,7 @@ int32_t ErrorRegister::Analyze(STEP_CODE_DATA_STRUCT & error) // Save signature to determine if it changes during resolution // execution. - l_savedErrSig = (error.service_data->GetErrorSignature())->getSigId(); + l_savedErrSig = esig->getSigId(); } uint32_t res_rc = Lookup(error, bl); // lookup and execute the resolutions @@ -163,8 +163,7 @@ int32_t ErrorRegister::Analyze(STEP_CODE_DATA_STRUCT & error) // If we had a DD02 and the signature changes, ignore DD02. if ( rc == PRD_SCAN_COMM_REGISTER_ZERO ) { - uint32_t l_currentSig = - error.service_data->GetErrorSignature()->getSigId(); + uint32_t l_currentSig = esig->getSigId(); if( l_currentSig != l_savedErrSig ) { // Found a better answer during the DD02 analysis. @@ -192,10 +191,10 @@ int32_t ErrorRegister::Analyze(STEP_CODE_DATA_STRUCT & error) } else // scr read failed { - ( error.service_data->GetErrorSignature() )->setErrCode( - PRD_SCANCOM_FAILURE ); + esig->setErrCode( PRD_SCANCOM_FAILURE ); rc = scr_rc; } + return(rc); } diff --git a/src/usr/diag/prdf/common/framework/rule/prdfGroup.C b/src/usr/diag/prdf/common/framework/rule/prdfGroup.C index 893ea18c5..ad8042fe7 100755 --- a/src/usr/diag/prdf/common/framework/rule/prdfGroup.C +++ b/src/usr/diag/prdf/common/framework/rule/prdfGroup.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2004,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -73,7 +75,14 @@ int32_t Group::Analyze(STEP_CODE_DATA_STRUCT & i_step) (i != l_errRegsEnd) && (l_rc != SUCCESS); ++i) { + bool l_secErr = i_step.service_data->isSecondaryErrFound(); (*i_step.service_data) = l_backupStep; + + if( l_secErr ) + { + i_step.service_data->setSecondaryErrFlag(); + } + l_tmpRC = (*i)->Analyze(i_step); if (PRD_SCAN_COMM_REGISTER_ZERO != l_tmpRC) @@ -81,7 +90,7 @@ int32_t Group::Analyze(STEP_CODE_DATA_STRUCT & i_step) l_rc = l_tmpRC; } } - if (PRD_SCAN_COMM_REGISTER_ZERO == l_tmpRC) + if ( PRD_SCAN_COMM_REGISTER_ZERO == l_tmpRC ) { l_rc = l_tmpRC; } diff --git a/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h b/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h index 0a52e942c..673338dcd 100755 --- a/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h +++ b/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h @@ -134,6 +134,7 @@ public: PRDF_SDC_FLAG(TRACKIT, 0x00010) PRDF_SDC_FLAG(TERMINATE, 0x00008) PRDF_SDC_FLAG(LOGIT, 0x00004) + PRDF_SDC_FLAG(SECONDARY_ERRORS_FOUND, 0x00002) PRDF_SDC_FLAGS_MAP_END /** Defines Analysis pass related properties. @@ -716,7 +717,21 @@ public: /** Is a Using Saved SDC on? */ bool IsUsingSavedSdc (void) const { return (flags & USING_SAVED_SDC) != 0 ? true:false; } - /** Is a Force Lantent Check Stop flag on? */ + /** + * @brief sets flag indicating only secondary error bit is set in FIR + */ + void setSecondaryErrFlag( ) { flags |= SECONDARY_ERRORS_FOUND; } + + /** + * @brief clears flag indicating only secondary error bit is set in FIR + */ + void clearSecondaryErrFlag() { ( flags &= ~SECONDARY_ERRORS_FOUND ); } + /** + * @brief returns true if there is only secondary error. + * @return true if secondary is found false otherwise. + */ + bool isSecondaryErrFound() const + { return ( ( flags & SECONDARY_ERRORS_FOUND ) != 0 ); } #ifndef __HOSTBOOT_MODULE diff --git a/src/usr/diag/prdf/common/framework/service/iipsdbug.h b/src/usr/diag/prdf/common/framework/service/iipsdbug.h index d2ba6c940..2f50cceb4 100755 --- a/src/usr/diag/prdf/common/framework/service/iipsdbug.h +++ b/src/usr/diag/prdf/common/framework/service/iipsdbug.h @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2002,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -140,28 +142,28 @@ public: uint32_t Reinitialize(const AttnList & i_attnList); /** - Indicates if an attention is active for a particular chip - <ul> - <br><b>Parameters: </b> i_pTargetHandle - <br><b>Returns: </b> [true | false] - <br><b>Requirements:</b> None. - <br><b>Promises: </b> None. - <br><b>Exceptions: </b> None. - </ul><br> + * @brief Indicates if an attention is active and still not analyzed + * @param i_chipTrgt chip under investigation for pending active attn. + * @param i_attn Attn for which analysis status is to be determined. + * @return [true | false] */ - bool IsAttentionActive(TARGETING::TargetHandle_t i_ptargetHandle ) const; + bool isActiveAttentionPending( + TARGETING::TargetHandle_t i_chipTrgt, + ATTENTION_TYPE i_attn = INVALID_ATTENTION_TYPE ) const; /** - Indicates if an attention is active for a particular chip - <ul> - <br><b>Parameters: </b> ChipClass - <br><b>Returns: </b> [true | false] - <br><b>Requirements:</b> None. - <br><b>Promises: </b> None. - <br><b>Exceptions: </b> None. - </ul><br> + * @brief clears the active attention pending status + * @param i_chipTrgt chip for which pending status is set to false. + * @param i_attn Attn for which analysis status is to be determined. */ -// bool IsAttentionActive(const CHIP_CLASS & chip) const; + void clearAttnPendingStatus( TARGETING::TargetHandle_t i_chipTgt, + ATTENTION_TYPE i_attn ); + + /** + * @brief sets attention analysis pending status to true for all chips in + * the attention list for each type of attention. + */ + void initAttnPendingtatus( ); /** Get the attention type for the attention that is active on this chip @@ -293,7 +295,13 @@ public: void SetAttentionType( TARGETING::TargetHandle_t i_pTargetHandle, ATTENTION_VALUE_TYPE i_eAttentionType ); - // SetGlobalAttentionType(uint8_t ga); // FIXME : remove this function when merge, no longer used + /** + * @brief Adds a chip to the list of chips reporting attention. + * @param i_chipTgt chip to be added to the list. + * @param i_attnType attn associated with the chip + */ + void addChipToAttnList( TARGETING::TargetHandle_t i_chipTgt, + ATTENTION_VALUE_TYPE i_attnType ); private: diff --git a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C index 88cde46a9..94995a5af 100644 --- a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C +++ b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C @@ -835,6 +835,7 @@ void ErrDataService::initPfaData( const ServiceDataCollector & i_sdc, o_pfa.LAST_CORE_TERMINATE = 0; // Will be set later, if needed. o_pfa.USING_SAVED_SDC = i_sdc.IsUsingSavedSdc() ? 1 : 0; o_pfa.DEFER_DECONFIG = i_deferDeconfig ? 1 : 0; + o_pfa.SECONDARY_ERROR = i_sdc.isSecondaryErrFound() ? 1 : 0; // Thresholding o_pfa.errorCount = i_sdc.GetHits(); diff --git a/src/usr/diag/prdf/common/framework/service/xspprdsdbug.C b/src/usr/diag/prdf/common/framework/service/xspprdsdbug.C index 5899af572..1daa587f6 100755 --- a/src/usr/diag/prdf/common/framework/service/xspprdsdbug.C +++ b/src/usr/diag/prdf/common/framework/service/xspprdsdbug.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2000,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -54,6 +56,10 @@ #include <prdfBitString.H> #include <prdfPlatServices.H> #include <prdfErrlUtil.H> +#include <prdfRuleChip.H> +#include <iipSystem.h> +#include <prdfPluginDef.H> +#include <algorithm> #undef xspprdsdbug_C @@ -88,6 +94,44 @@ bool g_init_done = false; uint32_t * g_src = NULL; //--------------------------------------------------------------------- + +bool findAttention( TARGETING::TargetHandle_t i_chipTgt, + ATTENTION_VALUE_TYPE i_eAttnType, + AttnList::iterator & it ) +{ + bool matchFound = false; + + AttnData l_attnData( i_chipTgt, i_eAttnType ); + it = std::lower_bound( g_AttnDataList.begin(), + g_AttnDataList.end(), + l_attnData ); + + if( it != g_AttnDataList.end() && *it == l_attnData ) + { + matchFound = true; + } + + return matchFound; +} + +//--------------------------------------------------------------------- + +bool findTarget( TARGETING::TargetHandle_t i_chipTgt, + AttnList::iterator & it ) +{ + bool matchFound = false; + it = std::lower_bound( g_AttnDataList.begin(), g_AttnDataList.end(), + i_chipTgt ); + + if( it != g_AttnDataList.end() && i_chipTgt == (*it).targetHndl ) + { + matchFound = true; + } + + return matchFound; +} + +//--------------------------------------------------------------------- // Member Function Specifications //--------------------------------------------------------------------- @@ -97,6 +141,7 @@ SYSTEM_DEBUG_CLASS::SYSTEM_DEBUG_CLASS(void) uint32_t SYSTEM_DEBUG_CLASS::Reinitialize(const AttnList & i_attnList) { + using PluginDef::bindParm; uint32_t l_rc = 0; do @@ -139,7 +184,34 @@ uint32_t SYSTEM_DEBUG_CLASS::Reinitialize(const AttnList & i_attnList) break; } - g_AttnDataList = i_attnList; + Clear(); + for( AttnList::const_iterator i = i_attnList.begin(); + i != i_attnList.end(); ++i ) + { + addChipToAttnList( (*i).targetHndl,(*i).attnType ); + + // There can be a case where chip has both recoverable and Check + // Stop. In that case chip shall report only Check Stop. In such a + // case, we analyse the recoverable first and see if we can blame + // check stop on recoverable. To ease its handling, let us add a + // chip reporting recoverable attention to attention list. + + if( ((*i).attnType == CHECK_STOP ) || ((*i).attnType == UNIT_CS ) ) + { + bool l_recovFound = false; + ExtensibleChip * l_chip = + ( ExtensibleChip *) systemPtr->GetChip( (*i).targetHndl ); + ExtensibleChipFunction * ef + = l_chip->getExtensibleFunction("CheckForRecovered"); + + (*ef)( l_chip, bindParm<bool &>( l_recovFound ) ); + + if ( l_recovFound ) + { + addChipToAttnList( (*i).targetHndl,RECOVERABLE ); + } + } + } g_init_done = true; @@ -150,19 +222,24 @@ uint32_t SYSTEM_DEBUG_CLASS::Reinitialize(const AttnList & i_attnList) // -------------------------------------------------------------------- -bool SYSTEM_DEBUG_CLASS::IsAttentionActive( TARGETING::TargetHandle_t i_pChipHandle ) const +bool SYSTEM_DEBUG_CLASS::isActiveAttentionPending( + TARGETING::TargetHandle_t i_chipTrgt, + ATTENTION_TYPE i_attn ) const { - bool rc = false; - - for(AttnList::const_iterator i = g_AttnDataList.begin(); i != g_AttnDataList.end(); ++i) + bool o_rc = false; + ATTENTION_VALUE_TYPE attn ; + //FIXME RTC 118194 shall investigate need for ATTENTION_VALUE_TYPE and + //ATTENTION_TYPE. If possible one will be removed. + attn = ( ATTENTION_VALUE_TYPE )i_attn; + AttnData l_attnData( i_chipTrgt, attn ); + AttnList::iterator it; + + if( findAttention( i_chipTrgt, attn, it ) ) { - if((*i).targetHndl == i_pChipHandle) - { - rc = true; - break; - } + o_rc = (*it).isAnalysisNotDone; } - return rc; + + return o_rc; } // -------------------------------------------------------------------- @@ -194,23 +271,31 @@ TargetHandle_t SYSTEM_DEBUG_CLASS::getTargetWithAttn // ------------------------------------------------------------------- -uint8_t SYSTEM_DEBUG_CLASS::GetAttentionType(TARGETING::TargetHandle_t i_pChipHandle) const +uint8_t SYSTEM_DEBUG_CLASS::GetAttentionType( TargetHandle_t i_chipTgt ) const { uint8_t type = INVALID_ATTENTION_TYPE; - - for(AttnList::const_iterator i = g_AttnDataList.begin(); i != g_AttnDataList.end(); ++i) + AttnList::iterator it; + + // Attention list is sorted. If a given target say X reports + // both recoverable and platform check stop, we shall have two entries for + // X in attention list. Also, following will be the order + // 1. Entry with Platform CS + // 2. Entry with Recoverable + // It's because platform checktop attention has an enum value lower than + // recoverable attention. When findTarget shall look for target X and an + // attention type in the attention list, it shall see platform checkstop + // entry before recoverable one. It's because entry with Platform CS will + // occupy lower position in the list compared to entry with Recoverable + // attention. + + if( findTarget( i_chipTgt, it ) ) { - if((*i).targetHndl == i_pChipHandle) - { - type = (uint8_t) (*i).attnType; - break; - } + type = (*it).attnType; } return (uint8_t) type; } - // ------------------------------------------------------------------- void SYSTEM_DEBUG_CLASS::SetPrdSrcPointer() @@ -225,13 +310,15 @@ void SYSTEM_DEBUG_CLASS::SetPrdSrcPointer(uint32_t* src_ptr) // ------------------------------------------------------------------- -void SYSTEM_DEBUG_CLASS::CalloutThoseAtAttention(STEP_CODE_DATA_STRUCT & serviceData) const +void SYSTEM_DEBUG_CLASS::CalloutThoseAtAttention( + STEP_CODE_DATA_STRUCT & serviceData) const { ServiceDataCollector * sdc = serviceData.service_data; CaptureData & capture = sdc->GetCaptureData(); - for(AttnList::const_iterator i = g_AttnDataList.begin(); i != g_AttnDataList.end(); ++i) + for( AttnList::const_iterator i = g_AttnDataList.begin(); + i != g_AttnDataList.end(); ++i ) { sdc->SetCallout((*i).targetHndl); AttnData ad(*i); @@ -244,6 +331,46 @@ void SYSTEM_DEBUG_CLASS::CalloutThoseAtAttention(STEP_CODE_DATA_STRUCT & service } +// ------------------------------------------------------------------- + +void SYSTEM_DEBUG_CLASS::clearAttnPendingStatus( + TARGETING::TargetHandle_t i_chipTgt, + ATTENTION_TYPE i_attnType ) +{ + ATTENTION_VALUE_TYPE attn ; + attn = ( ATTENTION_VALUE_TYPE )i_attnType; + AttnData l_attn( i_chipTgt, attn ); + AttnList::iterator it; + + if( findAttention( i_chipTgt, attn, it ) ) + { + (*it).isAnalysisNotDone = false; + } +} + +// ------------------------------------------------------------------- + +void SYSTEM_DEBUG_CLASS::initAttnPendingtatus( ) +{ + for( AttnList::iterator i = g_AttnDataList.begin(); + i != g_AttnDataList.end(); ++i ) + { + (*i).isAnalysisNotDone = true; + } +} + +// ------------------------------------------------------------------- + +void SYSTEM_DEBUG_CLASS::addChipToAttnList( + TARGETING::TargetHandle_t i_chipTgt, + ATTENTION_VALUE_TYPE i_attnType ) +{ + AttnData l_attnData( i_chipTgt, i_attnType ); + g_AttnDataList.insert( std::lower_bound( g_AttnDataList.begin(), + g_AttnDataList.end(), l_attnData ), l_attnData ); +} + + // -------------------------------------------------------------------- // SIMULATION SUPPORT for setting up sysdbug // -------------------------------------------------------------------- @@ -257,12 +384,12 @@ void SYSTEM_DEBUG_CLASS::SetAttentionType(TARGETING::TargetHandle_t i_pTargetHan { if(i_eAttnType > INVALID_ATTENTION_TYPE) { - if(!IsAttentionActive(i_pTargetHandle)) + if( !isActiveAttentionPending( i_pTargetHandle, i_eAttnType ) ) { - AttnData attnData; - attnData.targetHndl = i_pTargetHandle; - attnData.attnType = i_eAttnType; - g_AttnDataList.push_back(attnData); + AttnData attnData( i_pTargetHandle, i_eAttnType ); + g_AttnDataList.insert( std::lower_bound( g_AttnDataList.begin(), + g_AttnDataList.end(), + attnData ), attnData ); } } } diff --git a/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C b/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C index f586c7df2..8ca90f038 100644 --- a/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C +++ b/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C @@ -481,6 +481,7 @@ bool parsePfaData( void * i_buffer, uint32_t i_buflen, i_parser.PrintBool(" Using Sync'd Saved Sdc", pfa.USING_SAVED_SDC ); i_parser.PrintBool(" Last Core Termination", pfa.LAST_CORE_TERMINATE); i_parser.PrintBool(" Deferred Deconfig", pfa.DEFER_DECONFIG ); + i_parser.PrintBool(" Secondary Error", pfa.SECONDARY_ERROR ); // Attention types i_parser.PrintNumber("Primary ATTN type", "0x%02X", pfa.priAttnType); diff --git a/src/usr/diag/prdf/common/plugins/prdfPfa5Data.h b/src/usr/diag/prdf/common/plugins/prdfPfa5Data.h index 196647d4c..b5bf9ec86 100644 --- a/src/usr/diag/prdf/common/plugins/prdfPfa5Data.h +++ b/src/usr/diag/prdf/common/plugins/prdfPfa5Data.h @@ -162,7 +162,8 @@ struct PfaData USING_SAVED_SDC :1, LAST_CORE_TERMINATE :1, DEFER_DECONFIG :1, - Reserved :19; + SECONDARY_ERROR :1, + Reserved :18; // Thresholding uint32_t errorCount :16, // Number of occurrences of this attention @@ -216,6 +217,7 @@ struct PfaData (i_right.USING_SAVED_SDC << 19) | (i_right.LAST_CORE_TERMINATE << 18) | (i_right.DEFER_DECONFIG << 17) | + (i_right.SECONDARY_ERROR << 16) | (i_right.Reserved ) ); i_left << ( (i_right.errorCount << 16) | @@ -268,6 +270,7 @@ struct PfaData i_right.USING_SAVED_SDC = (l_tmp[2] >> 19) & 0x01; i_right.LAST_CORE_TERMINATE = (l_tmp[2] >> 18) & 0x01; i_right.DEFER_DECONFIG = (l_tmp[2] >> 17) & 0x01; + i_right.SECONDARY_ERROR = (l_tmp[2] >> 16) & 0x01; i_right.errorCount = (l_tmp[3] >> 16) & 0xFFFF; i_right.threshold = (l_tmp[3] ) & 0xFFFF; diff --git a/src/usr/diag/prdf/common/prdfMain_common.C b/src/usr/diag/prdf/common/prdfMain_common.C index 5774ec592..7bf37faa9 100755 --- a/src/usr/diag/prdf/common/prdfMain_common.C +++ b/src/usr/diag/prdf/common/prdfMain_common.C @@ -269,6 +269,13 @@ errlHndl_t main( ATTENTION_VALUE_TYPE i_attentionType, // starting the second pass PRDF_INF( "PRDF::main() No bits found set in first pass," " starting second pass" ); + sysdebug.initAttnPendingtatus( ); //for the second pass + + if( l_tempSdc.isSecondaryErrFound() ) + { + sdc.service_data->setSecondaryErrFlag(); + } + analyzeRc = systemPtr->Analyze( sdc, i_attentionType ); // merging capture data of primary pass with capture data of diff --git a/src/usr/diag/prdf/common/util/prdfErrorSignature.H b/src/usr/diag/prdf/common/util/prdfErrorSignature.H index f91cf19ea..9ed4cd7fd 100755 --- a/src/usr/diag/prdf/common/util/prdfErrorSignature.H +++ b/src/usr/diag/prdf/common/util/prdfErrorSignature.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -144,6 +146,10 @@ class ErrorSignature } /** + * @brief Returns the error code. + */ + uint16_t getErrorCode() { return iv_errCode; } + /** * @return The chip ID. */ uint32_t getChipId() const { return iv_chipId; } diff --git a/src/usr/diag/prdf/common/util/prdfFilters.C b/src/usr/diag/prdf/common/util/prdfFilters.C index 141688bf3..8d90d1637 100755 --- a/src/usr/diag/prdf/common/util/prdfFilters.C +++ b/src/usr/diag/prdf/common/util/prdfFilters.C @@ -181,6 +181,7 @@ bool FilterLink::Undo( BitKey & bit_list ) bool SecondaryBitsFilter::Apply( BitKey & io_bitList, STEP_CODE_DATA_STRUCT & io_sdc ) { + #define PRDF_FUNC "[SecondaryBitsFilter::Apply] " bool l_modified = false; do { @@ -195,9 +196,18 @@ bool SecondaryBitsFilter::Apply( BitKey & io_bitList, io_bitList.removeBits( l_key ); l_modified = true; + if( 0 == io_bitList.size() ) + { + // So, we have no primary bits on. We have one or more secondary bit + // on. + io_sdc.service_data->setSecondaryErrFlag(); + } + }while(0); return l_modified; + + #undef PRDF_FUNC } } //End namespace PRDF diff --git a/src/usr/diag/prdf/test/prdfsimServices.C b/src/usr/diag/prdf/test/prdfsimServices.C index a153f08d9..84d015a15 100755 --- a/src/usr/diag/prdf/test/prdfsimServices.C +++ b/src/usr/diag/prdf/test/prdfsimServices.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -26,6 +28,7 @@ #include <prdfMain.H> #include <prdfTrace.H> #include <prdfGlobal.H> +#include <algorithm> #include "prdfsimUtil.H" #include "prdsimSignatureParser.H" @@ -149,10 +152,10 @@ namespace PRDF void SimServices::addAttnEntry(const char * i_epath, ATTENTION_VALUE_TYPE i_attnType) { - AttnData l_attnEntry; - l_attnEntry.targetHndl = string2Target(i_epath); - l_attnEntry.attnType = i_attnType; - iv_attnList.push_back(l_attnEntry); + AttnData l_attnEntry( string2Target(i_epath), i_attnType ); + iv_attnList.insert( std::lower_bound( iv_attnList.begin(), + iv_attnList.end(), l_attnEntry ), + l_attnEntry ); // If the target in sim is not functional, // set to functional and destroy the PRD config |