Ejemplo n.º 1
0
//---------------------------------------------------------------------
// 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;
}
Ejemplo n.º 2
0
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;
}
Ejemplo n.º 3
0
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;
}
Ejemplo n.º 4
0
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;
}
Ejemplo n.º 5
0
bool PrioritySingleBitFilter::Apply( BitKey & bit_list,
                                     STEP_CODE_DATA_STRUCT & io_sdc )
{
    bool l_modified = false;

    // Do priority bit.
    for ( size_t i = 0; i < iv_bitList.size(); i++ )
    {
        BitKey l_key = iv_bitList[i];
        if ( bit_list.isSubset(l_key) )
        {
            l_modified = true;
            bit_list = l_key;
            break;
        }
    }
    // Do single bit filter portion.
    if ( !l_modified )
    {
        while ( 1 < bit_list.size() )
        {
            l_modified = true;
            bit_list.removeBit();
        }
    }
    return l_modified;
}
Ejemplo n.º 6
0
bool SecondaryBitsFilter::Apply( BitKey & io_bitList,
                                 STEP_CODE_DATA_STRUCT & io_sdc )
{
    #define PRDF_FUNC  "[SecondaryBitsFilter::Apply] "
    bool l_modified = false;
    do
    {
        // This filter should only be applied on the primary passs.
        if ( !io_sdc.service_data->isPrimaryPass() ) break;

        // This filter should only be applied if the primary attention type is
        // CHECK_STOP.
        if ( CHECK_STOP != io_sdc.service_data->GetAttentionType() ) break;

        // This filter should only be applied if the the secondary attention
        // type is RECOVERABLE.
        if ( RECOVERABLE != io_sdc.service_data->GetCauseAttentionType()) break;

        //if there is no secondary bit position to flip or if no bit is set in
        //bit key then let us skip this apply.
        if( ( 0 == iv_secBitList.size() ) || ( 0 == io_bitList.size()) ) break;

        BitKey l_key ( iv_secBitList );
        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
}
Ejemplo n.º 7
0
bool SingleBitFilter::Apply( BitKey & bit_list, STEP_CODE_DATA_STRUCT & io_sdc )
{
    bool rc = false;
    uint32_t list_length = bit_list.size();
    if( list_length > 1 )
    {
        rc = true;
        while( --list_length )
        {
            bit_list.removeBit();
        }
    }
    return( rc );
}