void FabricDomain::Order(ATTENTION_TYPE attentionType) { using PluginDef::bindParm; if (attentionType == MACHINE_CHECK) { SortForXstop(); } else if (attentionType == RECOVERABLE) { SortForRecov(); } else // Recovered or Special { SYSTEM_DEBUG_CLASS sysdbug; for (int32_t i = (GetSize() - 1); i >= 0; --i) //pw03 { RuleChip * l_fabChip = LookUp(i); TARGETING::TargetHandle_t l_pchipHandle = l_fabChip->GetChipHandle(); if ((sysdbug.IsAttentionActive(l_pchipHandle)) && (sysdbug.GetAttentionType(l_pchipHandle ) == attentionType)) { MoveToFront(i); //pw03 break; } } } }
void FabricDomain::SortForRecov() { using namespace PluginDef; SYSTEM_DEBUG_CLASS sysdbug; uint32_t l_sev[GetSize()]; std::fill(&l_sev[0], &l_sev[GetSize()], 0); // Loop through all chips. 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)); l_sev[i] = l_cSev; } } } // Find item with highest severity. MoveToFront(std::distance(&l_sev[0], std::max_element(&l_sev[0], &l_sev[GetSize()], __prdfFabricDomain::lessThanOperator)) ); //pw03 }
bool PllDomain::Query(ATTENTION_TYPE attentionType) { bool atAttn = false; // System always checks for RE's first, even if there is an XSTOP // So we only need to check for PLL errors on RECOVERABLE type if(attentionType == RECOVERABLE) { // check sysdbug for attention first SYSTEM_DEBUG_CLASS sysdbug; for(unsigned int index = 0; (index < GetSize()) && (atAttn == false); ++index) { if(sysdbug.IsAttentionActive(LookUp(index)->GetChipHandle())) { ExtensibleChip * l_chip = LookUp(index); ExtensibleChipFunction * l_query = l_chip->getExtensibleFunction("QueryPll"); int32_t rc = (*l_query)(l_chip,PluginDef::bindParm<bool &>(atAttn)); // if rc then scom read failed - Error log has already been generated if( PRD_POWER_FAULT == rc ) { PRDF_ERR( "prdfPllDomain::Query() Power Fault detected!" ); break; } else if(SUCCESS != rc) { PRDF_ERR( "prdfPllDomain::Query() SCOM fail. RC=%x", rc ); } } } } return(atAttn); }
inline bool DomainContainer<T>::Query(ATTENTION_TYPE attentionType) // DG03 { 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) { if(sysdebug.GetAttentionType(l_pchipHandle) == attentionType) rc = true; } } return(rc); }