本文整理汇总了C++中TargetHandleList类的典型用法代码示例。如果您正苦于以下问题:C++ TargetHandleList类的具体用法?C++ TargetHandleList怎么用?C++ TargetHandleList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TargetHandleList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
}
示例2: calloutSymbolData
void calloutSymbolData( TargetHandle_t i_mba, const CenRank & i_rank,
const MemUtils::MaintSymbols & i_symData,
STEP_CODE_DATA_STRUCT & io_sc, PRDpriority i_priority )
{
bool dimmsBad[PORT_SLCT_PER_MBA] = { false, false };
for ( MemUtils::MaintSymbols::const_iterator it = i_symData.begin();
it != i_symData.end(); it++ )
{
dimmsBad[it->symbol.getPortSlct()] = true;
}
for ( uint32_t port = 0; port < PORT_SLCT_PER_MBA; port++ )
{
if ( dimmsBad[port] )
{
TargetHandleList list = getConnectedDimms( i_mba, i_rank, port );
for ( TargetHandleList::iterator it = list.begin();
it != list.end(); it++ )
{
io_sc.service_data->SetCallout( *it, i_priority );
}
}
}
}
示例3: registerOcc
registerOcc()
{
runtimeInterfaces_t * rt_intf = getRuntimeInterfaces();
rt_intf->get_lid_list = &UtilLidMgr::getLidList;
rt_intf->occ_load = &executeLoadOCC;
rt_intf->occ_start = &executeStartOCCs;
rt_intf->occ_stop = &executeStopOCCs;
rt_intf->process_occ_error = &process_occ_error;
rt_intf->process_occ_reset = &process_occ_reset;
rt_intf->enable_occ_actuation = &enable_occ_actuation;
// If we already loaded OCC during the IPL we need to fix up
// the virtual address because we're now not using virtual
// memory
// Note: We called our memory "ibm,slw-occ-image" but OPAL
// created their own range that subsumed ours
//@todo-RTC:124392-solve this naming issue...
uint64_t l_base_homer =
g_hostInterfaces->get_reserved_mem("ibm,homer-image");
TargetHandleList procChips;
getAllChips(procChips, TYPE_PROC, true);
for (TargetHandleList::iterator itr = procChips.begin();
itr != procChips.end();
++itr)
{
uint64_t l_offset = (*itr)->getAttr<ATTR_POSITION>()
* VMM_HOMER_INSTANCE_SIZE;
(*itr)->setAttr<ATTR_HOMER_VIRT_ADDR>
(l_base_homer+l_offset);
}
}
示例4: getConnectedDimms
TargetHandleList getConnectedDimms( TargetHandle_t i_mba,
uint8_t i_port )
{
#define PRDF_FUNC "[CalloutUtil::getConnectedDimms] "
TargetHandleList o_list;
TargetHandleList dimmList = getConnectedDimms( i_mba );
for ( TargetHandleList::iterator dimmIt = dimmList.begin();
dimmIt != dimmList.end(); dimmIt++)
{
uint8_t portSlct;
int32_t l_rc = getMbaPort( *dimmIt, portSlct );
if ( SUCCESS != l_rc )
{
PRDF_ERR( PRDF_FUNC "getMbaPort(0x%08x) failed",
getHuid(*dimmIt) );
continue;
}
if ( portSlct == i_port )
{
o_list.push_back( *dimmIt );
}
}
return o_list;
#undef PRDF_FUNC
}
示例5: getMcsList
void FakeMemTargetService::getMcsList(
TargetHandle_t i_proc,
TargetHandleList & o_list)
{
TargetHandleList::iterator mcsBegin = iv_mcses.begin()
+ getProcFromTarget(i_proc) * cv_membufsPerProc;
o_list.insert(o_list.end(), mcsBegin, mcsBegin + cv_membufsPerProc);
}
示例6: classTypeMatch
TargetHandle_t TargetServiceImpl::getMcs(
TargetHandle_t i_proc,
uint64_t i_pos)
{
PredicateCTM classTypeMatch(CLASS_UNIT, TYPE_MCS);
PredicateIsFunctional functionalMatch;
PredicatePostfixExpr pred;
class ChipUnitMatch : public PredicateBase
{
uint8_t iv_pos;
public:
bool operator()(const Target * i_target) const
{
uint8_t pos;
bool match = false;
if(i_target->tryGetAttr<ATTR_CHIP_UNIT>(pos))
{
match = iv_pos == pos;
}
return match;
}
explicit ChipUnitMatch(uint8_t i_pos)
: iv_pos(i_pos) {}
} chipUnitMatch(i_pos);
pred.push(&classTypeMatch).push(
&functionalMatch).And();
pred.push(&chipUnitMatch).And();
TargetHandleList list;
TargetHandle_t mcs = NULL;
targetService().getAssociated(
list,
i_proc,
TARGETING::TargetService::CHILD_BY_AFFINITY,
TARGETING::TargetService::ALL,
&pred);
if(list.size() == 1)
{
mcs = list[0];
}
return mcs;
}
示例7: PllPostAnalysis
/**
* @brief Optional plugin function called after analysis is complete but
* before PRD exits.
* @param i_cenChip A Centaur MBA chip.
* @param i_sc The step code data struct.
* @note This is especially useful for any analysis that still needs to be
* done after the framework clears the FIR bits that were at attention.
* @return SUCCESS.
*/
int32_t PllPostAnalysis( ExtensibleChip * i_cenChip,
STEP_CODE_DATA_STRUCT & i_sc )
{
#define PRDF_FUNC "[Membuf::PllPostAnalysis] "
int32_t o_rc = SUCCESS;
TargetHandle_t cenTrgt = i_cenChip->GetChipHandle();
do
{
// need to clear associated bits in the MCIFIR bits.
o_rc = MemUtils::mcifirCleanup( i_cenChip, i_sc );
if( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC"mcifirCleanup() failed");
break;
}
// Check to make sure we are at threshold and have something garded.
if ( !i_sc.service_data->IsAtThreshold() ||
(GardAction::NoGard == i_sc.service_data->QueryGard()) )
{
break; // nothing to do
}
TargetHandleList list = getConnected( cenTrgt, TYPE_MBA );
if ( 0 == list.size() )
{
PRDF_ERR( PRDF_FUNC"getConnected(0x%08x, TYPE_MBA) failed",
getHuid(cenTrgt) );
o_rc = FAIL; break;
}
// Send SKIP_MBA message for each MBA.
for ( TargetHandleList::iterator mbaIt = list.begin();
mbaIt != list.end(); ++mbaIt )
{
int32_t l_rc = mdiaSendEventMsg( *mbaIt, MDIA::SKIP_MBA );
if ( SUCCESS != l_rc )
{
PRDF_ERR( PRDF_FUNC"mdiaSendEventMsg(0x%08x, SKIP_MBA) failed",
getHuid(*mbaIt) );
o_rc |= FAIL;
continue; // keep going
}
}
} while(0);
return o_rc;
#undef PRDF_FUNC
}
示例8: getMembuf
TargetHandle_t TargetServiceImpl::getMembuf(
TargetHandle_t i_mcs)
{
TargetHandle_t membuf = NULL;
TargetHandleList list;
getChildAffinityTargets(list, i_mcs, CLASS_CHIP, TYPE_MEMBUF);
if(list.size() == 1)
{
membuf = list[0];
}
return membuf;
}
示例9: getTargetService
void Service::processIntrQMsgPreAck(const msg_t & i_msg)
{
// this function should do as little as possible
// since the hw can't generate additional interrupts
// until the msg is acknowledged
TargetHandle_t proc = NULL;
// ---------------------------
// P8 used the XISR structure
// P9 uses the PIR structure
// ---------------------------
// PIR structure is
// 17 bits unused, 4 bits group, 3 bits chipId, 1 unused,
// 5/4 CoreID(norm/fused), 2/3 ThreadId(norm/fused)
PIR_t l_pir;
l_pir.word = i_msg.data[1];
TargetHandleList procs;
getTargetService().getAllChips(procs, TYPE_PROC);
TargetHandleList::iterator it = procs.begin();
// resolve the PIR to a proc target
while(it != procs.end())
{
uint64_t group = 0, chip = 0;
getTargetService().getAttribute(ATTR_FABRIC_GROUP_ID, *it, group);
getTargetService().getAttribute(ATTR_FABRIC_CHIP_ID, *it, chip);
// for debug, but you have to compile it in
ATTN_TRACE("IntrQMsgPreAck: Group:%X Chip:%X PirG:%X PirC:%X PirW:%X",
group, chip, l_pir.groupId, l_pir.chipId, l_pir.word );
if ((group == l_pir.groupId) && (chip == l_pir.chipId))
{
proc = *it;
break;
}
++it;
}
ServiceCommon::processAttnPreAck(proc);
}
示例10: assert
errlHndl_t Service::processCheckstop()
{
errlHndl_t err = NULL;
AttentionList attentions;
assert(!Singleton<Service>::instance().running());
TargetHandleList list;
ProcOps & procOps = getProcOps();
attentions.clear();
getTargetService().getAllChips(list, TYPE_PROC);
TargetHandleList::iterator tit = list.begin();
while(tit != list.end())
{
// query the proc resolver for active attentions
// (we also handle mem bufs in this routine)
err = procOps.resolve( *tit, 0, attentions);
if(err)
{
ATTN_ERR("procOps.resolve() returned error.HUID:0X%08X ",
get_huid( *tit ));
break;
}
++tit;
}
if ( NULL == err )
{
if(!attentions.empty())
{
err = getPrdWrapper().callPrd(attentions);
}
if(err)
{
ATTN_ERR("callPrd() returned error." )
}
}
return err;
}
示例11: CalloutMbaAndDimm
/**
* @brief Plugin to add MBA and Dimms behind given port to callout list.
* @param i_chip mba chip
* @param i_sc The step code data struct.
* @param i_port Port Number.
* @return SUCCESS
*/
int32_t CalloutMbaAndDimm( ExtensibleChip * i_chip,
STEP_CODE_DATA_STRUCT & i_sc, uint32_t i_port )
{
using namespace TARGETING;
using namespace CalloutUtil;
int32_t o_rc = SUCCESS;
TargetHandle_t mbaTarget = i_chip->GetChipHandle();
TargetHandleList calloutList = getConnectedDimms( mbaTarget, i_port );
i_sc.service_data->SetCallout( mbaTarget, MRU_LOW );
for ( TargetHandleList::iterator it = calloutList.begin();
it != calloutList.end(); it++)
{
i_sc.service_data->SetCallout( *it,MRU_HIGH );
}
return o_rc;
}
示例12: getProc
TargetHandle_t TargetServiceImpl::getProc(
TargetHandle_t i_membuf)
{
TargetHandle_t proc = NULL;
TargetHandleList list;
PredicateCTM pred(CLASS_CHIP, TYPE_PROC);
targetService().getAssociated(
list,
i_membuf,
TARGETING::TargetService::PARENT_BY_AFFINITY,
TARGETING::TargetService::ALL,
&pred);
if(list.size() == 1)
{
proc = list[0];
}
return proc;
}
示例13: getMcs
TargetHandle_t TargetServiceImpl::getMcs(
TargetHandle_t i_membuf)
{
TargetHandle_t mcs = NULL;
TargetHandleList list;
PredicateCTM pred(CLASS_UNIT, TYPE_MCS);
targetService().getAssociated(
list,
i_membuf,
TARGETING::TargetService::PARENT_BY_AFFINITY,
TARGETING::TargetService::IMMEDIATE,
&pred);
if(list.size() == 1)
{
mcs = list[0];
}
return mcs;
}
示例14: getTargetService
errlHndl_t ServiceCommon::configureInterrupts(
ConfigureMode i_mode)
{
errlHndl_t err = NULL;
TargetHandleList procs;
getTargetService().getAllChips(procs, TYPE_PROC);
TargetHandleList::iterator it = procs.begin();
while(it != procs.end())
{
uint64_t mask = 0;
// clear GPIO interrupt type status register
if(i_mode == UP)
{
err = putScom(*it, INTR_TYPE_LCL_ERR_STATUS_AND_REG,
0);
}
if(err)
{
break;
}
// unmask GPIO interrupt type
mask = 0x8000000000000000ull;
err = putScom(*it,
(i_mode == UP
? INTR_TYPE_MASK_AND_REG
: INTR_TYPE_MASK_OR_REG),
i_mode == UP ? ~mask : mask);
if(err)
{
break;
}
// set GPIO interrupt type mode - or
if(i_mode == UP)
{
err = putScom(*it, INTR_TYPE_CONFIG_AND_REG,
~mask);
}
if(err)
{
break;
}
// enable/disable MCSes
mask = 0;
GP1::forEach(~0, &mask, &getPbGp2Mask);
err = modifyScom(*it,
GP2_REG,
i_mode == UP ? mask : ~mask,
i_mode == UP ? SCOM_OR : SCOM_AND);
if(err)
{
break;
}
// enable attentions in ipoll mask
mask = HostMask::nonHost();
mask |= HostMask::host();
// this doesn't have an and/or reg for some reason...
err = modifyScom(*it,
IPOLL::address,
i_mode == UP ? ~mask : mask,
i_mode == UP ? SCOM_AND : SCOM_OR);
if(err)
{
break;
}
++it;
}
return err;
}
示例15: startScrub
errlHndl_t startScrub()
{
#define PRDF_FUNC "[PRDF::startScrub] "
PRDF_ENTER( PRDF_FUNC );
errlHndl_t o_errl = NULL;
int32_t l_rc = SUCCESS;
HUID nodeId = INVALID_HUID;
// will unlock when going out of scope
PRDF_SYSTEM_SCOPELOCK;
do
{
// Since the last refresh is in istep10 host_prd_hwreconfig,
// it may be good to call it again here at istep16 mss_scrub
// to remove any non-functional MBAs from PRD system model.
o_errl = noLock_refresh();
// This shouldn't return any error but if it does, break out
if(NULL != o_errl)
{
PRDF_ERR( PRDF_FUNC"noLock_refresh() failed" );
break;
}
// This is run in Hostboot so there should only be one node.
TargetHandleList list = getFunctionalTargetList( TYPE_NODE );
if ( 1 != list.size() )
{
PRDF_ERR( PRDF_FUNC"getFunctionalTargetList(TYPE_NODE) failed" );
l_rc = FAIL; break;
}
nodeId = getHuid(list[0]);
PRDF_ENTER( PRDF_FUNC"HUID=0x%08x", nodeId );
// Start scrubbing on all MBAs.
MbaDomain * domain = (MbaDomain *)systemPtr->GetDomain(MBA_DOMAIN);
if ( NULL == domain )
{
PRDF_ERR( PRDF_FUNC"MBA_DOMAIN not found. nodeId=0x%08x", nodeId );
l_rc = FAIL; break;
}
l_rc = domain->startScrub();
PRDF_EXIT( PRDF_FUNC"HUID=0x%08x", nodeId );
} while (0);
if (( SUCCESS != l_rc ) && (NULL == o_errl))
{
// Get user data
uint64_t ud12 = PRDF_GET_UINT64_FROM_UINT32( nodeId, __LINE__ );
uint64_t ud34 = PRDF_GET_UINT64_FROM_UINT32( 0, 0 );
// Create error log
o_errl = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_UNRECOVERABLE, // severity
PRDF_START_SCRUB, // module ID
PRDF_DETECTED_FAIL_SOFTWARE, // reason code
ud12, ud34 ); // user data 1-4
// Add 2nd level support
o_errl->addProcedureCallout( EPUB_PRC_LVL_SUPP, SRCI_PRIORITY_HIGH );
// Add traces
o_errl->collectTrace( PRDF_COMP_NAME, 512 );
}
PRDF_EXIT( PRDF_FUNC );
return o_errl;
#undef PRDF_FUNC
}