本文整理汇总了C++中TargetHandleList类的典型用法代码示例。如果您正苦于以下问题:C++ TargetHandleList类的具体用法?C++ TargetHandleList怎么用?C++ TargetHandleList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TargetHandleList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:bjwyman,项目名称:hostboot,代码行数:26,代码来源:attn.C
示例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 );
}
}
}
}
开发者ID:jk-ozlabs,项目名称:hostboot,代码行数:25,代码来源:prdfCalloutUtil.C
示例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);
}
}
开发者ID:jk-ozlabs,项目名称:hostboot,代码行数:32,代码来源:rt_occ.C
示例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
}
开发者ID:jk-ozlabs,项目名称:hostboot,代码行数:31,代码来源:prdfCalloutUtil.C
示例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);
}
开发者ID:AmesianX,项目名称:hostboot,代码行数:9,代码来源:attnfaketarget.C
示例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;
}
开发者ID:AmesianX,项目名称:hostboot,代码行数:55,代码来源:attntarget.C
示例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
}
开发者ID:HankChang,项目名称:hostboot,代码行数:63,代码来源:prdfPlatCenPll.C
示例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;
}
开发者ID:AmesianX,项目名称:hostboot,代码行数:15,代码来源:attntarget.C
示例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);
}
开发者ID:open-power,项目名称:hostboot,代码行数:48,代码来源:attnsvc.C
示例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;
}
开发者ID:open-power,项目名称:hostboot,代码行数:46,代码来源:attnsvc.C
示例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;
}
开发者ID:alvintpwang,项目名称:hostboot,代码行数:25,代码来源:prdfCenMba.C
示例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;
}
开发者ID:AmesianX,项目名称:hostboot,代码行数:22,代码来源:attntarget.C
示例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;
}
开发者ID:AmesianX,项目名称:hostboot,代码行数:22,代码来源:attntarget.C
示例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;
}
开发者ID:bjwyman,项目名称:hostboot,代码行数:92,代码来源:attnsvc_common.C
示例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
}
开发者ID:HankChang,项目名称:hostboot,代码行数:76,代码来源:prdfMain.C
示例16: PRDF_ERR
errlHndl_t PegasusConfigurator::addDomainChips( TARGETING::TYPE i_type,
RuleChipDomain * io_domain,
PllDomainList * io_pllDomains,
PllDomainList * io_pllDomains2)
{
using namespace TARGETING;
errlHndl_t l_errl = NULL ;
// Get references to factory objects.
ScanFacility & scanFac = ScanFacility::Access();
ResolutionFactory & resFac = ResolutionFactory::Access();
// Get all targets of specified type and add to given domain.
TargetHandleList list = PlatServices::getFunctionalTargetList( i_type );
if ( 0 == list.size() )
{
PRDF_ERR( "[addDomainChips] getFunctionalTargetList "
"returned empty list for i_type=%d", i_type );
}
else
{
// Get rule filename based on type.
const char * fileName = "";
switch ( i_type )
{
case TYPE_PROC:
// Check which Proc chip type
if (MODEL_NAPLES == getProcModel(list[0]))
fileName = NaplesProc;
else
fileName = MuranoVeniceProc;
break;
case TYPE_EX: fileName = Ex; break;
case TYPE_MCS: fileName = Mcs; break;
case TYPE_MEMBUF: fileName = Membuf; break;
case TYPE_MBA: fileName = Mba; break;
default:
// Print a trace statement, but do not fail the build.
PRDF_ERR( "[addDomainChips] Unsupported target type: %d",
i_type );
}
for ( TargetHandleList::const_iterator itr = list.begin();
itr != list.end(); ++itr )
{
if ( NULL == *itr ) continue;
RuleChip * chip = new RuleChip( fileName, *itr,
scanFac, resFac,l_errl );
if( NULL != l_errl )
{
delete chip;
break;
}
sysChipLst.push_back( chip );
io_domain->AddChip( chip );
// PLL domains
switch ( i_type )
{
case TYPE_PROC:
addChipsToPllDomain(CLOCK_DOMAIN_FAB,
io_pllDomains,
chip,
*itr,
scanFac,
resFac);
addChipsToPllDomain(CLOCK_DOMAIN_IO,
io_pllDomains2,
chip,
*itr,
scanFac,
resFac);
break;
case TYPE_MEMBUF:
addChipsToPllDomain(CLOCK_DOMAIN_MEMBUF,
io_pllDomains,
chip,
*itr,
scanFac,
resFac);
break;
default:
break;
}
}
// Flush rule table cache since objects are all built.
Prdr::LoadChipCache::flushCache();
}
return l_errl;
}
开发者ID:AmesianX,项目名称:hostboot,代码行数:96,代码来源:prdfPegasusConfigurator.C
示例17: GetCheckstopInfo
/** @func GetCheckstopInfo
* To be called from the fabric domain to gather Checkstop information. This
* information is used in a sorting algorithm.
*
* This is a plugin function: GetCheckstopInfo
*
* @param i_chip - The chip.
* @param o_wasInternal - True if this chip has an internal checkstop.
* @param o_externalChips - List of external fabrics driving checkstop.
* @param o_wofValue - Current WOF value (unused for now).
*/
int32_t GetCheckstopInfo( ExtensibleChip * i_chip,
bool & o_wasInternal,
TargetHandleList & o_externalChips,
uint64_t & o_wofValue )
{
// Clear parameters.
o_wasInternal = false;
o_externalChips.erase(o_externalChips.begin(), o_externalChips.end());
o_wofValue = 0;
SCAN_COMM_REGISTER_CLASS * l_globalFir =
i_chip->getRegister("GLOBAL_CS_FIR");
SCAN_COMM_REGISTER_CLASS * l_pbXstpFir =
i_chip->getRegister("PB_CHIPLET_CS_FIR");
SCAN_COMM_REGISTER_CLASS * l_extXstpFir =
i_chip->getRegister("PBEXTFIR");
int32_t o_rc = SUCCESS;
o_rc |= l_globalFir->Read();
o_rc |= l_pbXstpFir->Read();
o_rc |= l_extXstpFir->Read();
if(o_rc)
{
PRDF_ERR( "[GetCheckstopInfo] SCOM fail on 0x%08x rc=%x",
i_chip->GetId(), o_rc);
return o_rc;
}
if ((0 != l_globalFir->GetBitFieldJustified(0,32)) &&
(!l_globalFir->IsBitSet(2) ||
!l_pbXstpFir->IsBitSet(2)))
o_wasInternal = true;
// Get connected chips.
uint32_t l_connectedXstps = l_extXstpFir->GetBitFieldJustified(0,7);
uint32_t l_positions[] =
{
0, // bit 0 - XBUS 0
1, // bit 1 - XBUS 1
2, // bit 2 - XBUS 2
3, // bit 3 - XBUS 3
0, // bit 4 - ABUS 0
1, // bit 5 - ABUS 1
2 // bit 6 - ABUS 2
};
for (int i = 0, j = 0x40; i < 7; i++, j >>= 1)
{
if (0 != (j & l_connectedXstps))
{
TargetHandle_t l_connectedFab =
getConnectedPeerProc(i_chip->GetChipHandle(),
i<4 ? TYPE_XBUS : TYPE_ABUS,
l_positions[i]);
if (NULL != l_connectedFab)
{
o_externalChips.push_back(l_connectedFab);
}
}
}
// Read WOF value.
SCAN_COMM_REGISTER_CLASS * l_wof = i_chip->getRegister("TODWOF");
o_rc |= l_wof->Read();
if(o_rc)
{
PRDF_ERR( "[GetCheckstopInfo] SCOM fail on 0x%08x rc=%x",
i_chip->GetId(), o_rc);
return o_rc;
}
o_wofValue = l_wof->GetBitFieldJustified(0,64);
return SUCCESS;
} PRDF_PLUGIN_DEFINE( Proc, GetCheckstopInfo );
开发者ID:HankChang,项目名称:hostboot,代码行数:92,代码来源:prdfP8Proc.C
示例18: setTdSignature
int32_t CenMbaTdCtlr::handleUE( STEP_CODE_DATA_STRUCT & io_sc )
{
#define PRDF_FUNC "[CenMbaTdCtlr::handleUE] "
using namespace CalloutUtil;
int32_t o_rc = SUCCESS;
iv_tdState = NO_OP; // Abort the TD procedure.
setTdSignature( io_sc, PRDFSIG_MaintUE );
io_sc.service_data->SetServiceCall();
CenMbaDataBundle * mbadb = getMbaDataBundle( iv_mbaChip );
do
{
// Clean up the maintenance command. This is needed just in case the UE
// isolation procedure is modified to use maintenance commands.
o_rc = cleanupPrevCmd();
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC"cleanupPrevCmd() failed" );
break;
}
// Look for all failing bits on this rank.
CenDqBitmap bitmap;
o_rc = mssIplUeIsolation( iv_mbaTrgt, iv_rank, bitmap );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC"mssIplUeIsolation() failed" );
break;
}
// Add UE data to capture data.
bitmap.getCaptureData( io_sc.service_data->GetCaptureData() );
// Callout the failing DIMMs.
TargetHandleList callouts;
for ( int32_t ps = 0; ps < PORT_SLCT_PER_MBA; ps++ )
{
bool badDqs = false;
o_rc = bitmap.badDqs( ps, badDqs );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC"badDqs(%d) failed", ps );
break;
}
if ( !badDqs ) continue; // nothing to do.
TargetHandleList dimms = getConnectedDimms(iv_mbaTrgt, iv_rank, ps);
if ( 0 == dimms.size() )
{
PRDF_ERR( PRDF_FUNC"getConnectedDimms(%d) failed", ps );
o_rc = FAIL; break;
}
callouts.insert( callouts.end(), dimms.begin(), dimms.end() );
if ( isMfgCeCheckingEnabled() )
{
// As we are doing callout for UE, we dont need to do callout
// during CE for this rank on given port
mbadb->getIplCeStats()->banAnalysis( iv_rank, ps );
}
}
if ( SUCCESS != o_rc ) break;
if ( 0 == callouts.size() )
{
// It is possible the scrub counters have rolled over to zero due to
// a known DD1.0 hardware bug. In this case, the best we can do is
// callout both DIMMs, because at minimum we know there was a UE, we
// just don't know where.
// NOTE: If this condition happens because of a DD2.0+ bug, the
// mssIplUeIsolation procedure will callout the Centaur.
callouts = getConnectedDimms( iv_mbaTrgt, iv_rank );
if ( 0 == callouts.size() )
{
PRDF_ERR( PRDF_FUNC"getConnectedDimms() failed" );
o_rc = FAIL; break;
}
if ( isMfgCeCheckingEnabled() )
{
// As we are doing callout for UE, we dont need to do callout
// during CE for this rank on both port
mbadb->getIplCeStats()->banAnalysis( iv_rank);
}
}
// Callout all DIMMs in the list.
for ( TargetHandleList::iterator i = callouts.begin();
i != callouts.end(); i++ )
{
io_sc.service_data->SetCallout( *i, MRU_HIGH );
}
//.........这里部分代码省略.........
开发者ID:rjknight,项目名称:hostboot,代码行数:101,代码来源:prdfCenMbaTdCtlr.C
示例19: discoverTargets
errlHndl_t discoverTargets()
{
HWAS_INF("discoverTargets entry");
errlHndl_t errl = NULL;
// loop through all the targets and set HWAS_STATE to a known default
for (TargetIterator target = targetService().begin();
target != targetService().end();
++target)
{
HwasState hwasState = target->getAttr<ATTR_HWAS_STATE>();
hwasState.deconfiguredByEid = 0;
hwasState.poweredOn = false;
hwasState.present = false;
hwasState.functional = false;
hwasState.dumpfunctional = false;
target->setAttr<ATTR_HWAS_STATE>(hwasState);
}
// Assumptions and actions:
// CLASS_SYS (exactly 1) - mark as present
// CLASS_ENC, TYPE_PROC, TYPE_MEMBUF, TYPE_DIMM
// (ALL require hardware query) - call platPresenceDetect
// \->children: CLASS_* (NONE require hardware query) - mark as present
do
{
// find CLASS_SYS (the top level target)
Target* pSys;
targetService().getTopLevelTarget(pSys);
HWAS_ASSERT(pSys,
"HWAS discoverTargets: no CLASS_SYS TopLevelTarget found");
// mark this as present
enableHwasState(pSys, true, true, 0);
HWAS_DBG("pSys %.8X - marked present",
pSys->getAttr<ATTR_HUID>());
// find list of all we need to call platPresenceDetect against
PredicateCTM predEnc(CLASS_ENC);
PredicateCTM predChip(CLASS_CHIP);
PredicateCTM predDimm(CLASS_LOGICAL_CARD, TYPE_DIMM);
PredicatePostfixExpr checkExpr;
checkExpr.push(&predChip).push(&predDimm).Or().push(&predEnc).Or();
TargetHandleList pCheckPres;
targetService().getAssociated( pCheckPres, pSys,
TargetService::CHILD, TargetService::ALL, &checkExpr );
// pass this list to the hwas platform-specific api where
// pCheckPres will be modified to only have present targets
HWAS_DBG("pCheckPres size: %d", pCheckPres.size());
errl = platPresenceDetect(pCheckPres);
HWAS_DBG("pCheckPres size: %d", pCheckPres.size());
if (errl != NULL)
{
break; // break out of the do/while so that we can return
}
// for each, read their ID/EC level. if that works,
// mark them and their descendants as present
// read the partialGood vector to determine if any are not functional
// and read and store values from the PR keyword
// list of procs and data that we'll need to look at the PR keyword
procRestrict_t l_procEntry;
std::vector <procRestrict_t> l_procPRList;
// sort the list by ATTR_HUID to ensure that we
// start at the same place each time
std::sort(pCheckPres.begin(), pCheckPres.end(),
compareTargetHuid);
for (TargetHandleList::const_iterator pTarget_it = pCheckPres.begin();
pTarget_it != pCheckPres.end();
++pTarget_it
)
{
TargetHandle_t pTarget = *pTarget_it;
// if CLASS_ENC is still in this list, mark as present
if (pTarget->getAttr<ATTR_CLASS>() == CLASS_ENC)
{
enableHwasState(pTarget, true, true, 0);
HWAS_DBG("pTarget %.8X - CLASS_ENC marked present",
pTarget->getAttr<ATTR_HUID>());
// on to the next target
continue;
}
bool chipPresent = true;
bool chipFunctional = true;
uint32_t errlEid = 0;
uint16_t pgData[VPD_CP00_PG_DATA_LENGTH / sizeof(uint16_t)];
bzero(pgData, sizeof(pgData));
if (pTarget->getAttr<ATTR_CLASS>() == CLASS_CHIP)
{
//.........这里部分代码省略.........
开发者ID:HankChang,项目名称:hostboot,代码行数:101,代码来源:hwas.C
示例20: 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;
INTR::XISR_t xisr;
xisr.u32 = i_msg.data[0];
TargetHandleList procs;
getTargetService().getAllChips(procs, TYPE_PROC);
TargetHandleList::iterator it = procs.begin();
// resolve the xisr to a proc target
while(it != procs.end())
{
uint64_t node = 0, chip = 0;
getTargetService().getAttribute(ATTR_FABRIC_NODE_ID, *it, node);
getTargetService().getAttribute(ATTR_FABRIC_CHIP_ID, *it, chip);
if(node == xisr.node
&& chip == xisr.chip)
{
proc = *it;
break;
}
++it;
}
uint64_t hostMask = HostMask::host();
uint64_t nonHostMask = HostMask::nonHost();
uint64_t data = 0;
// do the minimum that is required
// for sending EOI without getting
// another interrupt. for host attentions
// this is clearing the gpio interrupt
// type status register
// and for xstp,rec,spcl this is
// masking the appropriate bit in
// ipoll mask
// read the ipoll status register
// to determine the interrupt was
// caused by host attn or something
// else (xstp,rec,spcl)
errlHndl_t err = getScom(proc, IPOLL_STATUS_REG, data);
if(err)
{
errlCommit(err, ATTN_COMP_ID);
// assume everything is on
data = hostMask | nonHostMask;
}
if(data & hostMask)
{
// if host attention, clear the ITR macro gpio interrupt
// type status register.
err = putScom(proc, INTR_TYPE_LCL_ERR_STATUS_AND_REG, 0);
if(err)
{
errlCommit(err, ATTN_COMP_ID);
}
}
if(data & nonHostMask)
{
// mask local proc xstp,rec and/or special attns if on.
// the other thread might be trying to unmask
// on the same target. The mutex ensures
// neither thread corrupts the register.
mutex_lock(&iv_mutex);
err = modifyScom(proc, IPOLL::address, data & nonHostMask, SCOM_OR);
mutex_unlock(&iv_mutex);
if(err)
{
errlCommit(err, ATTN_COMP_ID);
}
}
}
开发者ID:rjknight,项目名称:hostboot,代码行数:98,代码来源:attnsvc.C
注:本文中的TargetHandleList类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论