• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ errlHndl_t类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中errlHndl_t的典型用法代码示例。如果您正苦于以下问题:C++ errlHndl_t类的具体用法?C++ errlHndl_t怎么用?C++ errlHndl_t使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了errlHndl_t类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: commitErrLog

///////////////////////////////////////////////////////////////////////////////
//  Handling commit error log.
///////////////////////////////////////////////////////////////////////////////
void ErrlManager::commitErrLog(errlHndl_t& io_err, compId_t i_committerComp )
{

    TRACDCOMP( g_trac_errl, ENTER_MRK"ErrlManager::commitErrLog" );
    do
    {
        if (io_err == NULL)
        {
            // put out warning trace
            TRACFCOMP(g_trac_errl, ERR_MRK "commitErrLog() - NULL pointer");
            break;
        }

        TRACFCOMP(g_trac_errl, "commitErrLog() called by %.4X for plid=0x%X,"
                               "Reasoncode=%.4X", i_committerComp,
                               io_err->plid(), io_err->reasonCode() );

        // Deferred callouts not allowed at runtime - this call will check,
        // flag and change any that are found.
        io_err->deferredDeconfigure();

        TRACFCOMP( g_trac_errl, INFO_MRK
                   "Send an error log to hypervisor to commit. plid=0x%X",
                   io_err->plid() );

        io_err->commit(i_committerComp);
        sendMboxMsg(io_err);
        io_err = NULL;

    } while( 0 );

   TRACDCOMP( g_trac_errl, EXIT_MRK"ErrlManager::commitErrLog" );

   return;
}
开发者ID:Erich-Hauptli,项目名称:hostboot,代码行数:38,代码来源:rt_errlmanager.C


示例2: commitErrLog

///////////////////////////////////////////////////////////////////////////////
//  Handling commit error log.
///////////////////////////////////////////////////////////////////////////////
void ErrlManager::commitErrLog(errlHndl_t& io_err, compId_t i_committerComp )
{

    TRACDCOMP( g_trac_errl, ENTER_MRK"ErrlManager::commitErrLog" );
    do
    {
        if (io_err == NULL)
        {
            // put out warning trace
            TRACFCOMP(g_trac_errl, ERR_MRK "commitErrLog() - NULL pointer");
            break;
        }

        TRACFCOMP(g_trac_errl, "commitErrLog() called by %.4X for eid=%.8x, Reasoncode=%.4X",
                    i_committerComp, io_err->eid(), io_err->reasonCode() );

        if (io_err->sev() != ERRORLOG::ERRL_SEV_INFORMATIONAL)
        {
            iv_nonInfoCommitted = true;
            lwsync();
        }

        //Ask ErrlEntry to check for any special deferred deconfigure callouts
        io_err->deferredDeconfigure();

        //Offload the error log to the errlog message queue
        sendErrlogToMessageQueue ( io_err, i_committerComp );
        io_err = NULL;

   } while( 0 );

   TRACDCOMP( g_trac_errl, EXIT_MRK"ErrlManager::commitErrLog" );

   return;
}
开发者ID:jk-ozlabs,项目名称:hostboot,代码行数:38,代码来源:errlmanager.C


示例3: rt_processCallout

