Пример #1
0
uint32_t SYSTEM_DEBUG_CLASS::Reinitialize(const AttnList & i_attnList)
{
    uint32_t l_rc = 0;

    do
    {
        if ( i_attnList.empty() )
        {
            PRDF_ERR( "SYSTEM_DEBUG_CLASS::Reinitialize() input AttnList is "
                      "empty" );
            /*@
             * @errortype
             * @subsys     EPUB_FIRMWARE_SP
             * @reasoncode PRDF_CODE_FAIL
             * @moduleid   PRDF_SDBUG_INIT
             * @userdata1  0
             * @userdata2  0
             * @userdata3  0
             * @userdata4  0
             * @devdesc    input AttnList is empty.
             * @custDesc   Chip diagnosis did not find any chip with an
             *             attention.
             * @procedure  EPUB_PRC_SP_CODE
             */
            PRDF_CREATE_ERRL( g_prd_errlHndl,
                              ERRL_SEV_UNRECOVERABLE, // error on diagnostic
                              ERRL_ETYPE_NOT_APPLICABLE,
                              SRCI_MACH_CHECK,
                              SRCI_NO_ATTR,
                              PRDF_SDBUG_INIT,                 // module id
                              FSP_DEFAULT_REFCODE,
                              PRDF_CODE_FAIL,             // Reason code
                              0,                          // user data word 1
                              0,                          // user data word 2
                              0,                          // user data word 3
                              0 );                        // user data word 4

            PRDF_ADD_PROCEDURE_CALLOUT( g_prd_errlHndl, SRCI_PRIORITY_MED,
                                        EPUB_PRC_SP_CODE );
            l_rc = PRD_ATTN_DATA_ACCESS_FAILED;

            break;
        }

        g_AttnDataList = i_attnList;

        g_init_done = true;

    } while(0);

    return l_rc;
}
Пример #2
0
uint32_t SYSTEM_DEBUG_CLASS::Reinitialize(const AttnList & i_attnList)
{
    using PluginDef::bindParm;
    uint32_t l_rc = 0;

    do
    {
        if ( i_attnList.empty() )
        {
            PRDF_ERR( "SYSTEM_DEBUG_CLASS::Reinitialize() input AttnList is "
                      "empty" );
            /*@
             * @errortype
             * @subsys     EPUB_FIRMWARE_SP
             * @reasoncode PRDF_CODE_FAIL
             * @moduleid   PRDF_SDBUG_INIT
             * @userdata1  0
             * @userdata2  0
             * @userdata3  0
             * @userdata4  0
             * @devdesc    input AttnList is empty.
             * @custDesc   Chip diagnosis did not find any chip with an
             *             attention.
             * @procedure  EPUB_PRC_SP_CODE
             */
            PRDF_CREATE_ERRL( g_prd_errlHndl,
                              ERRL_SEV_UNRECOVERABLE, // error on diagnostic
                              ERRL_ETYPE_NOT_APPLICABLE,
                              SRCI_MACH_CHECK,
                              SRCI_NO_ATTR,
                              PRDF_SDBUG_INIT,                 // module id
                              FSP_DEFAULT_REFCODE,
                              PRDF_CODE_FAIL,             // Reason code
                              0,                          // user data word 1
                              0,                          // user data word 2
                              0,                          // user data word 3
                              0 );                        // user data word 4

            PRDF_ADD_PROCEDURE_CALLOUT( g_prd_errlHndl, SRCI_PRIORITY_MED,
                                        EPUB_PRC_SP_CODE );
            l_rc = PRD_ATTN_DATA_ACCESS_FAILED;

            break;
        }

        Clear();
        for( AttnList::const_iterator i = i_attnList.begin();
             i != i_attnList.end(); ++i )
        {
            addChipToAttnList( (*i).targetHndl,(*i).attnType );

            // There can be a case where chip has both recoverable and Check
            // Stop. In that case chip shall report only Check Stop. In such a
            // case, we analyse the recoverable first and see if we can blame
            // check stop on recoverable. To ease its handling, let us add a
            // chip reporting recoverable attention to attention list.

            if( ((*i).attnType == CHECK_STOP ) || ((*i).attnType == UNIT_CS ) )
            {
                bool l_recovFound = false;
                ExtensibleChip * l_chip =
                    ( ExtensibleChip *) systemPtr->GetChip( (*i).targetHndl );
                ExtensibleChipFunction * ef
                           = l_chip->getExtensibleFunction("CheckForRecovered");

                (*ef)( l_chip, bindParm<bool &>( l_recovFound ) );

                if ( l_recovFound )
                {
                    addChipToAttnList( (*i).targetHndl,RECOVERABLE );
                }
            }
        }

        g_init_done = true;

    } while(0);

    return l_rc;
}