void addMemChipletFirRegs( ExtensibleChip * i_membChip, CaptureData & io_cd ) { #define PRDF_FUNC "[CenMbaCaptureData::addMemChipletFirRegs] " int32_t l_rc = SUCCESS; do { if ( NULL == i_membChip ) { PRDF_ERR( PRDF_FUNC "Given target is NULL" ); break; } if ( TYPE_MEMBUF != getTargetType(i_membChip->GetChipHandle()) ) { PRDF_ERR( PRDF_FUNC "Invalid target type: i_membChip=0x%08x", i_membChip->GetId() ); break; } SCAN_COMM_REGISTER_CLASS * cs_global, * re_global, * spa_global; cs_global = i_membChip->getRegister("GLOBAL_CS_FIR"); re_global = i_membChip->getRegister("GLOBAL_RE_FIR"); spa_global = i_membChip->getRegister("GLOBAL_SPA"); l_rc = cs_global->Read() | re_global->Read() | spa_global->Read(); if ( SUCCESS != l_rc ) { PRDF_ERR( PRDF_FUNC "Failed to read a GLOBAL register on " "0x%08x", i_membChip->GetId() ); break; } // If global bit 3 is not on, can't scom mem chiplets or mba's if( ! (cs_global->IsBitSet(3) || re_global->IsBitSet(3) || spa_global->IsBitSet(3)) ) { break; } i_membChip->CaptureErrorData(io_cd, Util::hashString("MemChipletRegs")); CenMembufDataBundle * membdb = getMembufDataBundle( i_membChip ); for ( uint32_t i = 0; i < MAX_MBA_PER_MEMBUF; i++ ) { ExtensibleChip * mbaChip = membdb->getMbaChip(i); if ( NULL == mbaChip ) { PRDF_ERR( PRDF_FUNC "MEM_CHIPLET registers indicated an " "attention but no chip found: i_membChip=0x%08x " "i=%d", i_membChip->GetId(), i ); continue; } mbaChip->CaptureErrorData(io_cd, Util::hashString("MemChipletRegs") ); } } while (0); #undef PRDF_FUNC }
/** * @brief Analysis code that is called before the main analyze() function. * @param i_mbChip A MEMBUF chip. * @param i_sc Step Code Data structure * @param o_analyzed TRUE if analysis has been done on this chip * @return failure or success */ int32_t PreAnalysis( ExtensibleChip * i_mbChip, STEP_CODE_DATA_STRUCT & i_sc, bool & o_analyzed ) { #define PRDF_FUNC "[Membuf::PreAnalysis] " int32_t o_rc = SUCCESS; o_analyzed = false; // Get memory capture data. CaptureData & cd = i_sc.service_data->GetCaptureData(); CenMembufDataBundle * mbdb = getMembufDataBundle( i_mbChip ); ExtensibleChip * mcsChip = mbdb->getMcsChip(); if ( NULL != mcsChip ) { mcsChip->CaptureErrorData( cd, Util::hashString("FirRegs") ); mcsChip->CaptureErrorData( cd, Util::hashString("CerrRegs") ); CenMbaCaptureData::addMemChipletFirRegs( i_mbChip, cd ); } // Check for a Centaur Checkstop do { // Skip if we're already analyzing a unit checkstop if ( i_sc.service_data->GetFlag(ServiceDataCollector::UNIT_CS) ) break; // Skip if we're analyzing a special attention. // This is a required for a rare scenario when Centaur CS bit comes // up after attention has called PRD and PRD was still at start of // analysis. if ( SPECIAL == i_sc.service_data->GetAttentionType() ) break; // MCIFIR[31] is not always reliable if the unit CS originated on the // Centaur. This is due to packets not getting forwarded to the MCS. // Instead, check for non-zero GLOBAL_CS_FIR. SCAN_COMM_REGISTER_CLASS * fir = i_mbChip->getRegister("GLOBAL_CS_FIR"); o_rc = fir->Read(); if ( SUCCESS != o_rc ) { PRDF_ERR( PRDF_FUNC"Failed to read GLOBAL_CS_FIR on 0x%08x", i_mbChip->GetId() ); break; } if ( fir->BitStringIsZero() ) break; // No unit checkstop // Set Unit checkstop flag i_sc.service_data->SetFlag(ServiceDataCollector::UNIT_CS); i_sc.service_data->SetThresholdMaskId(0); // Set the cause attention type i_sc.service_data->SetCauseAttentionType(UNIT_CS); } while (0); return o_rc; #undef PRDF_FUNC }