//  Runtime processCallout
bool rt_processCallout(errlHndl_t &io_errl,
                       uint8_t * i_pData,
                       uint64_t i_Size,
                       bool i_DeferredOnly)
{
    HWAS::callout_ud_t *pCalloutUD = (HWAS::callout_ud_t *)i_pData;
    if(i_DeferredOnly)
    {
        if ((pCalloutUD->type == HWAS::HW_CALLOUT) &&
            ((pCalloutUD->deconfigState == HWAS::DELAYED_DECONFIG) ||
             (pCalloutUD->deconfigState == HWAS::DECONFIG)))
        {
            pCalloutUD->deconfigState = HWAS::NO_DECONFIG;

            TRACFCOMP( g_trac_errl, ERR_MRK
                       "Runtime errorlog callout with DELAYED_DECONFIG or "
                       "DECONFIG not allowed! Changed to NO_DECONFIG. "
                       " plid: 0x%X. Deconfig State: 0x%x", io_errl->plid(),
                       pCalloutUD->deconfigState);
        }

    }

    // Gard callouts are handled by the HWSV if there is an FSP
    // if we attempt to create a gard record it requires us to read
    // PNOR which we cannot do on FSP based machines
    if(!INITSERVICE::spBaseServicesEnabled())
    {
        if ((pCalloutUD->type == HWAS::HW_CALLOUT) &&
            (pCalloutUD->gardErrorType != HWAS::GARD_NULL))
        {
                TARGETING::Target *pTarget = NULL;
                uint8_t * l_uData = (uint8_t *)(pCalloutUD + 1);
                bool l_err = HWAS::retrieveTarget(l_uData, pTarget, io_errl);

                if (!l_err)
                {
                    errlHndl_t errl = HWAS::theDeconfigGard().platCreateGardRecord
                        (pTarget,
                            io_errl->eid(),
                            pCalloutUD->gardErrorType);
                    if (errl)
                    {
                        TRACFCOMP( g_trac_errl, ERR_MRK
                            "rt_processCallout: error from platCreateGardRecord");
                        errlCommit(errl, HWAS_COMP_ID);
                    }
                }

        }
    }
    return true;
}
开发者ID:open-power,项目名称:hostboot,代码行数:54,代码来源:rt_errlmanager.C


示例4: hwasErrorUpdatePlid

void hwasErrorUpdatePlid(errlHndl_t & io_errl,
                         uint32_t & io_plid)
{

    if (io_plid != 0)
    {
        io_errl->plid(io_plid) ;
    }
    else
    {
        io_plid = io_errl->plid();
    }
}
开发者ID:open-power,项目名称:hostboot,代码行数:13,代码来源:hwasPlatError.C


示例5: TRACFCOMP

///////////////////////////////////////////////////////////////////////////////
// ErrlManager::sendErrLogToFSP()
///////////////////////////////////////////////////////////////////////////////
void ErrlManager::sendErrLogToFSP ( errlHndl_t& io_err )
{
    msg_t *msg = NULL;

    TRACFCOMP( g_trac_errl, ENTER_MRK"ErrlManager::sendErrLogToFSP" );
    do
    {
        //Create a mailbox message to send to FSP
        msg = msg_allocate();
        msg->type = ERRLOG_SEND_TO_FSP_TYPE;

        uint32_t l_msgSize = io_err->flattenedSize();

        //Data[0] will be hostboot error log ID so Hostboot can
        //keep track of the error log when FSP responses back.

        msg->data[0] = io_err->eid();
        msg->data[1] = l_msgSize;

        void * temp_buff = MBOX::allocate( l_msgSize );

        io_err->flatten ( temp_buff, l_msgSize );
        msg->extra_data = temp_buff;

        TRACDCOMP( g_trac_errl, INFO_MRK"Send msg to FSP for errlogId %.8x",
                                                               io_err->eid() );
        errlHndl_t l_err = MBOX::send( MBOX::FSP_ERROR_MSGQ, msg );
        if( !l_err )
        {
            // clear this - we're done with the message;
            // the receiver will free the storage when it's done
            msg = NULL;
        }
        else
        {
           TRACFCOMP(g_trac_errl, ERR_MRK"Failed sending error log to FSP");

           //Free the extra data due to the error
           MBOX::deallocate( msg->extra_data );
           msg_free( msg );
           msg = NULL;

           delete l_err;
           l_err = NULL;
        }
    } while (0);

    TRACFCOMP( g_trac_errl, EXIT_MRK"ErrlManager::sendErrLogToFSP" );
} // sendErrLogToFSP
开发者ID:jk-ozlabs,项目名称:hostboot,代码行数:52,代码来源:errlmanager.C


示例6: reallocUsrBuf

//------------------------------------------------------------------------------
HwpUserDetailsIstep::HwpUserDetailsIstep( errlHndl_t i_err )
{
    HwpUserDetailsIstepErrorData * l_pBuf =
        reinterpret_cast<HwpUserDetailsIstepErrorData *>(
                reallocUsrBuf(sizeof(HwpUserDetailsIstepErrorData)));

    l_pBuf->eid = i_err->eid();

    l_pBuf->reasoncode = i_err->reasonCode();

    // Set up ErrlUserDetails instance variables
    iv_CompId = HWPF_COMP_ID;
    iv_Version = 1;
    iv_SubSection = fapi::HWPF_UDT_STEP_ERROR_DETAILS;
}
开发者ID:open-power,项目名称:hostboot,代码行数:16,代码来源:hwpistepud.C


