int32_t ErrorRegister::SetErrorSignature( STEP_CODE_DATA_STRUCT & error, BitKey & bl ) { int32_t rc = SUCCESS; ErrorSignature * esig = error.service_data->GetErrorSignature(); uint32_t blen = bl.size(); switch( blen ) { case 0: esig->setErrCode( PRD_SCAN_COMM_REGISTER_ZERO ); if( error.service_data->isPrimaryPass() ) { rc = PRD_SCAN_COMM_REGISTER_ZERO; } else if( !xNoErrorOnZeroScr ) { rc = PRD_SCAN_COMM_REGISTER_ZERO; } break; case 1: esig->setErrCode(bl.getListValue(0)); break; default: for( uint32_t index = 0; index < blen; ++index ) { esig->setErrCode(bl.getListValue(index)); } esig->setErrCode(PRD_MULTIPLE_ERRORS); }; return rc; }
int32_t AndResetErrorRegister::Reset(const BitKey & bit_list, STEP_CODE_DATA_STRUCT & error) { #ifndef __HOSTBOOT_MODULE ServiceDataCollector & sdc = *(error.service_data); SyncAnalysis (sdc); #endif // set internal mask bits if threshold int32_t rc = ErrorRegisterMask::Reset(bit_list,error); // set mask bits and undo filters uint32_t bl_length = bit_list.size(); if(bl_length !=0) { BIT_STRING_BUFFER_CLASS bs(xAndResetScr.GetBitLength()); bs.Pattern(0xffffffff,32); // set to all ones uint32_t i; for(i = 0; i < bl_length; ++i) // Turn off all bits used to isolate problem { bs.Clear(bit_list.getListValue(i)); } xAndResetScr.SetBitString(&bs); // copy bs to SCR bit string rc = xAndResetScr.Write(); // Write hardware (result = Hareware value ANDed with bs) } return rc; }
//--------------------------------------------------------------------- // Member Function Specifications //--------------------------------------------------------------------- int32_t ResetErrorRegister::Reset(const BitKey & bit_list, STEP_CODE_DATA_STRUCT & error) { #ifndef __HOSTBOOT_MODULE ServiceDataCollector & sdc = *(error.service_data); SyncAnalysis (sdc); //Add call to Sync SDC #endif int32_t rc = ErrorRegisterMask::Reset(bit_list,error); // set mask bits & undo filters uint32_t bl_length = bit_list.size(); if(bl_length != 0) // Check for bits to reset { if(&scr != resetScr) // reset different then ereg scr - move bits { resetScr->SetBitString(scr.GetBitString()); } uint32_t i; for(i = 0; i < bl_length; ++i) // Turn off all bits specified { resetScr->ClearBit(bit_list.getListValue(i)); } rc = resetScr->Write(); // Write hardware } return rc; }
int32_t XorResetErrorRegister::Reset(const BitKey & bit_list, STEP_CODE_DATA_STRUCT & error) { #ifndef __HOSTBOOT_MODULE ServiceDataCollector & sdc = *(error.service_data); SyncAnalysis (sdc); #endif int32_t rc = ErrorRegisterMask::Reset(bit_list,error); // set mask bits and undo filters uint32_t bl_length = bit_list.size(); if(bl_length != 0) // Check for bits to reset { scr.clearAllBits(); // Turn on all bits to be reset // We acted on all bits in bit_list so they should all be on // in the hdw register uint32_t i; for(i = 0; i < bl_length; ++i) // Turn on bits to be reset { scr.SetBit(bit_list.getListValue(i)); } rc = scr.Write(); // Write hardware } return rc; }