本文整理汇总了C++中errlHndl_t类的典型用法代码示例。如果您正苦于以下问题:C++ errlHndl_t类的具体用法?C++ errlHndl_t怎么用?C++ errlHndl_t使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了errlHndl_t类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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;
}
示例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();
}
}
示例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
示例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;
}
示例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);
}
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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
示例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;
}
示例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;
}