示例7: bldErrLog

    // Create/Build an Error log and add HTMGT component trace
    void bldErrLog(errlHndl_t &   io_err,
                   const uint8_t  i_modid,
                   const uint16_t i_rc,
                   const uint32_t i_data1,
                   const uint32_t i_data2,
                   const uint32_t i_data3,
                   const uint32_t i_data4,
                   const ERRORLOG::errlSeverity_t i_sev,
                   const bool i_addFwCallout)
    {
        TMGT_INF("bldErrLog(mod: 0x%02X, rc: 0x%02X, data: 0x%08X %08X %08X"
                 " %08X, sev: 0x%02X, fw:%c",
                 i_modid, i_rc, i_data1, i_data2, i_data3, i_data4,
                 i_sev, i_addFwCallout?'y':'n');
        // TODO RTC 124739 - RAS review what logs need fw callout

        if (NULL == io_err)
        {
            io_err = new ERRORLOG::ErrlEntry(i_sev,
                                             i_modid,
                                             i_rc,
                                             ((uint64_t)i_data1 << 32) |
                                             i_data2,
                                             ((uint64_t)i_data3 << 32) |
                                             i_data4,
                                             i_addFwCallout);
            io_err->collectTrace("HTMGT");
        }
        else
        {
            // TODO RTC 124739
            // - collectTrace will not filter dup traces and no way to clear
            // - no way to add secondary SRC to elog
            io_err->collectTrace("HTMGT");

            uint32_t additionalSrc[] =
            {
                uint32_t(HTMGT_COMP_ID | i_rc), uint32_t(i_modid),
                uint32_t(i_sev), uint32_t(i_addFwCallout?1:0),
                i_data1, i_data2, i_data3, i_data4
            };
            io_err->addFFDC(HTMGT_COMP_ID,
                            additionalSrc,
                            sizeof(additionalSrc),
                            1,  // version
                            SUBSEC_ADDITIONAL_SRC);
        }
    }
开发者ID:wghoffa,项目名称:hostboot,代码行数:49,代码来源:htmgt_utility.C


示例8: hwasErrorAddProcedureCallout

void hwasErrorAddProcedureCallout(errlHndl_t                & io_errl,
                                  const HWAS::epubProcedureID i_procedure,
                                  const HWAS::callOutPriority i_priority)
{
    io_errl->addProcedureCallout(i_procedure,
                                 i_priority);
}
开发者ID:open-power,项目名称:hostboot,代码行数:7,代码来源:hwasPlatError.C


示例9: checkPibMask

/// @brief takes in an error log and looks for user details sections
///        with a compId of SCOM_COMP_ID. If one of those is found and
///        the pib err attatched to it matches the pib_err_mask, then
///        we delete the err.
void checkPibMask(errlHndl_t& io_errLog )
{
    //Delete the error if the mask matches the pib err
    for(auto data : io_errLog->getUDSections(SCOM_COMP_ID, SCOM::SCOM_UDT_PIB))
    {
        //We get the raw data from the userdetails section, which in this
        //case is the pib_err itself so just check it.
        if(*reinterpret_cast<uint8_t *>(data) == pib_err_mask)
        {
            FAPI_ERR( "Ignoring error %.8X due to pib_err_mask=%.1X", io_errLog->plid(), pib_err_mask );
            delete io_errLog;
            io_errLog = NULL;
            break;
        }
    }
    return;
}
开发者ID:wghoffa,项目名称:hostboot,代码行数:21,代码来源:plat_hw_access.C


示例10: rt_processCallout

