/** * @brief Captures trapped address for L4 cache ECC errors. * @param i_mbChip Centaur chip * @param i_sc Step code data struct * @returns SUCCESS always * @note This function also reset ECC trapped address regsiters so that HW * can capture address for next L4 ecc error. */ int32_t CaptureL4CacheErr( ExtensibleChip * i_mbChip, STEP_CODE_DATA_STRUCT & i_sc ) { #define PRDF_FUNC "[CaptureL4CacheErr] " do { i_mbChip->CaptureErrorData( i_sc.service_data->GetCaptureData(), Util::hashString( "L4CacheErr" ) ); // NOTE: FW should write on MBCELOG so that HW can capture // address for next L4 CE error. SCAN_COMM_REGISTER_CLASS * mbcelogReg = i_mbChip->getRegister("MBCELOG"); mbcelogReg->clearAllBits(); if ( SUCCESS != mbcelogReg->Write() ) { PRDF_ERR( PRDF_FUNC"MBCELOG write failed for 0x%08x", i_mbChip->GetId()); break; } }while( 0 ); return SUCCESS; }
int32_t clearPerSymbolCounters( ExtensibleChip * i_membChip, uint32_t i_mbaPos ) { #define PRDF_FUNC "[MemUtils::clearPerSymbolCounters] " int32_t o_rc = SUCCESS; do { if ( MAX_MBA_PER_MEMBUF <= i_mbaPos ) { PRDF_ERR( PRDF_FUNC "i_mbaPos %d is invalid", i_mbaPos ); o_rc = FAIL; break; } const char * reg_str = NULL; SCAN_COMM_REGISTER_CLASS * reg = NULL; for ( uint8_t regIdx = 0; regIdx < CE_REGS_PER_MBA; regIdx++ ) { reg_str = mbsCeStatReg[i_mbaPos][regIdx]; reg = i_membChip->getRegister( reg_str ); reg->clearAllBits(); o_rc = reg->Write(); if ( SUCCESS != o_rc ) { PRDF_ERR( PRDF_FUNC "Write() failed on %s", reg_str ); break; } } if ( SUCCESS != o_rc ) break; } while(0); if ( SUCCESS != o_rc ) { PRDF_ERR( PRDF_FUNC "Failed. i_membChip=0x%08x i_mbaPos=%d", i_membChip->GetId(), i_mbaPos ); } return o_rc; #undef PRDF_FUNC }
/** * @brief Clear the PLL error for P8 Plugin * @param i_chip P8 chip * @param i_sc The step code data struct * @returns Failure or Success of query. */ int32_t ClearPllIo( ExtensibleChip * i_chip, STEP_CODE_DATA_STRUCT & i_sc) { #define PRDF_FUNC "[Proc::ClearPllIo] " int32_t rc = SUCCESS; if (CHECK_STOP != i_sc.service_data->getPrimaryAttnType()) { // Clear pci osc error reg bit int32_t tmpRC = SUCCESS; SCAN_COMM_REGISTER_CLASS * pciErrReg = i_chip->getRegister("PCI_ERROR_REG"); tmpRC = pciErrReg->Read(); if (tmpRC != SUCCESS) { PRDF_ERR(PRDF_FUNC "PCI_ERROR_REG read failed" "for chip: 0x%08x", i_chip->GetId()); rc |= tmpRC; } if( pciErrReg->IsBitSet( PLL_ERROR_BIT ) ) { pciErrReg->clearAllBits(); pciErrReg->SetBit(PLL_ERROR_BIT); tmpRC = pciErrReg->Write(); if ( SUCCESS != tmpRC ) { PRDF_ERR( PRDF_FUNC "Write() failed on PCI Error register: " "proc=0x%08x", i_chip->GetId() ); rc |= tmpRC; } } // Clear TP_LFIR SCAN_COMM_REGISTER_CLASS * TP_LFIRand = i_chip->getRegister("TP_LFIR_AND"); TP_LFIRand->setAllBits(); TP_LFIRand->ClearBit(PLL_DETECT_P8); tmpRC = TP_LFIRand->Write(); if (tmpRC != SUCCESS) { PRDF_ERR(PRDF_FUNC "TP_LFIR_AND write failed" "for chip: 0x%08x", i_chip->GetId()); rc |= tmpRC; } SCAN_COMM_REGISTER_CLASS * oscCerrReg = i_chip->getRegister("OSCERR"); tmpRC = oscCerrReg->Read(); if (tmpRC != SUCCESS) { PRDF_ERR(PRDF_FUNC "OSCERR read failed" "for 0x%08x", i_chip->GetId()); rc |= tmpRC; } oscCerrReg->ClearBit(4); oscCerrReg->ClearBit(5); tmpRC = oscCerrReg->Write(); if (tmpRC != SUCCESS) { PRDF_ERR(PRDF_FUNC "oscCerrReg write failed" "for chip: 0x%08x", i_chip->GetId()); rc |= tmpRC; } } if( rc != SUCCESS ) { PRDF_ERR(PRDF_FUNC "failed for proc: 0x%.8X", i_chip->GetId()); } return rc; #undef PRDF_FUNC }