本文整理汇总了C++中errlCommit函数的典型用法代码示例。如果您正苦于以下问题:C++ errlCommit函数的具体用法?C++ errlCommit怎么用?C++ errlCommit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了errlCommit函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: host_init_fsi
void* host_init_fsi( void *io_pArgs )
{
errlHndl_t l_err = NULL;
ISTEP_ERROR::IStepError l_stepError;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "host_init_fsi entry" );
do
{
l_err = FSI::initializeHardware( );
if (l_err)
{
// This error should get returned
l_stepError.addErrorDetails(l_err);
errlCommit( l_err, ISTEP_COMP_ID );
break;
}
// Only reset the I2C Masters if FSP is not running
if ( !INITSERVICE::spBaseServicesEnabled() )
{
l_err = I2C::i2cResetActiveMasters(I2C::I2C_ALL, false);
if (l_err)
{
// Commit this error
errlCommit( l_err, ISTEP_COMP_ID );
}
}
} while (0);
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "host_init_fsi exit" );
return l_stepError.getErrorHandle();
}
示例2: msg_respond
///
/// @brief sync handle response
///
void BTSyncMessage::response(msg_q_t i_msgQ)
{
// Send the response to the original caller of sendrecv()
int rc = msg_respond(i_msgQ, iv_msg);
if (rc)
{
// Not much we're going to do here, so lets commit an error and
// the original request will timeout.
IPMI_TRAC(ERR_MRK "msg_respond() i/o error (response) %d", rc);
/*@
* @errortype ERRL_SEV_UNRECOVERABLE
* @moduleid IPMI::MOD_IPMISRV_REPLY
* @reasoncode IPMI::RC_INVALID_QRESPONSE
* @userdata1 rc from msg_respond()
* @devdesc msg_respond() failed
* @custdesc Firmware error during system boot
*/
errlHndl_t err = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_UNRECOVERABLE,
IPMI::MOD_IPMISRV_REPLY,
IPMI::RC_INVALID_QRESPONSE,
rc,
0,
true);
err->collectTrace(IPMI_COMP_NAME);
errlCommit(err, IPMI_COMP_ID);
// Frotz the response data
delete[] iv_data;
iv_data = NULL;
}
}
示例3: checkForIplAttentions
errlHndl_t checkForIplAttentions()
{
errlHndl_t err = NULL;
assert(!Singleton<Service>::instance().running());
TargetHandleList list;
getTargetService().getAllChips(list, TYPE_PROC);
TargetHandleList::iterator tit = list.begin();
while(tit != list.end())
{
err = Singleton<Service>::instance().handleAttentions(*tit);
if(err)
{
errlCommit(err, ATTN_COMP_ID);
}
tit = list.erase(tit);
}
return 0;
}
示例4: msg_respond
void SyncMessage::response(msg_q_t i_msgQ)
{
errlHndl_t err = NULL;
// Send the response to the original caller of sendrecv()
int rc = msg_respond(i_msgQ, iv_msg);
if (rc)
{
TRACFCOMP( g_trac_trustedboot,
ERR_MRK "SyncMessage::response msg_respond failure %d",
rc);
/*@
* @errortype ERRL_SEV_UNRECOVERABLE
* @moduleid MOD_TPM_SYNCRESPONSE
* @reasoncode RC_MSGRESPOND_FAIL
* @userdata1 rc from msq_respond()
* @devdesc msg_respond() failed
* @custdesc Firmware error during system boot
*/
err = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE,
MOD_TPM_SYNCRESPONSE,
RC_MSGRESPOND_FAIL,
rc,
0,
true);
err->collectTrace(SECURE_COMP_NAME);
err->collectTrace(TRBOOT_COMP_NAME);
// Log this failure here since we can't reply to caller
errlCommit(err, TRBOOT_COMP_ID);
}
}
示例5: call_host_fbc_eff_config_aggregate
//
// Wrapper function to call proc_fbc_eff_config_aggregate
//
void* call_host_fbc_eff_config_aggregate( void *io_pArgs )
{
errlHndl_t l_errl = NULL;
ISTEP_ERROR::IStepError l_stepError;
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_fbc_eff_config_aggregate entry" );
TARGETING::TargetHandleList l_procChips;
getAllChips( l_procChips, TARGETING::TYPE_PROC);
for (const auto & l_procChip: l_procChips)
{
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>l_fapi2CpuTarget(l_procChip);
FAPI_INVOKE_HWP(l_errl,p9_fbc_eff_config_aggregate,l_fapi2CpuTarget);
if(l_errl)
{
l_stepError.addErrorDetails(l_errl);
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"ERROR : call_proc_fbc_eff_config_aggregate, PLID=0x%x",
l_errl->plid() );
errlCommit(l_errl, HWPF_COMP_ID);
}
}
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_fbc_eff_config_aggregate exit" );
return l_stepError.getErrorHandle();
}
示例6: activateOCCs
/**
* @brief Starts OCCs on all Processors in the node
* This is intended to be used for Open Power.
*
* @return errlHndl_t Error log if OCC load failed
*/
errlHndl_t activateOCCs(bool i_useSRAM)
{
TRACUCOMP( g_fapiTd,ENTER_MRK"activateOCCs(%d)", i_useSRAM );
errlHndl_t l_errl = NULL;
TARGETING::Target* l_failedOccTarget = NULL;
#ifdef CONFIG_HTMGT
bool occStartSuccess = true;
#endif
l_errl = loadnStartAllOccs (l_failedOccTarget, i_useSRAM);
if (l_errl)
{
errlCommit (l_errl, HWPF_COMP_ID);
#ifdef CONFIG_HTMGT
occStartSuccess = false;
#endif
}
//TODO RTC:116027
//HB configures/enables the occ buffers
//TODO RTC:115636
//HB enables the scon-via-i2c logic on the OCCs
#ifdef CONFIG_HTMGT
// Report OCC status to HTMGT
if (!i_useSRAM)
{
HTMGT::processOccStartStatus(occStartSuccess,l_failedOccTarget);
}
#endif
TRACUCOMP( g_fapiTd,EXIT_MRK"activateOCC" );
return l_errl;
}
示例7: enableAttns
/** Enable chip attentions
*
* @return 0 on success else return code
*/
int enableAttns(void)
{
// TODO RTC 134050 Post init setups are temporarily here because
// Opal has not set up pnor or ipmi before calling rt_main.
static bool onlyCallApplyTempOverridesOnce = false;
if (!onlyCallApplyTempOverridesOnce)
{
ATTN_SLOW("ATTN_RT::enableAttns - call initialzation routines");
postInitCalls_t* rtPost = getPostInitCalls();
rtPost->callApplyTempOverrides();
onlyCallApplyTempOverridesOnce = true;
}
ATTN_SLOW(ENTER_MRK"ATTN_RT::enableAttns");
int rc = 0;
errlHndl_t err = NULL;
err = Singleton<Service>::instance().enableAttns();
if(err)
{
errlCommit(err, ATTN_COMP_ID);
rc = -1;
}
ATTN_SLOW(EXIT_MRK"ATTN_RT::enableAttns rc: %d", rc);
return rc;
}
示例8: enable_occ_actuation
int enable_occ_actuation (int i_occ_activation)
{
int rc = 0;
#ifdef CONFIG_HTMGT
errlHndl_t err = HTMGT::enableOccActuation(0 != i_occ_activation);
if (err)
{
rc = err->reasonCode();
if (0 == rc)
{
// If there was a failure, be sure to return non-zero status
rc = -1;
}
TRACFCOMP (g_fapiTd,ERR_MRK"enable_occ_actuation: OCC state change"
" failed with rc=0x%04X (actuate=%d)",
err->reasonCode(), i_occ_activation);
errlCommit (err, HWPF_COMP_ID);
}
#else
rc = -1;
TRACFCOMP(g_fapiTd,ERR_MRK"Unexpected call to enable_occ_actuation(%d)"
" when HTMGT is not enabled", i_occ_activation);
#endif
return rc;
}
示例9: readTOC
/*******Protected Methods**************/
RtPnor::RtPnor()
{
errlHndl_t l_err = readTOC();
if (l_err)
{
errlCommit(l_err, PNOR_COMP_ID);
}
}
示例10: getMasterProcId
/*******Protected Methods**************/
RtPnor::RtPnor()
{
do {
errlHndl_t l_err = getMasterProcId();
if (l_err)
{
errlCommit(l_err, PNOR_COMP_ID);
break;
}
l_err = readTOC();
if (l_err)
{
errlCommit(l_err, PNOR_COMP_ID);
break;
}
} while (0);
}
示例11: TOD_ENTER
//******************************************************************************
//TodSvc::todInit
//******************************************************************************
errlHndl_t TodSvc::todInit()
{
TOD_ENTER();
errlHndl_t l_errHdl = NULL;
bool l_isTodRunning = false;
do
{
//Check if the Chip TOD logic is already Running
l_errHdl = TOD::isTodRunning(l_isTodRunning);
if ( l_errHdl )
{
TOD_INF("Call to isTodRunning() failed , cannot initialize the"
"Chip TOD logic ");
break;
}
if ( l_isTodRunning )
{
TOD_ERR("Cannot initialize the TOD logic while the Chip TOD logic"
"is already running");
/*@
* @errortype
* @moduleid TOD_INIT_ALREADY_RUNNING
* @reasoncode TOD_INVALID_ACTION
* @userdata1 EMOD_TOD_INIT
* @userdata2 ChipTOD logic HW state, 1=running,
* zero otherwise
* @devdesc Error: Initialization of chip TOD logic cannot be
* done when its already in the running state
* @custdesc Host failed to boot because there was a problem
* configuring Time Of Day on the Host processors
*/
l_errHdl = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_INFORMATIONAL,
TOD_INIT_ALREADY_RUNNING,
TOD_INVALID_ACTION,
EMOD_TOD_INIT,
l_isTodRunning);
break;
}
//Call the hardware procedure to initialize the Chip TOD logic to the
//running state using the PRIMARY TOD topology.
l_errHdl = todInitHwp();
if( l_errHdl )
{
TOD_ERR("TOD initialization failed for primary topology : HWP");
l_errHdl->setSev(ERRORLOG::ERRL_SEV_UNRECOVERABLE);
errlCommit(l_errHdl, TOD_COMP_ID);
break;
}
}while(0);
TOD_EXIT();
return l_errHdl;
}
示例12: resolveMcs
void resolveMcs(uint64_t i_mcs, void * i_data)
{
ResolveMcsArgs * args = static_cast<ResolveMcsArgs *>(i_data);
uint64_t mciFirScomData;
TargetHandle_t mcs = getTargetService().getMcs(args->proc, i_mcs);
// read the MCI fir to determine what type of attention
// centaur reporting
errlHndl_t err = getScom(mcs, MCI::address, mciFirScomData);
if(err)
{
errlCommit(err, ATTN_COMP_ID);
}
else
{
// pick the highest priority attention
for(uint64_t type = INVALID_ATTENTION_TYPE;
type != END_ATTENTION_TYPE;
++type)
{
uint64_t mask;
if(!MCI::getCheckbits(type, mask))
{
// this object doesn't support
// this attention type
continue;
}
if(mask & mciFirScomData)
{
AttnData d;
d.targetHndl = getTargetService().getMembuf(mcs);
if(!d.targetHndl)
{
// this membuf not functional
// or nothing is attached to this MCS
break;
}
d.attnType = static_cast<ATTENTION_VALUE_TYPE>(type);
args->list->add(Attention(d, args->ops));
break;
}
}
}
}
示例13: fapiLogError
//******************************************************************************
// fapiLogError
//******************************************************************************
void fapiLogError(fapi::ReturnCode & io_rc,
fapi::fapiErrlSeverity_t i_sev,
bool i_unitTestError)
{
// ENUM CONVERSION FAPI to PLATFORM
errlHndl_t l_pError = NULL;
FAPI_INF("fapiLogError: logging error");
// Convert a FAPI severity to a ERRORLOG severity
ERRORLOG::errlSeverity_t l_sev = ERRORLOG::ERRL_SEV_UNRECOVERABLE;
switch (i_sev)
{
case fapi::FAPI_ERRL_SEV_RECOVERED:
l_sev = ERRORLOG::ERRL_SEV_RECOVERED;
break;
case fapi::FAPI_ERRL_SEV_PREDICTIVE:
l_sev = ERRORLOG::ERRL_SEV_PREDICTIVE;
break;
case fapi::FAPI_ERRL_SEV_UNRECOVERABLE:
// l_sev set above
break;
default:
FAPI_ERR("severity (i_sev) of %d is unknown",i_sev);
}
// Convert the return code to an error log.
// This will set the return code to FAPI_RC_SUCCESS and clear any PLAT Data,
// HWP FFDC data, and Error Target associated with it.
l_pError = fapiRcToErrl(io_rc, l_sev);
// Commit the error log. This will delete the error log and set the handle
// to NULL.
if (i_unitTestError)
{
errlCommit(l_pError, CXXTEST_COMP_ID);
}
else
{
errlCommit(l_pError, HWPF_COMP_ID);
}
}
示例14: dvpdRead
/**
* @brief This function will perform the steps required to do a read from
* the Hostboot DVPD data.
*
* @param[in] i_opType - Operation Type - See DeviceFW::OperationType in
* driververif.H
*
* @param[in] i_target - Processor Target device
*
* @param [in/out] io_buffer - Pointer to the data that was read from
* the target device. This parameter, when set to NULL, will return
* the keyword size value in io_buflen.
*
* @param [in/out] io_buflen - Length of the buffer to be read or written
* to/from the target. This value should indicate the size of the
* io_buffer parameter that has been allocated. Being returned it
* will indicate the number of valid bytes in the buffer being
* returned. This parameter will contain the size of a keyword when
* the io_buffer parameter is passed in NULL.
*
* @param [in] i_accessType - Access Type - See DeviceFW::AccessType in
* usrif.H
*
* @param [in] i_args - This is an argument list for the device driver
* framework.
*
* @return errlHndl_t - NULL if successful, otherwise a pointer to the
* error log.
*/
errlHndl_t dvpdRead ( DeviceFW::OperationType i_opType,
TARGETING::Target * i_target,
void * io_buffer,
size_t & io_buflen,
int64_t i_accessType,
va_list i_args )
{
errlHndl_t err = NULL;
IpVpdFacade::input_args_t args;
args.record = ((dvpdRecord)va_arg( i_args, uint64_t ));
args.keyword = ((dvpdKeyword)va_arg( i_args, uint64_t ));
args.location = ((VPD::vpdCmdTarget)va_arg( i_args, uint64_t ));
TRACSSCOMP( g_trac_vpd,
ENTER_MRK"dvpdRead(0x%.8X):rec=%d,kw=%d,loc=%d",
TARGETING::get_huid(i_target),
args.record,
args.keyword,
args.location);
#ifdef CONFIG_SECUREBOOT
// Load the secure section just in case if we're using it
bool l_didload = false;
err = Singleton<DvpdFacade>::instance().
loadUnloadSecureSection( args, i_target, true, l_didload );
#endif
if( !err )
{
err = Singleton<DvpdFacade>::instance().read(i_target,
io_buffer,
io_buflen,
args);
}
#ifdef CONFIG_SECUREBOOT
if( l_didload )
{
errlHndl_t err2 = Singleton<DvpdFacade>::instance().
loadUnloadSecureSection( args, i_target, false, l_didload );
if( err2 && !err )
{
err = err2;
err2 = nullptr;
}
else if( err2 )
{
err2->plid(err->plid());
errlCommit( err2, VPD_COMP_ID );
}
}
#endif
return err;
}
示例15: call_cen_arrayinit
void* call_cen_arrayinit (void *io_pArgs)
{
IStepError l_StepError;
errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_arrayinit entry" );
TARGETING::TargetHandleList l_membufTargetList;
getAllChips(l_membufTargetList, TYPE_MEMBUF);
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_arrayinit: %d membufs found",
l_membufTargetList.size());
for (const auto & l_membuf_target : l_membufTargetList)
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"cen_arrayinit HWP target HUID %.8x",
TARGETING::get_huid(l_membuf_target));
// call the HWP with each target
fapi2::Target <fapi2::TARGET_TYPE_MEMBUF_CHIP> l_fapi_membuf_target
(l_membuf_target);
FAPI_INVOKE_HWP(l_err, cen_arrayinit, l_fapi_membuf_target);
// process return code.
if ( l_err )
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"ERROR 0x%.8X: cen_arrayinit HWP on target HUID %.8x",
l_err->reasonCode(), TARGETING::get_huid(l_membuf_target) );
// capture the target data in the elog
ErrlUserDetailsTarget(l_membuf_target).addToLog( l_err );
// Create IStep error log and cross reference to error that occurred
l_StepError.addErrorDetails( l_err );
// Commit Error
errlCommit( l_err, ISTEP_COMP_ID );
}
else
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"SUCCESS : cen_arrayinit HWP");
}
}
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_arrayinit exit" );
return l_StepError.getErrorHandle();
}