//  Runtime processCallout
bool rt_processCallout(errlHndl_t &io_errl,
                       uint8_t * i_pData,
                       uint64_t i_Size,
                       bool i_DeferredOnly)
{
    HWAS::callout_ud_t *pCalloutUD = (HWAS::callout_ud_t *)i_pData;
    if(i_DeferredOnly)
    {
        if ((pCalloutUD->type == HWAS::HW_CALLOUT) &&
            ((pCalloutUD->deconfigState == HWAS::DELAYED_DECONFIG) ||
             (pCalloutUD->deconfigState == HWAS::DECONFIG)))
        {
            pCalloutUD->deconfigState = HWAS::NO_DECONFIG;

            TRACFCOMP( g_trac_errl, ERR_MRK
                       "Runtime errorlog callout with DELAYED_DECONFIG or "
                       "DECONFIG not allowed! Changed to NO_DECONFIG. "
                       " plid: 0x%X. Deconfig State: 0x%x", io_errl->plid(),
                       pCalloutUD->deconfigState);
        }

    }

    if ((pCalloutUD->type == HWAS::HW_CALLOUT) &&
        (pCalloutUD->gardErrorType != HWAS::GARD_NULL))
    {
            TARGETING::Target *pTarget = NULL;
            uint8_t * l_uData = (uint8_t *)(pCalloutUD + 1);
            bool l_err = HWAS::retrieveTarget(l_uData, pTarget, io_errl);

            if (!l_err)
            {
                errlHndl_t errl = HWAS::theDeconfigGard().platCreateGardRecord(pTarget,
                        io_errl->eid(),
                        pCalloutUD->gardErrorType);
                if (errl)
                {
                    TRACFCOMP( g_trac_errl, ERR_MRK
                        "rt_processCallout: error from platCreateGardRecord");
                    errlCommit(errl, HWAS_COMP_ID);
                }
            }

    }
    return true;
}
开发者ID:wghoffa,项目名称:hostboot,代码行数:47,代码来源:rt_errlmanager.C


示例11: platHwasErrorAddHWCallout

void platHwasErrorAddHWCallout(errlHndl_t & io_errl,
                           const TARGETING::ConstTargetHandle_t i_target,
                           const HWAS::callOutPriority i_priority,
                           const HWAS::DeconfigEnum i_deconfigState,
                           const HWAS::GARD_ErrorType i_gardErrorType)
{
    io_errl->addHwCallout(i_target, i_priority,
                          i_deconfigState, i_gardErrorType);
}
开发者ID:open-power,项目名称:hostboot,代码行数:9,代码来源:hwasPlatError.C


示例12: saveErrLogEntry

///////////////////////////////////////////////////////////////////////////////
// ErrlManager::saveErrLogEntry()
///////////////////////////////////////////////////////////////////////////////
void ErrlManager::saveErrLogEntry( errlHndl_t& io_err )
{
    TRACDCOMP( g_trac_errl, ENTER_MRK"ErrlManager::saveErrLogEntry eid %.8x",
        io_err->eid());
    do
    {
        // Get flattened count of bytes.
        uint32_t l_cbActualFlat = io_err->flattenedSize();

        // Round this copy up to next nearest word (32-bit) boundary.
        uint32_t l_cbflat = ((l_cbActualFlat+3) & ~3);

        // Save/flatten the error log to the storage buffer.
        uint32_t l_extent = iv_pStorage->offsetMarker + CB2MARKERS + l_cbflat;

        if( l_extent < ERRL_STORAGE_SIZE)
        {
            // New data and its surrounding markers can fit between
            // the insertion point and the end of the storage buffer.
            // Flatten the data at the insertion point.
            marker_t * l_pMarker = OFFSET2MARKER( iv_pStorage->offsetMarker );
            io_err->flatten( l_pMarker+1, l_cbflat );
            l_pMarker->length = l_cbActualFlat;

            // Assign offset to next marker to this marker.
            l_pMarker->offsetNext=iv_pStorage->offsetMarker+CBMARKER+l_cbflat;

            // Save new insertion point in header.
            iv_pStorage->offsetMarker = l_pMarker->offsetNext;

            // Initialize the marker at the new insertion point.
            marker_t * pNew = OFFSET2MARKER( iv_pStorage->offsetMarker );
            pNew->offsetNext = 0;
            pNew->length = 0;
        }

        // Count of error logs called to commit, regardless if there was
        // room to commit them or not.
        iv_pStorage->cInserted++;

    } while( 0 );
    TRACDCOMP( g_trac_errl, EXIT_MRK"ErrlManager::saveErrLogEntry" );
    return;
}
开发者ID:jk-ozlabs,项目名称:hostboot,代码行数:47,代码来源:errlmanager.C


示例13: sendErrlogToMessageQueue

///////////////////////////////////////////////////////////////////////////////
// ErrlManager::sendErrlogToMessageQueue()
///////////////////////////////////////////////////////////////////////////////
void ErrlManager::sendErrlogToMessageQueue ( errlHndl_t& io_err,
                                             compId_t i_committerComp )
{
    msg_t  *  msg     = NULL;

    TRACFCOMP( g_trac_errl, ENTER_MRK"ErrlManager::sendErrlogToMessageQueue" );

    do
    {
        //Create a message to send to Host boot error message queue.
        msg = msg_allocate();

        msg->type = ERRLOG_NEEDS_TO_BE_COMMITTED_TYPE;

        //Pass along the component id in the message
        msg->data[0] = i_committerComp;

        //Pass along the error log handle in the message
        msg->data[1] = 8;
        msg->extra_data = io_err;

        TRACFCOMP( g_trac_errl, INFO_MRK"Send an error log to message queue"
                                " to commit. eid=%.8X", io_err->eid() );

        //Send the error log to error message queue to handle.
        //Message is sent as asynchronous.
        int rc = msg_send ( iv_msgQ, msg );

        //Return code is non-zero when the message queue is invalid
        //or the message type is invalid.
        if ( rc )
        {
            TRACFCOMP( g_trac_errl, ERR_MRK "Failed to send mailbox message"
                       "to message queue. eid=%.8X", io_err->eid() );
            break;
        }

    } while (0);
    TRACFCOMP( g_trac_errl, EXIT_MRK"ErrlManager::sendErrlogToMessageQueue" );
    return;
} // sendErrlogToMessageQueue
开发者ID:jk-ozlabs,项目名称:hostboot,代码行数:44,代码来源:errlmanager.C


示例14: sendMboxMsg

///////////////////////////////////////////////////////////////////////////////
// ErrlManager::sendMboxMsg()
///////////////////////////////////////////////////////////////////////////////
void ErrlManager::sendMboxMsg ( errlHndl_t& io_err )
{
    TRACFCOMP( g_trac_errl, ENTER_MRK"ErrlManager::sendToHypervisor" );
    do
    {
#ifdef CONFIG_BMC_IPMI
        TRACFCOMP(g_trac_errl,INFO_MRK"Send msg to BMC for errlogId [0x%08x]",
                  io_err->plid() );
        // convert to SEL/eSEL and send to BMC over IPMI
        sendErrLogToBmc(io_err);
#else
        TRACDCOMP(g_trac_errl,
                  INFO_MRK"Send msg to FSP for errlogId [0x%08x]",
                  io_err->plid() );

        uint32_t l_msgSize = io_err->flattenedSize();
        uint8_t * temp_buff = new uint8_t [l_msgSize ];
        io_err->flatten ( temp_buff, l_msgSize );

        if(g_hostInterfaces && g_hostInterfaces->sendErrorLog)
        {
            int rc = g_hostInterfaces->sendErrorLog(io_err->plid(),
                                                    l_msgSize,
                                                    temp_buff);

            if(rc)
            {
                TRACFCOMP(g_trac_errl, ERR_MRK
                          "Failed sending error log to FSP. rc: %d. "
                          "plid: 0x%08x",
                          rc,
                          io_err->plid() );
            }
        }
        else
        {
            TRACFCOMP(g_trac_errl, ERR_MRK
                      "Host interfaces not initialized, error log not sent. "
                      "plid: 0x%08x",
                      io_err->plid()
                      );
        }
        delete [] temp_buff;
#endif
        delete io_err;
        io_err = NULL;

    } while (0);

    TRACFCOMP( g_trac_errl, EXIT_MRK"sendToHypervisor()" );
    return;
}
开发者ID:Erich-Hauptli,项目名称:hostboot,代码行数:55,代码来源:rt_errlmanager.C


示例15: retrieveTarget

bool retrieveTarget(uint8_t * & io_uData,
                    TARGETING::Target * & o_pTarget, errlHndl_t i_errl)
{
    bool l_err = false;

    // data is either a token indicating it's the
    // MASTER_PROCESSOR_CHIP_TARGET_SENTINEL
    // or it's the EntityPath - getAttr<TARGETING::ATTR_PHYS_PATH>()
    if (*io_uData != TARGET_IS_SENTINEL)
    {
        // convert the EntityPath to a Target pointer
        TARGETING::EntityPath ep, *ep_ptr;
        ep_ptr = (TARGETING::EntityPath *)io_uData;
        // size is total EntityPath size minus unused path elements
        uint32_t size = sizeof(*ep_ptr) -
                (TARGETING::EntityPath::MAX_PATH_ELEMENTS - ep_ptr->size()) *
                    sizeof(TARGETING::EntityPath::PathElement);
        memcpy(&ep, io_uData, size);
        o_pTarget = TARGETING::targetService().toTarget(ep);
        io_uData += size;

        if (unlikely(o_pTarget == NULL))
        {   // only happen if we have a corrupt errlog or targeting.
            HWAS_ERR("HW callout; o_pTarget was NULL!!!");

            /*@
             * @errortype
             * @moduleid     HWAS::MOD_PROCESS_CALLOUT
             * @reasoncode   HWAS::RC_INVALID_TARGET
             * @devdesc      Invalid target encountered in
             *               processing of HW callout
             * @userdata1    callout errlog PLID
             */
            errlHndl_t errl = hwasError(
                        ERRL_SEV_INFORMATIONAL,
                        HWAS::MOD_PROCESS_CALLOUT,
                        HWAS::RC_INVALID_TARGET,
                        i_errl->plid());
            errlCommit(errl, HWAS_COMP_ID);
            l_err = true;
        }
    }
    else
    {   // convert this to the real master processor
        TARGETING::targetService().masterProcChipTargetHandle(o_pTarget);
        io_uData += sizeof(HWAS::TARGET_IS_SENTINEL);
    }
    return l_err;
}
开发者ID:tseredynski,项目名称:hostboot,代码行数:49,代码来源:hwasCallout.C


示例16: addMruAndCommitErrl

void CenMbaIplCeStats::addMruAndCommitErrl( const MemoryMru & i_memmru,
                                            errlHndl_t i_errl )
{
    // Add MemoryMru callouts and FFDC
    CalloutUtil::calloutMemoryMru( i_errl, i_memmru,
                                   SRCI_PRIORITY_HIGH,
                                   HWAS::DELAYED_DECONFIG,
                                   HWAS::GARD_Predictive );

    // Add traces
    i_errl->collectTrace( PRDF_COMP_NAME, 512 );

    // Commit the error log
    ERRORLOG::errlCommit( i_errl, PRDF_COMP_ID );
}
开发者ID:HankChang,项目名称:hostboot,代码行数:15,代码来源:prdfCenMbaIplCeStats.C


示例17: rt_processCallout

//  Runtime processCallout
bool rt_processCallout(errlHndl_t &io_errl,
                       uint8_t * i_pData,
                       uint64_t i_Size,
                       bool i_DeferredOnly)
{
    HWAS::callout_ud_t *pCalloutUD = (HWAS::callout_ud_t *)i_pData;
    if(i_DeferredOnly)
    {
        if ((pCalloutUD->type == HWAS::HW_CALLOUT) &&
            (pCalloutUD->deconfigState == HWAS::DELAYED_DECONFIG))
        {
            pCalloutUD->deconfigState = HWAS::NO_DECONFIG;

            TRACFCOMP( g_trac_errl, ERR_MRK
                       "Runtime errorlog callout with DELAYED_DECONFIG not "
                       "allowed! Changed to NO_DECONFIG. plid: 0x%X",
                       io_errl->plid() );
        }

    }
    return true;
}
开发者ID:HankChang,项目名称:hostboot,代码行数:23,代码来源:rt_errlmanager.C


示例18: commitErrLog

///////////////////////////////////////////////////////////////////////////////
//  Handling commit error log.
///////////////////////////////////////////////////////////////////////////////
void ErrlManager::commitErrLog(errlHndl_t& io_err, compId_t i_committerComp )
{

    TRACDCOMP( g_trac_errl, ENTER_MRK"ErrlManager::commitErrLog" );
    do
    {
        if (io_err == NULL)
        {
            // put out warning trace
            TRACFCOMP(g_trac_errl, ERR_MRK "commitErrLog() - NULL pointer");
            break;
        }

        // Increment our persistent counter so we don't reuse EIDs
        //  after reboots or mpipl
        TARGETING::Target * sys = NULL;
        if( TARGETING::targetService().isInitialized() )
        {
            TARGETING::targetService().getTopLevelTarget( sys );
            sys->setAttr<TARGETING::ATTR_HOSTSVC_PLID>(io_err->eid()+1);
        }

        TRACFCOMP(g_trac_errl, "commitErrLog() called by %.4X for plid=0x%X,"
                               "Reasoncode=%.4X", i_committerComp,
                               io_err->plid(), io_err->reasonCode() );

        // Deferred callouts not allowed at runtime - this call will check,
        // flag and change any that are found.
        io_err->deferredDeconfigure();

        TRACFCOMP( g_trac_errl, INFO_MRK
                   "Send an error log to hypervisor to commit. plid=0x%X",
                   io_err->plid() );

        io_err->commit(i_committerComp);
        sendMboxMsg(io_err);
        io_err = NULL;

    } while( 0 );

   TRACDCOMP( g_trac_errl, EXIT_MRK"ErrlManager::commitErrLog" );

   return;
}
开发者ID:open-power,项目名称:hostboot,代码行数:47,代码来源:rt_errlmanager.C


示例19: pib_error_handler

/**
 * @brief Common function to add callouts and FFDC and recover
 *   from PIB errors
 *
 * @param[in]   i_target    SCom target
 * @param[in]   i_errlog    Error log to append to
 * @param[in]   i_status    FSI2PIB status register
 * @param[in]   i_scomAddr  Address that we failed on
 */
void pib_error_handler( TARGETING::Target* i_target,
                        errlHndl_t i_errlog,
                        uint32_t i_status,
                        uint32_t i_scomAddr )
{
    //Add this target to the FFDC
    ERRORLOG::ErrlUserDetailsTarget(i_target,"SCOM Target").addToLog(i_errlog);

    //Look for a totally dead chip
    if( i_status == 0xFFFFFFFF )
    {
        // if things are this broken then chances are there are bigger
        //  problems, we can just make some guesses on what to call out

        // make code the highest since there are other issues
        i_errlog->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE,
                                      HWAS::SRCI_PRIORITY_HIGH);

        // callout this chip as Medium and deconfigure it
        i_errlog->addHwCallout( i_target,
                                HWAS::SRCI_PRIORITY_LOW,
                                HWAS::DELAYED_DECONFIG,
                                HWAS::GARD_NULL );

        // grab all the FFDC we can think of
        FSI::getFsiFFDC( FSI::FFDC_OPB_FAIL_SLAVE,
                         i_errlog,
                         i_target );
        FSI::getFsiFFDC( FSI::FFDC_READWRITE_FAIL,
                         i_errlog,
                         i_target );
        FSI::getFsiFFDC( FSI::FFDC_PIB_FAIL,
                         i_errlog,
                         i_target );
    }
    else
    {
        //Add the callouts for the specific PCB/PIB error
        uint32_t pib_error = i_status >> 12;
        PIB::addFruCallouts( i_target,
                             pib_error,
                             i_scomAddr,
                             i_errlog );

        //Grab the PIB2OPB Status reg for a Resource Occupied error
        if( pib_error == PIB::PIB_RESOURCE_OCCUPIED ) //piberr=001
        {
            FSI::getFsiFFDC( FSI::FFDC_PIB_FAIL,
                             i_errlog,
                             i_target );
        }
    }

    //Recovery sequence from Markus
    //  if SCOM fails and FSI Master displays "MasterTimeOut"
    //     then 7,6  <covered by FSI driver>
    //  else if SCOM fails and FSI2PIB Status shows PIB abort
    //     then just perform unit reset (6) and wait 1 ms
    //  else (PIB_abort='0' but PIB error is unequal 0)
    //     then just perform unit reset (6) (wait not needed).
    uint32_t l_command = 0;
    size_t op_size = sizeof(uint32_t);
    errlHndl_t l_err = DeviceFW::deviceOp( DeviceFW::WRITE,
                                       i_target,
                                       &l_command,
                                       op_size,
                                       DEVICE_FSI_ADDRESS(ENGINE_RESET_REG));
    if(l_err)
    {
        TRACFCOMP( g_trac_fsiscom,
                   ERR_MRK"Error resetting FSI : %.4X",
                   ERRL_GETRC_SAFE(l_err) );
        l_err->plid(i_errlog->plid());
        errlCommit(l_err,FSISCOM_COMP_ID);
    }

    nanosleep( 0,NS_PER_MSEC ); //sleep for ms

}
开发者ID:bjwyman,项目名称:hostboot,代码行数:88,代码来源:fsiscom.C


示例20: send_esel

/*
 * @brief Send esel data to bmc
 */
void send_esel(eselInitData * i_data,
            errlHndl_t &o_err, IPMI::completion_code &o_cc)
{
    IPMI_TRAC(ENTER_MRK "send_esel");
    uint8_t* data = NULL;

    size_t len = 0;
    uint8_t esel_recordID[2] = {0,0};
    uint8_t sel_recordID[2] = {0,0};

    do{
        const size_t l_eSELlen = i_data->dataSize;

        if (l_eSELlen == 0)
        {
            IPMI_TRAC(INFO_MRK "no eSEL data present, skipping to SEL");
            // sending sensor SELs only, not the eSEL
            break;
        }

        uint8_t reserveID[2] = {0,0};
        // we need to send down the extended sel data (eSEL), which is
        // longer than the protocol buffer, so we need to do a reservation and
        // call the AMI partial_add_esel command multiple times

        // put a reservation on the SEL Device since we're doing a partial_add
        len = 0;
        delete [] data;
        data = NULL;
        o_cc = IPMI::CC_UNKBAD;
        o_err = IPMI::sendrecv(IPMI::reserve_sel(),o_cc,len,data);
        if(o_err)
        {
            IPMI_TRAC(ERR_MRK "error from reserve_sel");
            break;
        }
        if(o_cc != IPMI::CC_OK)
        {
            IPMI_TRAC(ERR_MRK "Failed to reserve_sel, o_cc %02x",o_cc);
            break;
        }
        storeReserveRecord(reserveID,data);

        // first send down the SEL Event Record data
        size_t eSELindex = 0;
        uint8_t l_lastEntry = 0;
        len = PARTIAL_ADD_ESEL_REQ + sizeof(selRecord);
        delete [] data;
        data = new uint8_t[len];

        // fill in the partial_add_esel request (command) data
        createPartialAddHeader(reserveID,esel_recordID,eSELindex,l_lastEntry,data);

        // copy in the SEL event record data
        memcpy(&data[PARTIAL_ADD_ESEL_REQ], i_data->eSel,
                sizeof(selRecord));
        // update to make this what AMI eSEL wants
        data[PARTIAL_ADD_ESEL_REQ + offsetof(selRecord,record_type)] = record_type_ami_esel;
        data[PARTIAL_ADD_ESEL_REQ + offsetof(selRecord,event_data1)] = event_data1_ami;

        o_cc = IPMI::CC_UNKBAD;
        TRACFBIN( g_trac_ipmi, INFO_MRK"1st partial_add_esel:", data, len);
        o_err = IPMI::sendrecv(IPMI::partial_add_esel(),o_cc,len,data);
        if(o_err)
        {
            IPMI_TRAC(ERR_MRK "error from first partial_add_esel");
            break;
        }
        // as long as we continue to get CC_OK, the reserve sel is good.
        // if the reservation is lost (ie, because something else tried to
        // create a SEL) then the BMC just discards all this data. the
        // errorlog will still be in PNOR and won't get ACKed, so it'll get
        // resent on the next IPL.
        if (o_cc != IPMI::CC_OK)
        {
            IPMI_TRAC(ERR_MRK "failed first partial_add_esel, o_cc %02x, eSELindex %02x",
                    o_cc, eSELindex);
            break;
        }
        // BMC returns the recordID, it's always the same (unless
        // there's a major BMC bug...)
        storeReserveRecord(esel_recordID,data);

        // now send down the eSEL data in chunks.
        const size_t l_maxBuffer = IPMI::max_buffer();
        while(eSELindex<l_eSELlen)
        {
            //if the index + the maximum buffer is less than what we still
            //have left in the eSEL, this is not the last entry (data[6] = 0)
            //otherwise, it is and data[6] = 1
            if(eSELindex + (l_maxBuffer - PARTIAL_ADD_ESEL_REQ)
                    < l_eSELlen)
            {
                len = l_maxBuffer;
                l_lastEntry = 0x00;
            }
            else
//.........这里部分代码省略.........
开发者ID:AmesianX,项目名称:hostboot,代码行数:101,代码来源:ipmisel.C



注:本文中的errlHndl_t类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ error_code类代码示例发布时间:2022-05-31
下一篇:
C++ epicsGuard类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap