diff options
author | Brian Horton <brianh@linux.ibm.com> | 2013-01-17 10:42:48 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-02-04 13:10:03 -0600 |
commit | 68286500750647b14ec5cbbe0253bafef2fdf341 (patch) | |
tree | 6daad1d9a2fdb00c73b0714e261f2b361b3cb409 /src | |
parent | 51600b1e0118cd11953c79443f8fdf6156cff455 (diff) | |
download | talos-hostboot-68286500750647b14ec5cbbe0253bafef2fdf341.tar.gz talos-hostboot-68286500750647b14ec5cbbe0253bafef2fdf341.zip |
change path.dump() calls to trace HUID
also, some other general cleanup
- replace loop counters with iterators
- made more code consistant
- fixed bug where errl wasn't getting committed
Change-Id: I7acdda17b1b116675ce84de8c22f87395e0fee91
RTC: 59413
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2949
Tested-by: Jenkins Server
Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
17 files changed, 887 insertions, 969 deletions
diff --git a/src/build/tools/genIStep.pl b/src/build/tools/genIStep.pl index f3490432b..54c1b98ee 100755 --- a/src/build/tools/genIStep.pl +++ b/src/build/tools/genIStep.pl @@ -1,26 +1,26 @@ #!/usr/bin/perl -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. # -# $Source: src/build/tools/genIStep.pl $ +# $Source: src/build/tools/genIStep.pl $ # -# IBM CONFIDENTIAL +# IBM CONFIDENTIAL # -# COPYRIGHT International Business Machines Corp. 2012 +# COPYRIGHT International Business Machines Corp. 2012,2013 # -# p1 +# p1 # -# Object Code Only (OCO) source materials -# Licensed Internal Code Source Materials -# IBM HostBoot Licensed Internal Code +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code # -# The source code for this program is not published or other- -# wise divested of its trade secrets, irrespective of what has -# been deposited with the U.S. Copyright Office. +# The source code for this program is not published or otherwise +# divested of its trade secrets, irrespective of what has been +# deposited with the U.S. Copyright Office. # -# Origin: 30 +# Origin: 30 # -# IBM_PROLOG_END_TAG +# IBM_PROLOG_END_TAG # # Author: Mark Wenning wenning@us.ibm.com # @@ -377,10 +377,10 @@ void* call_\@substepname( void *io_pArgs ) // customize any other inputs // set up loops to go through all targets (if parallel, spin off a task) - // dump physical path to targets - EntityPath l_path; - l_path = l_\@targetN_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + // write HUID of target + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + \"target HUID: %.8X\", + TARGETING::get_huid(l_\@targetN_target)); // cast OUR type of target to a FAPI type of target const fapi::Target l_fapi_\@targetN_target( diff --git a/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.C b/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.C index fd2d26bef..110cb065e 100644 --- a/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.C +++ b/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012 */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ /* */ /* p1 */ /* */ @@ -27,10 +27,6 @@ * Support file for IStep: activate_powerbus * Activate PowerBus * - * ***************************************************************** - * THIS FILE WAS GENERATED ON 2012-04-11:1607 - * ***************************************************************** - * * HWP_IGNORE_VERSION_CHECK * */ @@ -58,7 +54,6 @@ #include "activate_powerbus.H" #include <pbusLinkSvc.H> -// Uncomment these files as they become available: #include "proc_build_smp/proc_build_smp.H" namespace ACTIVATE_POWERBUS @@ -98,6 +93,7 @@ void* call_proc_build_smp( void *io_pArgs ) l_StepError.addErrorDetails(ISTEP_ACTIVATE_POWER_BUS_FAILED, ISTEP_PROC_BUILD_SMP, l_errl); + errlCommit( l_errl, HWPF_COMP_ID ); break; } @@ -110,6 +106,7 @@ void* call_proc_build_smp( void *io_pArgs ) l_StepError.addErrorDetails(ISTEP_ACTIVATE_POWER_BUS_FAILED, ISTEP_PROC_BUILD_SMP, l_errl); + errlCommit( l_errl, HWPF_COMP_ID ); break; } @@ -120,17 +117,16 @@ void* call_proc_build_smp( void *io_pArgs ) // chip object of this A/X-bus endpoint for the procEntry std::vector<proc_build_smp_proc_chip> l_procChips; - for (TARGETING::TargetHandleList::iterator l_cpuIter = - l_cpuTargetList.begin(); l_cpuIter != l_cpuTargetList.end(); + for (TARGETING::TargetHandleList::const_iterator + l_cpuIter = l_cpuTargetList.begin(); + l_cpuIter != l_cpuTargetList.end(); ++l_cpuIter) { - proc_build_smp_proc_chip l_procEntry; const TARGETING::Target* l_pTarget = *l_cpuIter; - fapi::Target l_fapiproc_target( TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> - (const_cast<TARGETING::Target*>(l_pTarget)) ); + (const_cast<TARGETING::Target*>(l_pTarget))); + proc_build_smp_proc_chip l_procEntry; l_procEntry.this_chip = l_fapiproc_target; l_procEntry.enable_f0 = false; l_procEntry.enable_f1 = false; @@ -138,10 +134,12 @@ void* call_proc_build_smp( void *io_pArgs ) TARGETING::TargetHandleList l_abuses; getChildChiplets( l_abuses, l_pTarget, TYPE_ABUS ); - for (TARGETING::TargetHandleList::iterator l_abusIter = - l_abuses.begin(); l_abusIter != l_abuses.end(); ++l_abusIter) + for (TARGETING::TargetHandleList::const_iterator + l_abusIter = l_abuses.begin(); + l_abusIter != l_abuses.end(); + ++l_abusIter) { - TARGETING::Target * l_target = *l_abusIter; + const TARGETING::Target * l_target = *l_abusIter; uint8_t l_srcID = l_target->getAttr<ATTR_CHIP_UNIT>(); TargetPairs_t::iterator l_itr = l_abusConnections.find(l_target); if ( l_itr == l_abusConnections.end() ) @@ -151,7 +149,7 @@ void* call_proc_build_smp( void *io_pArgs ) const TARGETING::Target *l_pParent = NULL; l_pParent = getParentChip( - (const_cast<TARGETING::Target*>(l_itr->second))); + (const_cast<TARGETING::Target*>(l_itr->second))); fapi::Target l_fapiproc_parent( TARGET_TYPE_PROC_CHIP, (void *)l_pParent ); @@ -164,18 +162,20 @@ void* call_proc_build_smp( void *io_pArgs ) } l_procEntry.f0_node_id = static_cast<proc_fab_smp_node_id>( - l_pTarget->getAttr<TARGETING::ATTR_FABRIC_NODE_ID>()); + l_pTarget->getAttr<TARGETING::ATTR_FABRIC_NODE_ID>()); l_procEntry.f1_node_id = static_cast<proc_fab_smp_node_id>( - l_pParent->getAttr<TARGETING::ATTR_FABRIC_NODE_ID>()); + l_pParent->getAttr<TARGETING::ATTR_FABRIC_NODE_ID>()); } TARGETING::TargetHandleList l_xbuses; getChildChiplets( l_xbuses, l_pTarget, TYPE_XBUS ); - for (TARGETING::TargetHandleList::iterator l_xbusIter = - l_xbuses.begin(); l_xbusIter != l_xbuses.end(); ++l_xbusIter) + for (TARGETING::TargetHandleList::const_iterator + l_xbusIter = l_xbuses.begin(); + l_xbusIter != l_xbuses.end(); + ++l_xbusIter) { - TARGETING::Target * l_target = *l_xbusIter; + const TARGETING::Target * l_target = *l_xbusIter; uint8_t l_srcID = l_target->getAttr<ATTR_CHIP_UNIT>(); TargetPairs_t::iterator l_itr = l_xbusConnections.find(l_target); if ( l_itr == l_xbusConnections.end() ) @@ -185,7 +185,7 @@ void* call_proc_build_smp( void *io_pArgs ) const TARGETING::Target *l_pParent = NULL; l_pParent = getParentChip( - (const_cast<TARGETING::Target*>(l_itr->second))); + (const_cast<TARGETING::Target*>(l_itr->second))); fapi::Target l_fapiproc_parent( TARGET_TYPE_PROC_CHIP, (void *)l_pParent ); diff --git a/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C b/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C index c30f853f7..f285bc248 100644 --- a/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C +++ b/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C @@ -188,12 +188,12 @@ errlHndl_t applyPoreGenCpuRegs( TARGETING::Target *i_cpuTarget, l_coreIds.size(), cpu_thread_count() ); + const size_t l_cpu_thread_count = cpu_thread_count(); + TARGETING::ATTR_CHIP_UNIT_type l_coreId = 0; size_t l_threadId = 0; - size_t l_coreId = 0; uint32_t l_rc = 0; uint64_t l_msrVal = cpu_spr_value(CPU_SPR_MSR) ; - uint64_t l_lpcrVal = cpu_spr_value( CPU_SPR_LPCR); // Per Greg Still, // Decrementer exceptions (bit 50) should be disabled when the system @@ -203,15 +203,19 @@ errlHndl_t applyPoreGenCpuRegs( TARGETING::Target *i_cpuTarget, l_lpcrVal &= ~(0x0000000000002000) ; uint64_t l_hrmorVal = cpu_spr_value(CPU_SPR_HRMOR); - for ( uint8_t i=0; i < l_coreIds.size(); i++ ) + for (TargetHandleList::const_iterator + l_coreIds_iter = l_coreIds.begin(); + l_coreIds_iter != l_coreIds.end(); + ++l_coreIds_iter) { + // make a local copy of the target for ease of use + const TARGETING::Target* l_core = *l_coreIds_iter; - // dump path to the core we are writing to - EntityPath l_path; - l_path = l_coreIds[i]->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + // write the HUID of the core we are writing to + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", TARGETING::get_huid(l_core)); - l_coreId = l_coreIds[i]->getAttr<ATTR_CHIP_UNIT>(); + l_coreId = l_core->getAttr<ATTR_CHIP_UNIT>(); // msr and hrmor are common across all threads, only set for thread 0 // on each core @@ -226,9 +230,7 @@ errlHndl_t applyPoreGenCpuRegs( TARGETING::Target *i_cpuTarget, { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "ERROR: MSR: core=0x%x,thread=0x%x,l_rc=0x%x", - l_coreId, - l_threadId, - l_rc ); + l_coreId, l_threadId, l_rc ); break; } @@ -241,41 +243,33 @@ errlHndl_t applyPoreGenCpuRegs( TARGETING::Target *i_cpuTarget, if ( l_rc ){ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "ERROR: HRMOR: core=0x%x,thread=0x%x,l_rc=0x%x", - l_coreId, - l_threadId, - l_rc ); + l_coreId, l_threadId, l_rc ); break; } // fill in lpcr for each thread - for ( l_threadId=0; l_threadId < cpu_thread_count(); l_threadId++ ) + for ( l_threadId=0; l_threadId < l_cpu_thread_count; l_threadId++ ) { - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "applyPoreGenCpuRegs: core=0x%x,thread=0x%x: ", - l_coreId, - l_threadId ); + l_coreId, l_threadId ); TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "applyPoreGenCpuRegs: msrc=0x%x,lpcr=0x%x,hrmor=0x%x", - l_msrVal, - l_lpcrVal, - l_hrmorVal ); - - l_rc = p8_pore_gen_cpureg( io_image, - i_sizeImage, - P8_SPR_LPCR, - l_lpcrVal, - l_coreId, - l_threadId); - if ( l_rc ) - { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR: LPCR: core=0x%x,thread=0x%x,l_rc=0x%x", - l_coreId, - l_threadId, - l_rc ); - break; - } + l_msrVal, l_lpcrVal, l_hrmorVal ); + + l_rc = p8_pore_gen_cpureg( io_image, + i_sizeImage, + P8_SPR_LPCR, + l_lpcrVal, + l_coreId, + l_threadId); + if ( l_rc ) + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR: LPCR: core=0x%x,thread=0x%x,l_rc=0x%x", + l_coreId, l_threadId, l_rc ); + break; + } } // end for l_threadId // if error writing thread break out of l_coreId loop @@ -283,14 +277,12 @@ errlHndl_t applyPoreGenCpuRegs( TARGETING::Target *i_cpuTarget, { break; } - } // end for l_coreId + } // end for l_coreIds if ( l_rc ){ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "ERROR: core=0x%x, thread=0x%x, l_rc=0x%x", - l_coreId, - l_threadId, - l_rc ); + l_coreId, l_threadId, l_rc ); /*@ * @errortype * @reasoncode ISTEP_BAD_RC @@ -301,8 +293,7 @@ errlHndl_t applyPoreGenCpuRegs( TARGETING::Target *i_cpuTarget, * @devdesc p8_pore_gen_cpureg returned an error when * attempting to change a reg value in the PORE image. */ - l_errl = - new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE, + l_errl = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE, ISTEP::ISTEP_BUILD_WINKLE_IMAGES, ISTEP::ISTEP_BAD_RC, l_rc ); @@ -320,10 +311,8 @@ void* call_host_build_winkle( void *io_pArgs ) const char *l_pPoreImage = NULL; size_t l_poreSize = 0; - int l_getAddrRc = 0; void *l_pRealMemBase = reinterpret_cast<void * const>( OUTPUT_PORE_IMG_ADDR ) ; - uint64_t l_RealMemSize = 0; ISTEP_ERROR::IStepError l_StepError; @@ -340,14 +329,14 @@ void* call_host_build_winkle( void *io_pArgs ) // Get a chunk of real memory big enough to store all the possible // SLW images. - l_RealMemSize = ( (MAX_OUTPUT_PORE_IMG_IN_MB*1*MEGABYTE) * + const uint64_t l_RealMemSize = ( (MAX_OUTPUT_PORE_IMG_IN_MB*1*MEGABYTE) * MAX_POSSIBLE_PROCS_IN_P8_SYSTEM ); TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Got realmem to store all SLW images, size=0x%lx", l_RealMemSize ); - l_getAddrRc = mm_linear_map( l_pRealMemBase, + const int l_getAddrRc = mm_linear_map( l_pRealMemBase, l_RealMemSize ); if ( l_getAddrRc != 0 ) { @@ -417,20 +406,19 @@ void* call_host_build_winkle( void *io_pArgs ) "Found %d procs in system", l_procChips.size() ); - for ( TargetHandleList::iterator l_iter = l_procChips.begin(); - l_iter != l_procChips.end(); - ++l_iter ) + for ( TargetHandleList::const_iterator + l_iter = l_procChips.begin(); + l_iter != l_procChips.end(); + ++l_iter ) { TARGETING::Target * l_procChip = (*l_iter) ; do { - // dump physical path to proc target - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Build SLW image for proc.." ); - EntityPath l_path; - l_path = l_procChip->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + // write the HUID of the core we are writing to + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "Build SLW image for proc " + "target HUID %.8X", TARGETING::get_huid(l_procChip)); l_errl = loadPoreImage( l_procChip, l_pPoreImage, @@ -468,9 +456,7 @@ void* call_host_build_winkle( void *io_pArgs ) l_procRealMemAddr ); // cast OUR type of target to a FAPI type of target. - const fapi::Target l_fapi_cpu_target( - TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> + const fapi::Target l_fapi_cpu_target( TARGET_TYPE_PROC_CHIP, (const_cast<TARGETING::Target*> (l_procChip)) ); @@ -528,11 +514,8 @@ void* call_host_build_winkle( void *io_pArgs ) // the errlog in IStepError, and continue to next proc if (l_errl) { - // Add all the details for this proc - ErrlUserDetailsTarget myDetails(l_procChip); - // capture the target data in the elog - myDetails.addToLog(l_errl); + ErrlUserDetailsTarget(l_procChip).addToLog( l_errl ); /*@ * @errortype @@ -591,25 +574,21 @@ void* call_proc_set_pore_bar( void *io_pArgs ) "Found %d procs in system", l_procChips.size() ); - for ( TargetHandleList::iterator l_iter = l_procChips.begin(); + for ( TargetHandleList::const_iterator + l_iter = l_procChips.begin(); l_iter != l_procChips.end(); ++l_iter ) { - TARGETING::Target * l_procChip = (*l_iter) ; + const TARGETING::Target * l_procChip = (*l_iter) ; - // dump physical path to target - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Set pore bar for .." ); - EntityPath l_path; - l_path = l_procChip->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + // write the HUID of the core we are writing to + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "Set pore bar for " + "target HUID %.8X", TARGETING::get_huid(l_procChip)); // cast OUR type of target to a FAPI type of target. - const fapi::Target l_fapi_cpu_target( - TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> - (const_cast<TARGETING::Target*> - (l_procChip)) ); + const fapi::Target l_fapi_cpu_target( TARGET_TYPE_PROC_CHIP, + (const_cast<TARGETING::Target*>(l_procChip)) ); // fetch image location and size, written by host_build_winkle above @@ -660,6 +639,10 @@ void* call_proc_set_pore_bar( void *io_pArgs ) TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR : p8_set_pore_bar, PLID=0x%x", l_errl->plid() ); + + // capture the target data in the elog + ErrlUserDetailsTarget(l_procChip).addToLog( l_errl ); + /*@ * @errortype * @reasoncode ISTEP_BUILD_WINKLE_IMAGES_FAILED @@ -720,24 +703,20 @@ void* call_p8_poreslw_init( void *io_pArgs ) "Found %d procs in system", l_procChips.size() ); - for ( TargetHandleList::iterator l_iter = l_procChips.begin(); - l_iter != l_procChips.end(); - ++l_iter ) + for ( TargetHandleList::const_iterator + l_iter = l_procChips.begin(); + l_iter != l_procChips.end(); + ++l_iter ) { - TARGETING::Target * l_procChip = (*l_iter) ; - - // dump physical path to target - EntityPath l_path; - l_path = l_procChip->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + const TARGETING::Target * l_procChip = (*l_iter) ; + // write the HUID of the core we are writing to + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", TARGETING::get_huid(l_procChip)); // cast OUR type of target to a FAPI type of target. - const fapi::Target l_fapi_cpu_target( - TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> - (const_cast<TARGETING::Target*> - (l_procChip)) ); + const fapi::Target l_fapi_cpu_target( TARGET_TYPE_PROC_CHIP, + (const_cast<TARGETING::Target*>(l_procChip)) ); // // Configure the SLW PORE and related functions to enable idle @@ -753,6 +732,9 @@ void* call_p8_poreslw_init( void *io_pArgs ) "ERROR : p8_poreslw_init, PLID=0x%x", l_errl->plid() ); + // capture the target data in the elog + ErrlUserDetailsTarget(l_procChip).addToLog( l_errl ); + /*@ * @errortype * @reasoncode ISTEP_P8_PORESLW_INIT_FAILED diff --git a/src/usr/hwpf/hwp/bus_training/pbusLinkSvc.C b/src/usr/hwpf/hwp/bus_training/pbusLinkSvc.C index 22cf3bfa6..6b04682f5 100644 --- a/src/usr/hwpf/hwp/bus_training/pbusLinkSvc.C +++ b/src/usr/hwpf/hwp/bus_training/pbusLinkSvc.C @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/usr/hwpf/hwp/edi_ei_initialization/pbusLinkSvc.C $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2012 - * - * p1 - * - * Object Code Only (OCO) source materials - * Licensed Internal Code Source Materials - * IBM HostBoot Licensed Internal Code - * - * The source code for this program is not published or other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/hwpf/hwp/bus_training/pbusLinkSvc.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ #include "pbusLinkSvc.H" namespace EDI_EI_INITIALIZATION @@ -102,12 +101,14 @@ errlHndl_t PbusLinkSvc::collectPbusConections( TYPE i_busType ) iv_abusUniqueConnections : iv_xbusUniqueConnections; // Collect all functional i_busType pbus connections - for (size_t i = 0; (l_errl == NULL) && (i < l_busTargetList.size()); i++) + for (TargetHandleList::iterator l_bus_iter = l_busTargetList.begin(); + (l_errl == NULL) && (l_bus_iter != l_busTargetList.end()); + ++l_bus_iter) { // get two endpoint targets - const TARGETING::Target * l_pTarget = l_busTargetList[i]; - const TARGETING::Target * l_dstTgt = NULL; - l_dstTgt = l_pTarget->getAttr<ATTR_PEER_TARGET>(); + const TARGETING::Target * l_pTarget = *l_bus_iter; + const TARGETING::Target * l_dstTgt = + l_pTarget->getAttr<ATTR_PEER_TARGET>(); // connection is existing, not to itself and is a real target if ((l_dstTgt != NULL) && (l_dstTgt != l_pTarget)) @@ -115,12 +116,11 @@ errlHndl_t PbusLinkSvc::collectPbusConections( TYPE i_busType ) TYPE l_dstType = l_dstTgt->getAttr<ATTR_TYPE>(); if (l_dstType != i_busType) { - TARG_ERR("Both endpoints' bus type mismatch"); - EntityPath l_path; - l_path = l_pTarget->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); - l_path = l_dstTgt->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + TRACFCOMP(TARGETING::g_trac_targeting, + "Both endpoints' bus type mismatch; " + "target HUID %.8X dest HUID", + TARGETING::get_huid(l_pTarget), + TARGETING::get_huid(l_dstTgt)); // Mixed bus type connection /** @@ -146,12 +146,11 @@ errlHndl_t PbusLinkSvc::collectPbusConections( TYPE i_busType ) if (l_endp1Parent == l_endp2Parent) { - TARG_ERR("Both endpoints from same chip"); - EntityPath l_path; - l_path = l_pTarget->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); - l_path = l_dstTgt->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + TRACFCOMP(TARGETING::g_trac_targeting, + "Both endpoints from same chip; " + "target HUID %.8X dest HUID %.8X", + TARGETING::get_huid(l_pTarget), + TARGETING::get_huid(l_dstTgt)); // connection of same chip /** @@ -167,10 +166,12 @@ errlHndl_t PbusLinkSvc::collectPbusConections( TYPE i_busType ) continue; } - for (size_t j = 0; j < l_busTargetList.size(); j++) + for (TargetHandleList::iterator l_dst_iter = l_busTargetList.begin(); + l_dst_iter != l_busTargetList.end(); + ++l_dst_iter) { // l_dstTgt is functional - if (l_dstTgt == l_busTargetList[j]) + if (l_dstTgt == *l_dst_iter) { // save the pair if not yet done so l_PbusConnections[l_pTarget] = l_dstTgt; @@ -179,13 +180,14 @@ errlHndl_t PbusLinkSvc::collectPbusConections( TYPE i_busType ) } } } - } + } // for l_bus_iter // Validate pbus connections are valid and strike out // duplicates for the Unique connection map TargetPairs_t::iterator l_itr, l_jtr; for (l_itr = l_PbusUniqueConnections.begin(); - (l_errl == NULL) && (l_itr != l_PbusUniqueConnections.end()); ++l_itr) + (l_errl == NULL) && (l_itr != l_PbusUniqueConnections.end()); + ++l_itr) { const TARGETING::Target *l_ptr1 = l_itr->first; const TARGETING::Target *l_ptr2 = l_itr->second; diff --git a/src/usr/hwpf/hwp/core_activate/core_activate.C b/src/usr/hwpf/hwp/core_activate/core_activate.C index c840bc88d..f8ca1608c 100644 --- a/src/usr/hwpf/hwp/core_activate/core_activate.C +++ b/src/usr/hwpf/hwp/core_activate/core_activate.C @@ -108,22 +108,17 @@ void* call_host_activate_master( void *io_pArgs ) TARGETING::Target* l_cpu_target = const_cast<TARGETING::Target *> ( getParentChip( l_masterCore ) ); - // dump physical path to target - EntityPath l_path; - l_path = l_cpu_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + // trace HUID + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", TARGETING::get_huid(l_cpu_target)); // cast OUR type of target to a FAPI type of target. - const fapi::Target l_fapi_cpu_target( - TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> - (const_cast<TARGETING::Target*> - (l_cpu_target)) ); + const fapi::Target l_fapi_cpu_target( TARGET_TYPE_PROC_CHIP, + (const_cast<TARGETING::Target*> (l_cpu_target)) ); TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_activate_master: call proc_prep_master_winkle." ); - // call the HWP with each fapi::Target FAPI_INVOKE_HWP( l_errl, proc_prep_master_winkle, @@ -134,6 +129,10 @@ void* call_host_activate_master( void *io_pArgs ) TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "proc_prep_master_winkle ERROR : Returning errorlog, PLID=0x%x", l_errl->plid() ); + + // capture the target data in the elog + ErrlUserDetailsTarget(l_cpu_target).addToLog( l_errl ); + break; } else @@ -190,6 +189,10 @@ void* call_host_activate_master( void *io_pArgs ) TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "proc_stop_deadman_timer ERROR : Returning errorlog, PLID=0x%x", l_errl->plid() ); + + // capture the target data in the elog + ErrlUserDetailsTarget(l_cpu_target).addToLog( l_errl ); + break; } else @@ -252,7 +255,8 @@ void* call_host_activate_slave_cores( void *io_pArgs ) TargetHandleList l_cores; getAllChiplets(l_cores, TYPE_CORE); - for(TargetHandleList::const_iterator l_core = l_cores.begin(); + for(TargetHandleList::const_iterator + l_core = l_cores.begin(); l_core != l_cores.end(); ++l_core) { @@ -317,24 +321,22 @@ void* call_host_activate_slave_cores( void *io_pArgs ) TARGETING::TargetHandleList l_procTargetList; getAllChips(l_procTargetList, TYPE_PROC); - // loop thru all the proc's - for ( TargetHandleList::iterator l_iter = l_procTargetList.begin(); - l_iter != l_procTargetList.end(); - ++l_iter ) + // loop thru all the cpus + for (TargetHandleList::const_iterator + l_proc_iter = l_procTargetList.begin(); + l_proc_iter != l_procTargetList.end(); + ++l_proc_iter) { // make a local copy of the CPU target - TARGETING::Target* l_proc_target = (*l_iter) ; + const TARGETING::Target* l_proc_target = *l_proc_iter; - // dump physical path to target - EntityPath l_path; - l_path = l_proc_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + // trace HUID + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", TARGETING::get_huid(l_proc_target)); // cast OUR type of target to a FAPI type of target. fapi::Target l_fapi_proc_target( TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> - (const_cast<TARGETING::Target*> - (l_proc_target)) ); + (const_cast<TARGETING::Target*>(l_proc_target)) ); // reset pore bar notes: // A mem_size of 0 means to ignore the image address @@ -351,6 +353,9 @@ void* call_host_activate_slave_cores( void *io_pArgs ) ); if ( l_errl ) { + // capture the target data in the elog + ErrlUserDetailsTarget(l_proc_target).addToLog( l_errl ); + /*@ * @errortype * @reasoncode ISTEP_RESET_PORE_BARS_FAILED @@ -411,16 +416,12 @@ void* call_host_ipl_complete( void *io_pArgs ) TARGETING::Target * l_masterProc = NULL; (void)TARGETING::targetService().masterProcChipTargetHandle( l_masterProc ); - const fapi::Target l_fapi_proc_target( - TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> + const fapi::Target l_fapi_proc_target( TARGET_TYPE_PROC_CHIP, ( const_cast<TARGETING::Target*>(l_masterProc) ) ); - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running proc_switch_cfsim HWP on ..."); - EntityPath l_path; - l_path = l_masterProc->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "Running proc_switch_cfsim HWP on " + "target HUID %.8X", TARGETING::get_huid(l_masterProc)); // call proc_switch_cfsim @@ -437,6 +438,10 @@ void* call_host_ipl_complete( void *io_pArgs ) TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: proc_switch_cfsim HWP returns error", l_err->reasonCode()); + + // capture the target data in the elog + ErrlUserDetailsTarget(l_masterProc).addToLog( l_err ); + break; } else diff --git a/src/usr/hwpf/hwp/dmi_training/dmi_training.C b/src/usr/hwpf/hwp/dmi_training/dmi_training.C index d1a8f9189..1bd2c4667 100644 --- a/src/usr/hwpf/hwp/dmi_training/dmi_training.C +++ b/src/usr/hwpf/hwp/dmi_training/dmi_training.C @@ -107,7 +107,8 @@ void* call_mss_getecid( void *io_pArgs ) TARGETING::TargetHandleList l_membufTargetList; getAllChips(l_membufTargetList, TYPE_MEMBUF); - for (TargetHandleList::iterator l_membuf_iter = l_membufTargetList.begin(); + for (TargetHandleList::const_iterator + l_membuf_iter = l_membufTargetList.begin(); l_membuf_iter != l_membufTargetList.end(); ++l_membuf_iter) { @@ -115,17 +116,12 @@ void* call_mss_getecid( void *io_pArgs ) TARGETING::Target* l_pCentaur = *l_membuf_iter; // Dump current run on target - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running mss_get_cen_ecid HWP on..." ); - - EntityPath l_path; - l_path = l_pCentaur->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "Running mss_get_cen_ecid HWP on " + "target HUID %.8X", TARGETING::get_huid(l_pCentaur)); // Cast to a FAPI type of target. - const fapi::Target l_fapi_centaur( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> + const fapi::Target l_fapi_centaur( TARGET_TYPE_MEMBUF_CHIP, (const_cast<TARGETING::Target*>(l_pCentaur)) ); // call the HWP with each fapi::Target @@ -141,10 +137,8 @@ void* call_mss_getecid( void *io_pArgs ) "ERROR 0x%.8X: mss_get_cen_ecid HWP returns error", l_err->reasonCode()); - ErrlUserDetailsTarget myDetails(l_pCentaur); - // capture the target data in the elog - myDetails.addToLog(l_err); + ErrlUserDetailsTarget(l_pCentaur).addToLog( l_err ); /*@ * @errortype @@ -183,8 +177,8 @@ void* call_mss_getecid( void *io_pArgs ) uint8_t l_num_func_mbas = l_mbaTargetList.size(); - for (TargetHandleList::iterator l_mba_iter = - l_mbaTargetList.begin(); + for (TargetHandleList::const_iterator + l_mba_iter = l_mbaTargetList.begin(); l_mba_iter != l_mbaTargetList.end(); ++l_mba_iter) { @@ -192,7 +186,7 @@ void* call_mss_getecid( void *io_pArgs ) TARGETING::Target* l_pMBA = *l_mba_iter; // Get the MBA chip unit position - uint8_t l_pos = l_pMBA->getAttr<ATTR_CHIP_UNIT>(); + ATTR_CHIP_UNIT_type l_pos = l_pMBA->getAttr<ATTR_CHIP_UNIT>(); // Check the DDR port status to see if this MBA should be // set to nonfunctional. @@ -272,21 +266,18 @@ void* call_dmi_scominit( void *io_pArgs ) getAllChiplets(l_mcsTargetList, TYPE_MCS); // Invoke dmi_scominit on each one - for (TargetHandleList::iterator l_mcs_iter = l_mcsTargetList.begin(); + for (TargetHandleList::const_iterator + l_mcs_iter = l_mcsTargetList.begin(); l_mcs_iter != l_mcsTargetList.end(); ++l_mcs_iter) { const TARGETING::Target* l_pTarget = *l_mcs_iter; - const fapi::Target l_fapi_target( - TARGET_TYPE_MCS_CHIPLET, - reinterpret_cast<void *> + const fapi::Target l_fapi_target( TARGET_TYPE_MCS_CHIPLET, (const_cast<TARGETING::Target*>(l_pTarget))); TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "Running dmi_scominit HWP on..."); - EntityPath l_path; - l_path = l_pTarget->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + "Running dmi_scominit HWP on " + "target HUID %.8X", TARGETING::get_huid(l_pTarget)); FAPI_INVOKE_HWP(l_errl, dmi_scominit, l_fapi_target); if (l_errl) @@ -302,7 +293,8 @@ void* call_dmi_scominit( void *io_pArgs ) } else { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : dmi_scominit HWP"); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : dmi_scominit HWP"); } } @@ -313,26 +305,25 @@ void* call_dmi_scominit( void *io_pArgs ) getAllChips(l_membufTargetList, TYPE_MEMBUF); // Invoke dmi_scominit on each one - for (TargetHandleList::iterator l_membuf_iter = l_membufTargetList.begin(); + for (TargetHandleList::const_iterator + l_membuf_iter = l_membufTargetList.begin(); l_membuf_iter != l_membufTargetList.end(); ++l_membuf_iter) { const TARGETING::Target* l_pTarget = *l_membuf_iter; - const fapi::Target l_fapi_target( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> + const fapi::Target l_fapi_target( TARGET_TYPE_MEMBUF_CHIP, (const_cast<TARGETING::Target*>(l_pTarget))); - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "Running dmi_scominit HWP on..."); - EntityPath l_path; - l_path = l_pTarget->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "Running dmi_scominit HWP on " + "target HUID %.8X", TARGETING::get_huid(l_pTarget)); FAPI_INVOKE_HWP(l_errl, dmi_scominit, l_fapi_target); if (l_errl) { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : dmi_scominit HWP returns error", - l_errl->reasonCode()); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X : dmi_scominit HWP returns error", + l_errl->reasonCode()); // capture the target data in the elog ErrlUserDetailsTarget(l_pTarget).addToLog( l_errl ); @@ -341,7 +332,8 @@ void* call_dmi_scominit( void *io_pArgs ) } else { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : dmi_scominit HWP"); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : dmi_scominit HWP"); } } } @@ -393,23 +385,19 @@ void* call_dmi_erepair( void *io_pArgs ) TargetHandleList l_mcsTargetList; TargetHandleList l_memTargetList; - TargetHandleList::iterator l_mcs_iter; TargetHandleList::iterator l_mem_iter; - TargetHandle_t l_mcs_target; - TargetHandle_t l_mem_target; - uint8_t l_mcsNum = 0; - uint8_t l_memNum = 0; // find all MCS chiplets of all procs getAllChiplets(l_mcsTargetList, TYPE_MCS); - for (l_mcs_iter = l_mcsTargetList.begin(); + for (TargetHandleList::const_iterator + l_mcs_iter = l_mcsTargetList.begin(); l_mcs_iter != l_mcsTargetList.end(); ++l_mcs_iter) { // make a local copy of the MCS target - l_mcs_target = *l_mcs_iter; - l_mcsNum = l_mcs_target->getAttr<ATTR_CHIP_UNIT>(); + TARGETING::Target *l_mcs_target = *l_mcs_iter; + ATTR_CHIP_UNIT_type l_mcsNum = l_mcs_target->getAttr<ATTR_CHIP_UNIT>(); // find all the Centaurs that are associated with this MCS getAffinityChips(l_memTargetList, l_mcs_target, TYPE_MEMBUF); @@ -423,8 +411,8 @@ void* call_dmi_erepair( void *io_pArgs ) l_mem_iter = l_memTargetList.begin(); // make a local copy of the MEMBUF target - l_mem_target = *l_mem_iter; - l_memNum = l_mem_target->getAttr<ATTR_POSITION>(); + TARGETING::Target *l_mem_target = *l_mem_iter; + ATTR_POSITION_type l_memNum = l_mem_target->getAttr<ATTR_POSITION>(); // struct containing custom parameters that is fed to HWP // call the HWP with each target(if parallel, spin off a task) @@ -446,10 +434,8 @@ void* call_dmi_erepair( void *io_pArgs ) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "Unable to" " retrieve DMI eRepair data from the VPD"); - - EntityPath l_path; - l_path = l_mem_target->getAttr<ATTR_AFFINITY_PATH>(); // TODO: verify this during testing - l_path.dump(); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", TARGETING::get_huid(l_mem_target)); // Convert fapi returnCode to Error handle l_errPtr = fapiRcToErrl(l_rc); @@ -503,6 +489,10 @@ void* call_dmi_erepair( void *io_pArgs ) l_errPtr->reasonCode(), l_mcsNum, l_memNum); + + // capture the target data in the elog + ErrlUserDetailsTarget(l_mcs_target).addToLog(l_errPtr); + /*@ * @errortype * @reasoncode ISTEP_DMI_DRIVE_RESTORE_FAILED @@ -549,6 +539,9 @@ void* call_dmi_erepair( void *io_pArgs ) l_mcsNum, l_memNum); + // capture the target data in the elog + ErrlUserDetailsTarget(l_mem_target).addToLog(l_errPtr); + /*@ * @errortype * @reasoncode ISTEP_DMI_RECEIVE_RESTORE_FAILED @@ -604,17 +597,15 @@ void* call_dmi_io_dccal( void *io_pArgs ) // the MCS and MEMBUF pair in one call). Even though they don't have to be // in order, we should keep the pair concept here in case we need to send // in a pair in the future again. - for (TargetPairs_t::iterator l_itr = l_dmi_io_dccal_targets.begin(); - l_itr != l_dmi_io_dccal_targets.end(); ++l_itr) + for (TargetPairs_t::const_iterator + l_itr = l_dmi_io_dccal_targets.begin(); + l_itr != l_dmi_io_dccal_targets.end(); + ++l_itr) { - const fapi::Target l_fapi_mcs_target( - TARGET_TYPE_MCS_CHIPLET, - reinterpret_cast<void *> + const fapi::Target l_fapi_mcs_target( TARGET_TYPE_MCS_CHIPLET, (const_cast<TARGETING::Target*>(l_itr->first))); - const fapi::Target l_fapi_membuf_target( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> + const fapi::Target l_fapi_membuf_target( TARGET_TYPE_MEMBUF_CHIP, (const_cast<TARGETING::Target*>(l_itr->second))); TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, @@ -622,12 +613,6 @@ void* call_dmi_io_dccal( void *io_pArgs ) TARGETING::get_huid(l_itr->first), TARGETING::get_huid(l_itr->second)); - EntityPath l_path; - l_path = l_itr->first->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); - l_path = l_itr->second->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); - // Call on the MCS FAPI_INVOKE_HWP(l_errl, dmi_io_dccal, l_fapi_mcs_target); @@ -730,7 +715,8 @@ void* call_dmi_io_run_training( void *io_pArgs ) ISTEP_ERROR::IStepError l_StepError; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_io_run_training entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_dmi_io_run_training entry" ); TargetPairs_t l_dmi_io_dccal_targets; get_dmi_io_targets(l_dmi_io_dccal_targets); @@ -738,18 +724,15 @@ void* call_dmi_io_run_training( void *io_pArgs ) TARGETING::TargetHandleList l_cpuTargetList; getAllChips(l_cpuTargetList, TYPE_PROC); - TargetPairs_t::iterator l_itr; - for (l_itr = l_dmi_io_dccal_targets.begin(); - (!l_err) && (l_itr != l_dmi_io_dccal_targets.end()); ++l_itr) + for (TargetPairs_t::const_iterator + l_itr = l_dmi_io_dccal_targets.begin(); + (!l_err) && (l_itr != l_dmi_io_dccal_targets.end()); + ++l_itr) { - const fapi::Target l_fapi_master_target( - TARGET_TYPE_MCS_CHIPLET, - reinterpret_cast<void *> + const fapi::Target l_fapi_master_target( TARGET_TYPE_MCS_CHIPLET, (const_cast<TARGETING::Target*>(l_itr->first))); - const fapi::Target l_fapi_slave_target( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> + const fapi::Target l_fapi_slave_target( TARGET_TYPE_MEMBUF_CHIP, (const_cast<TARGETING::Target*>(l_itr->second))); TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, @@ -757,12 +740,6 @@ void* call_dmi_io_run_training( void *io_pArgs ) TARGETING::get_huid(l_itr->first), TARGETING::get_huid(l_itr->second)); - EntityPath l_path; - l_path = l_itr->first->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); - l_path = l_itr->second->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); - FAPI_INVOKE_HWP(l_err, dmi_io_run_training, l_fapi_master_target, l_fapi_slave_target); @@ -796,7 +773,8 @@ void* call_dmi_io_run_training( void *io_pArgs ) } // end target pair list - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_io_run_training exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_dmi_io_run_training exit" ); return l_StepError.getErrorHandle(); } @@ -827,29 +805,32 @@ void* call_proc_cen_framelock( void *io_pArgs ) IStepError l_StepError; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_cen_framework entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_cen_framework entry" ); // get the mcs chiplets TARGETING::TargetHandleList l_mcsTargetList; getAllChiplets(l_mcsTargetList, TYPE_MCS); - for (TargetHandleList::iterator l_mcs_iter = l_mcsTargetList.begin(); + for (TargetHandleList::const_iterator + l_mcs_iter = l_mcsTargetList.begin(); l_mcs_iter != l_mcsTargetList.end(); ++l_mcs_iter) { // make a local copy of the MCS target - const TARGETING::Target* l_mcs_target = *l_mcs_iter; + TARGETING::Target* l_mcs_target = *l_mcs_iter; // find all the Centaurs that are associated with this MCS TARGETING::TargetHandleList l_memTargetList; getAffinityChips(l_memTargetList, l_mcs_target, TYPE_MEMBUF); - for (TargetHandleList::iterator l_mem_iter = l_memTargetList.begin(); + for (TargetHandleList::const_iterator + l_mem_iter = l_memTargetList.begin(); l_mem_iter != l_memTargetList.end(); ++l_mem_iter) { // make a local copy of the MEMBUF target - const TARGETING::Target* l_mem_target = *l_mem_iter; + TARGETING::Target* l_mem_target = *l_mem_iter; uint8_t l_memNum = l_mem_target->getAttr<ATTR_POSITION>(); @@ -859,22 +840,15 @@ void* call_proc_cen_framelock( void *io_pArgs ) l_args.frtl_manual_pu = 0; l_args.frtl_manual_mem = 0; - fapi::Target l_fapiMcsTarget( - TARGET_TYPE_MCS_CHIPLET, - reinterpret_cast<void *> - ( const_cast<TARGETING::Target*>(l_mcs_target) ) - ); - fapi::Target l_fapiMemTarget( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> - (const_cast<TARGETING::Target*>(l_mem_target)) - ); - - EntityPath l_path; - l_path = l_mcs_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); - l_path = l_mem_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + fapi::Target l_fapiMcsTarget( TARGET_TYPE_MCS_CHIPLET, + (const_cast<TARGETING::Target*>(l_mcs_target))); + fapi::Target l_fapiMemTarget( TARGET_TYPE_MEMBUF_CHIP, + (const_cast<TARGETING::Target*>(l_mem_target))); + + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "mcs HUID %.8X mem HUID %.8X", + TARGETING::get_huid(l_mcs_target), + TARGETING::get_huid(l_mem_target)); FAPI_INVOKE_HWP( l_err, proc_cen_framelock, @@ -973,20 +947,18 @@ void* call_cen_set_inband_addr( void *io_pArgs ) TARGETING::TargetHandleList l_mcsTargetList; getAllChiplets(l_mcsTargetList, TYPE_MCS); - for (TargetHandleList::iterator l_mcs_iter = l_mcsTargetList.begin(); + for (TargetHandleList::const_iterator + l_mcs_iter = l_mcsTargetList.begin(); l_mcs_iter != l_mcsTargetList.end(); ++l_mcs_iter) { - const TARGETING::Target* l_pTarget = *l_mcs_iter; + TARGETING::Target* l_pTarget = *l_mcs_iter; const fapi::Target l_fapi_target( TARGET_TYPE_MCS_CHIPLET, - reinterpret_cast<void *> (const_cast<TARGETING::Target*>(l_pTarget))); TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "Running cen_set_inband_addr HWP on..."); - EntityPath l_path; - l_path = l_pTarget->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + "Running cen_set_inband_addr HWP on " + "target HUID %.8X", TARGETING::get_huid(l_pTarget)); errlHndl_t l_err = NULL; FAPI_INVOKE_HWP(l_err, proc_cen_set_inband_addr, l_fapi_target); @@ -1044,8 +1016,10 @@ void get_dmi_io_targets(TargetPairs_t& o_dmi_io_targets) TARGETING::TargetHandleList l_cpuTargetList; getAllChips(l_cpuTargetList, TYPE_PROC); - for ( TargetHandleList::iterator l_iter = l_cpuTargetList.begin(); - l_iter != l_cpuTargetList.end(); ++l_iter ) + for ( TargetHandleList::const_iterator + l_iter = l_cpuTargetList.begin(); + l_iter != l_cpuTargetList.end(); + ++l_iter ) { // make a local copy of the CPU target const TARGETING::Target* l_cpu_target = *l_iter; @@ -1054,8 +1028,10 @@ void get_dmi_io_targets(TargetPairs_t& o_dmi_io_targets) TARGETING::TargetHandleList l_mcsTargetList; getChildChiplets( l_mcsTargetList, l_cpu_target, TYPE_MCS ); - for ( TargetHandleList::iterator l_iterMCS = l_mcsTargetList.begin(); - l_iterMCS != l_mcsTargetList.end(); ++l_iterMCS ) + for ( TargetHandleList::const_iterator + l_iterMCS = l_mcsTargetList.begin(); + l_iterMCS != l_mcsTargetList.end(); + ++l_iterMCS ) { // make a local copy of the MCS target const TARGETING::Target* l_mcs_target = *l_iterMCS; @@ -1064,8 +1040,10 @@ void get_dmi_io_targets(TargetPairs_t& o_dmi_io_targets) TARGETING::TargetHandleList l_memTargetList; getAffinityChips(l_memTargetList, l_mcs_target, TYPE_MEMBUF); - for ( TargetHandleList::iterator l_iterMemBuf = l_memTargetList.begin(); - l_iterMemBuf != l_memTargetList.end(); ++l_iterMemBuf ) + for ( TargetHandleList::const_iterator + l_iterMemBuf = l_memTargetList.begin(); + l_iterMemBuf != l_memTargetList.end(); + ++l_iterMemBuf ) { // make a local copy of the MEMBUF target const TARGETING::Target* l_mem_target = *l_iterMemBuf; diff --git a/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C b/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C index 2d57c5100..266141662 100644 --- a/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C +++ b/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C @@ -26,10 +26,6 @@ * Support file for IStep: dram_initialization * Dram Initialization * - * ***************************************************************** - * THIS FILE WAS GENERATED ON 2012-04-11:1608 - * ***************************************************************** - * * HWP_IGNORE_VERSION_CHECK * */ @@ -108,17 +104,13 @@ void* call_host_startprd_dram( void *io_pArgs ) // customize any other inputs // set up loops to go through all targets (if parallel, spin off a task) - // dump physical path to targets - EntityPath l_path; - l_path = l_@targetN_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + // write HUID of target + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", TARGETING::get_huid(l_@targetN_target)); // cast OUR type of target to a FAPI type of target. - const fapi::Target l_fapi_@targetN_target( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> - (const_cast<TARGETING:: - Target*>(l_@targetN_target)) ); + const fapi::Target l_fapi_@targetN_target( TARGET_TYPE_MEMBUF_CHIP, + (const_cast<TARGETING::Target*>(l_@targetN_target)) ); // call the HWP with each fapi::Target FAPI_INVOKE_HWP( l_errl, host_startPRD_dram, _args_...); @@ -285,15 +277,12 @@ void* call_mss_scrub( void *io_pArgs ) // customize any other inputs // set up loops to go through all targets (if parallel, spin off a task) - // dump physical path to targets - EntityPath l_path; - l_path = l_@targetN_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + // write HUID of target + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", TARGETING::get_huid(l)); // cast OUR type of target to a FAPI type of target. - const fapi::Target l_fapi_@targetN_target( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> + const fapi::Target l_fapi_@targetN_target( TARGET_TYPE_MEMBUF_CHIP, (const_cast<TARGETING::Target*>(l_@targetN_target)) ); // call the HWP with each fapi::Target @@ -340,22 +329,20 @@ void* call_mss_thermal_init( void *io_pArgs ) // -------------------------------------------------------------------- // run mss_thermal_init on all Centaurs // -------------------------------------------------------------------- - for (TargetHandleList::iterator l_iter = l_memBufTargetList.begin(); + for (TargetHandleList::const_iterator + l_iter = l_memBufTargetList.begin(); l_iter != l_memBufTargetList.end(); ++l_iter) { // make a local copy of the target for ease of use const TARGETING::Target* l_pCentaur = *l_iter; - // dump physical path to targets - EntityPath l_path; - l_path = l_pCentaur->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + // write HUID of target + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", TARGETING::get_huid(l_pCentaur)); // cast OUR type of target to a FAPI type of target. - const fapi::Target l_fapi_pCentaur( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> + const fapi::Target l_fapi_pCentaur( TARGET_TYPE_MEMBUF_CHIP, (const_cast<TARGETING::Target*>(l_pCentaur)) ); // call the HWP with each fapi::Target @@ -367,10 +354,8 @@ void* call_mss_thermal_init( void *io_pArgs ) "ERROR 0x%.8X: mss_thermal_init HWP returns error", l_errl->reasonCode()); - ErrlUserDetailsTarget myDetails(l_pCentaur); - // capture the target data in the elog - myDetails.addToLog( l_errl ); + ErrlUserDetailsTarget(l_pCentaur).addToLog( l_errl ); /*@ * @errortype @@ -433,24 +418,22 @@ void* call_proc_setup_bars( void *io_pArgs ) // -------------------------------------------------------------------- // run mss_setup_bars on all CPUs. // -------------------------------------------------------------------- - for ( size_t i = 0; i < l_cpuTargetList.size(); i++ ) + for (TargetHandleList::const_iterator + l_cpu_iter = l_cpuTargetList.begin(); + l_cpu_iter != l_cpuTargetList.end(); + ++l_cpu_iter) { // make a local copy of the target for ease of use - const TARGETING::Target* l_pCpuTarget = l_cpuTargetList[i]; + const TARGETING::Target* l_pCpuTarget = *l_cpu_iter; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "mss_setup_bars: proc %d", i ); - // dump physical path to targets - EntityPath l_path; - l_path = l_pCpuTarget->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + // write HUID of target + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "mss_setup_bars: proc " + "target HUID %.8X", TARGETING::get_huid(l_pCpuTarget)); // cast OUR type of target to a FAPI type of target. - const fapi::Target l_fapi_pCpuTarget( - TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> - (const_cast<TARGETING::Target*> - (l_pCpuTarget)) ); + const fapi::Target l_fapi_pCpuTarget( TARGET_TYPE_PROC_CHIP, + (const_cast<TARGETING::Target*> (l_pCpuTarget)) ); // call the HWP with each fapi::Target FAPI_INVOKE_HWP( l_errl, @@ -459,6 +442,9 @@ void* call_proc_setup_bars( void *io_pArgs ) if ( l_errl ) { + // capture the target data in the elog + ErrlUserDetailsTarget(l_pCpuTarget).addToLog( l_errl ); + /*@ * @errortype * @reasoncode ISTEP_DRAM_INITIALIZATION_FAILED @@ -492,24 +478,26 @@ void* call_proc_setup_bars( void *io_pArgs ) if ( l_stepError.isNull() ) { - // ----------------------------------------------------------------------- + //---------------------------------------------------------------------- // run proc_setup_bars on all CPUs - // ----------------------------------------------------------------------- + //---------------------------------------------------------------------- std::vector<proc_setup_bars_proc_chip> l_proc_chips; TargetPairs_t l_abusLinks; l_errl = PbusLinkSvc::getTheInstance().getPbusConnections( l_abusLinks, TYPE_ABUS, false ); - for ( size_t i = 0; i < l_cpuTargetList.size() && !l_errl; i++ ) + for (TargetHandleList::const_iterator + l_cpu_iter = l_cpuTargetList.begin(); + l_cpu_iter != l_cpuTargetList.end() && !l_errl; + ++l_cpu_iter) { // make a local copy of the target for ease of use - const TARGETING::Target* l_pCpuTarget = l_cpuTargetList[i]; + const TARGETING::Target* l_pCpuTarget = *l_cpu_iter; // cast OUR type of target to a FAPI type of target. const fapi::Target l_fapi_pCpuTarget( TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> (const_cast<TARGETING::Target*> - (l_pCpuTarget)) ); + (const_cast<TARGETING::Target*> (l_pCpuTarget)) ); proc_setup_bars_proc_chip l_proc_chip ; l_proc_chip.this_chip = l_fapi_pCpuTarget; @@ -519,9 +507,12 @@ void* call_proc_setup_bars( void *io_pArgs ) TARGETING::TargetHandleList l_abuses; getChildChiplets( l_abuses, l_pCpuTarget, TYPE_ABUS ); - for (size_t j = 0; j < l_abuses.size(); j++) + for (TargetHandleList::const_iterator + l_abus_iter = l_abuses.begin(); + l_abus_iter != l_abuses.end(); + ++l_abus_iter) { - TARGETING::Target * l_target = l_abuses[j]; + const TARGETING::Target* l_target = *l_abus_iter; uint8_t l_srcID = l_target->getAttr<ATTR_CHIP_UNIT>(); TargetPairs_t::iterator l_itr = l_abusLinks.find(l_target); if ( l_itr == l_abusLinks.end() ) @@ -618,25 +609,29 @@ void* call_proc_pcie_config( void *io_pArgs ) TARGETING::TargetHandleList l_procTargetList; getAllChips(l_procTargetList, TYPE_PROC ); - for ( TargetHandleList::iterator l_iter = l_procTargetList.begin(); - l_iter != l_procTargetList.end(); ++l_iter ) + for ( TargetHandleList::const_iterator + l_iter = l_procTargetList.begin(); + l_iter != l_procTargetList.end(); + ++l_iter ) { const TARGETING::Target* l_pTarget = *l_iter; - // dump physical path to targets - EntityPath l_path; - l_path = l_pTarget->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + // write HUID of target + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", TARGETING::get_huid(l_pTarget)); // build a FAPI type of target. const fapi::Target l_fapi_pTarget( TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void*>(const_cast<TARGETING::Target*>(l_pTarget)) ); + (const_cast<TARGETING::Target*>(l_pTarget)) ); // call the HWP with each fapi::Target FAPI_INVOKE_HWP( l_errl, proc_pcie_config, l_fapi_pTarget ); if ( l_errl ) { + // capture the target data in the elog + ErrlUserDetailsTarget(l_pTarget).addToLog( l_errl ); + /*@ * @errortype * @reasoncode ISTEP_DRAM_INITIALIZATION_FAILED @@ -653,9 +648,6 @@ void* call_proc_pcie_config( void *io_pArgs ) ISTEP_PROC_PCIE_CONFIG, l_errl ); - // capture the target data in the elog - ErrlUserDetailsTarget(l_pTarget).addToLog( l_errl ); - errlCommit( l_errl, HWPF_COMP_ID ); TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, @@ -793,23 +785,21 @@ void* call_host_mpipl_service( void *io_pArgs ) // --------------------------------------------------------------- // run proc_mpipl_chip_cleanup.C on all proc chips // --------------------------------------------------------------- - for (TargetHandleList::iterator l_iter = l_procTargetList.begin(); - l_iter != l_procTargetList.end(); ++l_iter) + for (TargetHandleList::const_iterator + l_iter = l_procTargetList.begin(); + l_iter != l_procTargetList.end(); + ++l_iter) { // make a local copy of the target for ease of use const TARGETING::Target* l_pProcTarget = *l_iter; - // dump physical path to targets - EntityPath l_path; - l_path = l_pProcTarget->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + // write HUID of target + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", TARGETING::get_huid(l_pProcTarget)); // cast OUR type of target to a FAPI type of target. - const fapi::Target l_fapi_pProcTarget( - TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> - (const_cast<TARGETING::Target*> - (l_pProcTarget)) ); + const fapi::Target l_fapi_pProcTarget( TARGET_TYPE_PROC_CHIP, + (const_cast<TARGETING::Target*> (l_pProcTarget)) ); // call the HWP with each fapi::Target FAPI_INVOKE_HWP(l_err, proc_mpipl_chip_cleanup, diff --git a/src/usr/hwpf/hwp/dram_training/dram_training.C b/src/usr/hwpf/hwp/dram_training/dram_training.C index 454e19c16..ed3167def 100644 --- a/src/usr/hwpf/hwp/dram_training/dram_training.C +++ b/src/usr/hwpf/hwp/dram_training/dram_training.C @@ -26,7 +26,6 @@ * Support file for IStep: dram_training * Step 13 DRAM Training * - * * HWP_IGNORE_VERSION_CHECK * */ @@ -189,21 +188,21 @@ void* call_mem_pll_setup( void *io_pArgs ) TARGETING::TargetHandleList l_membufTargetList; getAllChips(l_membufTargetList, TYPE_MEMBUF); - for ( size_t i = 0; i < l_membufTargetList.size(); i++ ) + for (TargetHandleList::const_iterator + l_membuf_iter = l_membufTargetList.begin(); + l_membuf_iter != l_membufTargetList.end(); + ++l_membuf_iter) { - const TARGETING::Target* l_pCentaur = l_membufTargetList[i]; - // Dump current run on target + // make a local copy of the target for ease of use + const TARGETING::Target* l_pCentaur = *l_membuf_iter; + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running mem_pll_setup HWP on..." ); - EntityPath l_path; - l_path = l_pCentaur->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + "Running mem_pll_setup HWP on " + "target HUID %.8X", TARGETING::get_huid(l_pCentaur)); // Cast to a FAPI type of target. - const fapi::Target l_fapi_centaur( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> - (const_cast<TARGETING::Target*>(l_pCentaur)) ); + const fapi::Target l_fapi_centaur( TARGET_TYPE_MEMBUF_CHIP, + (const_cast<TARGETING::Target*>(l_pCentaur))); // call cen_mem_pll_initf to do pll init FAPI_INVOKE_HWP(l_err, cen_mem_pll_initf, l_fapi_centaur); @@ -214,10 +213,8 @@ void* call_mem_pll_setup( void *io_pArgs ) "ERROR 0x%.8X: mem_pll_initf HWP returns error", l_err->reasonCode()); - ErrlUserDetailsTarget myDetails(l_pCentaur); - // capture the target data in the elog - myDetails.addToLog(l_err ); + ErrlUserDetailsTarget(l_pCentaur).addToLog(l_err ); break; } @@ -236,10 +233,8 @@ void* call_mem_pll_setup( void *io_pArgs ) "ERROR 0x%.8X: mem_pll_setup HWP returns error", l_err->reasonCode()); - ErrlUserDetailsTarget myDetails(l_pCentaur); - // capture the target data in the elog - myDetails.addToLog(l_err ); + ErrlUserDetailsTarget(l_pCentaur).addToLog(l_err); break; } @@ -290,22 +285,21 @@ void* call_mem_startclocks( void *io_pArgs ) TARGETING::TargetHandleList l_membufTargetList; getAllChips(l_membufTargetList, TYPE_MEMBUF); - for ( size_t i = 0; i < l_membufTargetList.size(); i++ ) + for (TargetHandleList::const_iterator + l_membuf_iter = l_membufTargetList.begin(); + l_membuf_iter != l_membufTargetList.end(); + ++l_membuf_iter) { // make a local copy of the target for ease of use - const TARGETING::Target* l_pCentaur = l_membufTargetList[i]; + const TARGETING::Target* l_pCentaur = *l_membuf_iter; // Dump current run on target TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running cen_mem_startclocks HWP on..." ); - EntityPath l_path; - l_path = l_pCentaur->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + "Running cen_mem_startclocks HWP on " + "target HUID %.8X", TARGETING::get_huid(l_pCentaur)); // Cast to a FAPI type of target. - const fapi::Target l_fapi_centaur( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> + const fapi::Target l_fapi_centaur( TARGET_TYPE_MEMBUF_CHIP, (const_cast<TARGETING::Target*>(l_pCentaur)) ); // call the HWP with each fapi::Target @@ -317,10 +311,8 @@ void* call_mem_startclocks( void *io_pArgs ) "ERROR 0x%.8X: cen_mem_startclocks HWP returns error", l_err->reasonCode()); - ErrlUserDetailsTarget myDetails(l_pCentaur); - // capture the target data in the elog - myDetails.addToLog(l_err ); + ErrlUserDetailsTarget(l_pCentaur).addToLog(l_err); /*@ * @errortype @@ -339,7 +331,6 @@ void* call_mem_startclocks( void *io_pArgs ) errlCommit( l_err, HWPF_COMP_ID ); - break; } else @@ -361,7 +352,8 @@ void* call_mem_startclocks( void *io_pArgs ) // void* call_host_enable_vddr( void *io_pArgs ) { - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_enable_vddr entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_enable_vddr entry" ); errlHndl_t l_err = NULL; @@ -375,8 +367,8 @@ void* call_host_enable_vddr( void *io_pArgs ) if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%.8X: call_host_enable_vddr to sendMsg returns error", - l_err->reasonCode()); + "ERROR 0x%.8X: call_host_enable_vddr to sendMsg returns error", + l_err->reasonCode()); /*@ * @errortype * @reasoncode ISTEP_DRAM_TRAINING_FAILED @@ -438,23 +430,21 @@ void* call_mss_scominit( void *io_pArgs ) TARGETING::TargetHandleList l_membufTargetList; getAllChips(l_membufTargetList, TYPE_MEMBUF); - for ( size_t i = 0; i < l_membufTargetList.size(); i++ ) + for (TargetHandleList::const_iterator + l_membuf_iter = l_membufTargetList.begin(); + l_membuf_iter != l_membufTargetList.end(); + ++l_membuf_iter) { // make a local copy of the target for ease of use - const TARGETING::Target* l_pCentaur = l_membufTargetList[i]; + const TARGETING::Target* l_pCentaur = *l_membuf_iter; // Dump current run on target TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running mss_scominit HWP on..." ); - - EntityPath l_path; - l_path = l_pCentaur->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + "Running mss_scominit HWP on " + "target HUID %.8X", TARGETING::get_huid(l_pCentaur)); // Cast to a FAPI type of target. - const fapi::Target l_fapi_centaur( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> + const fapi::Target l_fapi_centaur( TARGET_TYPE_MEMBUF_CHIP, (const_cast<TARGETING::Target*>(l_pCentaur)) ); // call the HWP with each fapi::Target @@ -465,6 +455,10 @@ void* call_mss_scominit( void *io_pArgs ) TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: mss_scominit HWP returns error", l_err->reasonCode()); + + // capture the target data in the elog + ErrlUserDetailsTarget(l_pCentaur).addToLog(l_err); + /*@ * @errortype * @reasoncode ISTEP_DRAM_TRAINING_FAILED @@ -514,43 +508,37 @@ void* call_mss_ddr_phy_reset( void *io_pArgs ) getAllChiplets(l_mbaTargetList, TYPE_MBA); // Limit the number of MBAs to run in VPO environment to save time. - uint8_t l_mbaLimit = UNLIMITED_RUN; - if (TARGETING::is_vpo() ) + uint8_t l_mbaLimit = l_mbaTargetList.size(); + if (TARGETING::is_vpo() && (VPO_NUM_OF_MBAS_TO_RUN < l_mbaLimit)) { - l_mbaLimit = VPO_NUM_OF_MBAS_TO_RUN; + l_mbaLimit = VPO_NUM_OF_MBAS_TO_RUN; } - for ( uint8_t l_mbaNum=0 ; - (l_mbaNum < l_mbaLimit) && (l_mbaNum < l_mbaTargetList.size()) ; - l_mbaNum++ ) + for ( uint8_t l_mbaNum=0; l_mbaNum < l_mbaLimit; l_mbaNum++ ) { // make a local copy of the target for ease of use const TARGETING::Target* l_mba_target = l_mbaTargetList[l_mbaNum]; // Dump current run on target - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Running call_mss_ddr_phy_reset HWP on..." ); - EntityPath l_path; - l_path = l_mba_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running call_mss_ddr_phy_reset HWP on " + "target HUID %.8X", TARGETING::get_huid(l_mba_target)); // Cast to a FAPI type of target. - const fapi::Target l_fapi_mba_target( - TARGET_TYPE_MBA_CHIPLET, - reinterpret_cast<void *> - (const_cast<TARGETING::Target*>(l_mba_target)) ); + const fapi::Target l_fapi_mba_target( TARGET_TYPE_MBA_CHIPLET, + (const_cast<TARGETING::Target*>(l_mba_target)) ); // call the HWP with each fapi::Target FAPI_INVOKE_HWP(l_err, mss_ddr_phy_reset, l_fapi_mba_target); if (l_err) { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: mss_ddr_phy_reset HWP returns error", + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X: mss_ddr_phy_reset HWP returns error", l_err->reasonCode()); - ErrlUserDetailsTarget myDetails(l_mba_target); - // capture the target data in the elog - myDetails.addToLog(l_err ); + ErrlUserDetailsTarget(l_mba_target).addToLog( l_err ); /*@ * @errortype @@ -573,11 +561,13 @@ void* call_mss_ddr_phy_reset( void *io_pArgs ) } else { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : call_mss_ddr_phy_reset HWP( )" ); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : call_mss_ddr_phy_reset HWP( )" ); } } // end l_mbaNum loop - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_ddr_phy_reset exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_mss_ddr_phy_reset exit" ); return l_stepError.getErrorHandle(); } @@ -599,29 +589,24 @@ void* call_mss_draminit( void *io_pArgs ) getAllChiplets(l_mbaTargetList, TYPE_MBA); // Limit the number of MBAs to run in VPO environment to save time. - uint8_t l_mbaLimit = UNLIMITED_RUN; - if (TARGETING::is_vpo() ) + uint8_t l_mbaLimit = l_mbaTargetList.size(); + if (TARGETING::is_vpo() && (VPO_NUM_OF_MBAS_TO_RUN < l_mbaLimit)) { - l_mbaLimit = VPO_NUM_OF_MBAS_TO_RUN; + l_mbaLimit = VPO_NUM_OF_MBAS_TO_RUN; } - for ( uint8_t l_mbaNum=0 ; - (l_mbaNum < l_mbaLimit) && (l_mbaNum < l_mbaTargetList.size()); - l_mbaNum++ ) + for ( uint8_t l_mbaNum=0; l_mbaNum < l_mbaLimit; l_mbaNum++ ) { // Make a local copy of the target for ease of use const TARGETING::Target* l_mba_target = l_mbaTargetList[l_mbaNum]; // Dump current run on target - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Running mss_draminit HWP on..."); - EntityPath l_path; - l_path = l_mba_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running mss_draminit HWP on " + "target HUID %.8X", TARGETING::get_huid(l_mba_target)); // Cast to a FAPI type of target. - const fapi::Target l_fapi_mba_target( - TARGET_TYPE_MBA_CHIPLET, - reinterpret_cast<void *> + const fapi::Target l_fapi_mba_target( TARGET_TYPE_MBA_CHIPLET, (const_cast<TARGETING::Target*>(l_mba_target)) ); // call the HWP with each fapi::Target @@ -629,13 +614,12 @@ void* call_mss_draminit( void *io_pArgs ) if (l_err) { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : mss_draminit HWP returns error", + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X : mss_draminit HWP returns error", l_err->reasonCode()); - ErrlUserDetailsTarget myDetails(l_mba_target); - // capture the target data in the elog - myDetails.addToLog(l_err ); + ErrlUserDetailsTarget(l_mba_target).addToLog(l_err); /*@ * @@ -659,7 +643,8 @@ void* call_mss_draminit( void *io_pArgs ) } else { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : mss_draminit HWP( )" ); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : mss_draminit HWP( )" ); } } // endfor mba's @@ -686,30 +671,25 @@ void* call_mss_draminit_training( void *io_pArgs ) getAllChiplets(l_mbaTargetList, TYPE_MBA); // Limit the number of MBAs to run in VPO environment to save time. - uint8_t l_mbaLimit = UNLIMITED_RUN; - if (TARGETING::is_vpo() ) + uint8_t l_mbaLimit = l_mbaTargetList.size(); + if (TARGETING::is_vpo() && (VPO_NUM_OF_MBAS_TO_RUN < l_mbaLimit)) { - l_mbaLimit = VPO_NUM_OF_MBAS_TO_RUN; + l_mbaLimit = VPO_NUM_OF_MBAS_TO_RUN; } - for ( uint8_t l_mbaNum=0 ; - (l_mbaNum < l_mbaLimit) && (l_mbaNum < l_mbaTargetList.size()); - l_mbaNum++ ) + for ( uint8_t l_mbaNum=0; l_mbaNum < l_mbaLimit; l_mbaNum++ ) { // make a local copy of the target for ease of use const TARGETING::Target* l_mba_target = l_mbaTargetList[l_mbaNum]; // Dump current run on target - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Running mss_draminit_training HWP on..." ); - EntityPath l_path; - l_path = l_mba_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running mss_draminit_training HWP on " + "target HUID %.8X", TARGETING::get_huid(l_mba_target)); // Cast to a FAPI type of target. - const fapi::Target l_fapi_mba_target( - TARGET_TYPE_MBA_CHIPLET, - reinterpret_cast<void *> - (const_cast<TARGETING::Target*>(l_mba_target)) ); + const fapi::Target l_fapi_mba_target( TARGET_TYPE_MBA_CHIPLET, + (const_cast<TARGETING::Target*>(l_mba_target)) ); // call the HWP with each fapi::Target @@ -717,13 +697,12 @@ void* call_mss_draminit_training( void *io_pArgs ) if (l_err) { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : mss_draminit_training HWP returns error", + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X : mss_draminit_training HWP returns error", l_err->reasonCode()); - ErrlUserDetailsTarget myDetails(l_mba_target); - // capture the target data in the elog - myDetails.addToLog(l_err ); + ErrlUserDetailsTarget(l_mba_target).addToLog( l_err ); /*@ * @@ -747,12 +726,14 @@ void* call_mss_draminit_training( void *io_pArgs ) } else { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : mss_draminit_training HWP( )" ); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : mss_draminit_training HWP( )" ); } } - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_draminit_training exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_mss_draminit_training exit" ); return l_stepError.getErrorHandle(); } @@ -767,38 +748,33 @@ void* call_mss_draminit_trainadv( void *io_pArgs ) uint8_t l_pattern = 0; uint8_t l_test_type = 0; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_draminit_trainadv entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_mss_draminit_trainadv entry" ); // Get all MBA targets TARGETING::TargetHandleList l_mbaTargetList; getAllChiplets(l_mbaTargetList, TYPE_MBA); // Limit the number of MBAs to run in VPO environment to save time. - uint8_t l_mbaLimit = UNLIMITED_RUN; - if (TARGETING::is_vpo() ) + uint8_t l_mbaLimit = l_mbaTargetList.size(); + if (TARGETING::is_vpo() && (VPO_NUM_OF_MBAS_TO_RUN < l_mbaLimit)) { - l_mbaLimit = VPO_NUM_OF_MBAS_TO_RUN; + l_mbaLimit = VPO_NUM_OF_MBAS_TO_RUN; } - uint8_t l_mbaNum = 0; - for (TargetHandleList::iterator l_mba_iter = l_mbaTargetList.begin(); - (l_mbaNum < l_mbaLimit) && (l_mba_iter != l_mbaTargetList.end()); - ++l_mba_iter, ++l_mbaNum) + for ( uint8_t l_mbaNum=0; l_mbaNum < l_mbaLimit; l_mbaNum++ ) { // make a local copy of the target for ease of use - const TARGETING::Target* l_mba_target = *l_mba_iter; + const TARGETING::Target* l_mba_target = l_mbaTargetList[l_mbaNum]; // Dump current run on target - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Running mss_draminit_training_advanced HWP on..." ); - EntityPath l_path; - l_path = l_mba_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running mss_draminit_training_advanced HWP on " + "target HUID %.8X", TARGETING::get_huid(l_mba_target)); // Cast to a FAPI type of target. - const fapi::Target l_fapi_mba_target( - TARGET_TYPE_MBA_CHIPLET, - reinterpret_cast<void *> - (const_cast<TARGETING::Target*>(l_mba_target)) ); + const fapi::Target l_fapi_mba_target( TARGET_TYPE_MBA_CHIPLET, + (const_cast<TARGETING::Target*>(l_mba_target)) ); // call the HWP with each fapi::Target FAPI_INVOKE_HWP(l_err, mss_draminit_training_advanced, l_fapi_mba_target, @@ -810,10 +786,8 @@ void* call_mss_draminit_trainadv( void *io_pArgs ) "ERROR 0x%.8X : mss_draminit_training_advanced HWP returns error", l_err->reasonCode()); - ErrlUserDetailsTarget myDetails(l_mba_target); - // capture the target data in the elog - myDetails.addToLog(l_err ); + ErrlUserDetailsTarget(l_mba_target).addToLog( l_err ); /*@ * @@ -858,29 +832,23 @@ void* call_mss_draminit_mc( void *io_pArgs ) getAllChips(l_mBufTargetList, TYPE_MEMBUF); // Limit the number of MBAs to run in VPO environment to save time. - uint8_t l_memBufLimit = UNLIMITED_RUN; - if (TARGETING::is_vpo() ) + uint8_t l_memBufLimit = l_mBufTargetList.size(); + if (TARGETING::is_vpo() && (VPO_NUM_OF_MEMBUF_TO_RUN < l_memBufLimit)) { - l_memBufLimit = VPO_NUM_OF_MEMBUF_TO_RUN ; + l_memBufLimit = VPO_NUM_OF_MEMBUF_TO_RUN; } - for (uint8_t l_mBufNum=0 ; - (l_mBufNum < l_memBufLimit) && (l_mBufNum < l_mBufTargetList.size()); - l_mBufNum++) + for ( uint8_t l_mBufNum=0; l_mBufNum < l_memBufLimit; l_mBufNum++ ) { - const TARGETING::Target* l_membuf_target = l_mBufTargetList[l_mBufNum]; // Dump current run on target - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Running mss_draminit_mc HWP on..." ); - EntityPath l_path; - l_path = l_membuf_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running mss_draminit_mc HWP on " + "target HUID %.8X", TARGETING::get_huid(l_membuf_target)); // Cast to a fapi target - fapi::Target l_fapi_membuf_target( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> + fapi::Target l_fapi_membuf_target( TARGET_TYPE_MEMBUF_CHIP, (const_cast<TARGETING::Target*>(l_membuf_target)) ); // call the HWP with each fapi::Target @@ -888,13 +856,12 @@ void* call_mss_draminit_mc( void *io_pArgs ) if (l_err) { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : mss_draminit_mc HWP returns error", + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X : mss_draminit_mc HWP returns error", l_err->reasonCode()); - ErrlUserDetailsTarget myDetails(l_membuf_target); - // capture the target data in the elog - myDetails.addToLog(l_err ); + ErrlUserDetailsTarget(l_membuf_target).addToLog( l_err ); /*@ * @@ -919,7 +886,8 @@ void* call_mss_draminit_mc( void *io_pArgs ) } else { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : mss_draminit_mc HWP( )" ); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : mss_draminit_mc HWP( )" ); } } // End memBuf loop diff --git a/src/usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.C b/src/usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.C index dddaa60c0..ab8c96fae 100644 --- a/src/usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.C +++ b/src/usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.C @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.C $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2012 - * - * p1 - * - * Object Code Only (OCO) source materials - * Licensed Internal Code Source Materials - * IBM HostBoot Licensed Internal Code - * - * The source code for this program is not published or other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ /** * @file edi_ei_initialization.C @@ -136,7 +135,7 @@ void* call_fabric_erepair( void *io_pArgs ) errlCommit( l_errl, HWPF_COMP_ID ); } - for (TargetPairs_t::iterator l_itr = l_PbusConnections.begin(); + for (TargetPairs_t::const_iterator l_itr = l_PbusConnections.begin(); (l_StepError.isNull()) && (l_itr != l_PbusConnections.end()); ++l_itr) { @@ -319,23 +318,16 @@ void* call_fabric_io_dccal( void *io_pArgs ) l_PbusConnections, busSet[ii] ); for (l_itr = l_PbusConnections.begin(); - l_itr != l_PbusConnections.end(); ++l_itr) + l_itr != l_PbusConnections.end(); + ++l_itr) { const fapi::Target l_fapi_endp1_target( (ii ? TARGET_TYPE_XBUS_ENDPOINT : TARGET_TYPE_ABUS_ENDPOINT), - reinterpret_cast<void *> (const_cast<TARGETING::Target*>(l_itr->first))); const fapi::Target l_fapi_endp2_target( (ii ? TARGET_TYPE_XBUS_ENDPOINT : TARGET_TYPE_ABUS_ENDPOINT), - reinterpret_cast<void *> (const_cast<TARGETING::Target*>(l_itr->second))); - EntityPath l_path; - l_path = l_itr->first->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); - l_path = l_itr->second->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); - // call the HWP with each bus connection FAPI_INVOKE_HWP( l_errl, fabric_io_dccal, l_fapi_endp1_target ); @@ -345,6 +337,9 @@ void* call_fabric_io_dccal( void *io_pArgs ) TARGETING::get_huid(l_itr->first) ); if ( l_errl ) { + // capture the target data in the elog + ErrlUserDetailsTarget(l_itr->first).addToLog( l_errl ); + /*@ * @errortype * @reasoncode ISTEP_FABRIC_IO_DCCAL_ENDPOINT1_FAILED @@ -376,6 +371,9 @@ void* call_fabric_io_dccal( void *io_pArgs ) TARGETING::get_huid(l_itr->second) ); if ( l_errl ) { + // capture the target data in the elog + ErrlUserDetailsTarget(l_itr->second).addToLog( l_errl ); + /*@ * @errortype * @reasoncode ISTEP_FABRIC_IO_DCCAL_ENDPOINT2_FAILED @@ -425,15 +423,12 @@ void* call_fabric_pre_trainadv( void *io_pArgs ) // customize any other inputs // set up loops to go through all targets (if parallel, spin off a task) - // dump physical path to targets - EntityPath l_path; - l_path = l_@targetN_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + // write HUID of target + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", TARGETING::get_huid(l)); // cast OUR type of target to a FAPI type of target. - const fapi::Target l_fapi_@targetN_target( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> + const fapi::Target l_fapi_@targetN_target( TARGET_TYPE_MEMBUF_CHIP, (const_cast<TARGETING::Target*>(l_@targetN_target)) ); // call the HWP with each fapi::Target @@ -506,17 +501,15 @@ void* call_fabric_io_run_training( void *io_pArgs ) errlCommit( l_errl, HWPF_COMP_ID ); } - for (TargetPairs_t::iterator l_itr = l_PbusConnections.begin(); + for (TargetPairs_t::const_iterator l_itr = l_PbusConnections.begin(); (l_StepError.isNull()) && (l_itr != l_PbusConnections.end()); ++l_itr) { const fapi::Target l_fapi_endp1_target( (i ? TARGET_TYPE_ABUS_ENDPOINT : TARGET_TYPE_XBUS_ENDPOINT), - reinterpret_cast<void *> (const_cast<TARGETING::Target*>(l_itr->first))); const fapi::Target l_fapi_endp2_target( (i ? TARGET_TYPE_ABUS_ENDPOINT : TARGET_TYPE_XBUS_ENDPOINT), - reinterpret_cast<void *> (const_cast<TARGETING::Target*>(l_itr->second))); // call the HWP with each bus connection @@ -581,15 +574,12 @@ void* call_fabric_post_trainadv( void *io_pArgs ) // customize any other inputs // set up loops to go through all targets (if parallel, spin off a task) - // dump physical path to targets - EntityPath l_path; - l_path = l_@targetN_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + // write HUID of target + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", TARGETING::get_huid(l)); // cast OUR type of target to a FAPI type of target. - const fapi::Target l_fapi_@targetN_target( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> + const fapi::Target l_fapi_@targetN_target( TARGET_TYPE_MEMBUF_CHIP, (const_cast<TARGETING::Target*>(l_@targetN_target)) ); // call the HWP with each fapi::Target @@ -660,15 +650,12 @@ void* call_host_attnlisten_proc( void *io_pArgs ) // customize any other inputs // set up loops to go through all targets (if parallel, spin off a task) - // dump physical path to targets - EntityPath l_path; - l_path = l_@targetN_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + // write HUID of target + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", TARGETING::get_huid(l)); // cast OUR type of target to a FAPI type of target. - const fapi::Target l_fapi_@targetN_target( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> + const fapi::Target l_fapi_@targetN_target( TARGET_TYPE_MEMBUF_CHIP, (const_cast<TARGETING::Target*>(l_@targetN_target)) ); // call the HWP with each fapi::Target @@ -746,7 +733,7 @@ void* call_proc_fab_iovalid( void *io_pArgs ) std::vector<proc_fab_iovalid_proc_chip> l_smp; - for (TargetHandleList::iterator l_cpu_iter = l_cpuTargetList.begin(); + for (TargetHandleList::const_iterator l_cpu_iter = l_cpuTargetList.begin(); l_StepError.isNull() && (l_cpu_iter != l_cpuTargetList.end()); ++l_cpu_iter) { @@ -767,7 +754,7 @@ void* call_proc_fab_iovalid( void *io_pArgs ) TARGETING::TargetHandleList l_abuses; getChildChiplets( l_abuses, l_pTarget, TYPE_ABUS ); - for (TargetHandleList::iterator l_abus_iter = l_abuses.begin(); + for (TargetHandleList::const_iterator l_abus_iter = l_abuses.begin(); l_abus_iter != l_abuses.end(); ++l_abus_iter) { @@ -790,7 +777,7 @@ void* call_proc_fab_iovalid( void *io_pArgs ) TARGETING::TargetHandleList l_xbuses; getChildChiplets( l_xbuses, l_pTarget, TYPE_XBUS ); - for (TargetHandleList::iterator l_xbus_iter = l_xbuses.begin(); + for (TargetHandleList::const_iterator l_xbus_iter = l_xbuses.begin(); l_xbus_iter != l_xbuses.end(); ++l_xbus_iter) { @@ -862,6 +849,9 @@ void* call_proc_fab_iovalid( void *io_pArgs ) l_errl = INTR::enablePsiIntr(l_proc_target); if(l_errl) { + // capture the target data in the elog + ErrlUserDetailsTarget(l_proc_target).addToLog( l_errl ); + break; } diff --git a/src/usr/hwpf/hwp/establish_system_smp/establish_system_smp.C b/src/usr/hwpf/hwp/establish_system_smp/establish_system_smp.C index c46703cd1..1ea2f46e1 100644 --- a/src/usr/hwpf/hwp/establish_system_smp/establish_system_smp.C +++ b/src/usr/hwpf/hwp/establish_system_smp/establish_system_smp.C @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/usr/hwpf/hwp/establish_system_smp/establish_system_smp.C $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2012 - * - * p1 - * - * Object Code Only (OCO) source materials - * Licensed Internal Code Source Materials - * IBM HostBoot Licensed Internal Code - * - * The source code for this program is not published or other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/hwpf/hwp/establish_system_smp/establish_system_smp.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ /** * @file establish_system_smp.C * @@ -86,15 +85,12 @@ void* call_host_coalesce_host( void *io_pArgs ) // customize any other inputs // set up loops to go through all targets (if parallel, spin off a task) - // dump physical path to targets - EntityPath l_path; - l_path = l_@targetN_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + // write HUID of target + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", TARGETING::get_huid(l)); // cast OUR type of target to a FAPI type of target. - const fapi::Target l_fapi_@targetN_target( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> + const fapi::Target l_fapi_@targetN_target( TARGET_TYPE_MEMBUF_CHIP, (const_cast<TARGETING::Target*>(l_@targetN_target)) ); // call the HWP with each fapi::Target diff --git a/src/usr/hwpf/hwp/mc_config/mc_config.C b/src/usr/hwpf/hwp/mc_config/mc_config.C index c5968cda3..f6c122256 100644 --- a/src/usr/hwpf/hwp/mc_config/mc_config.C +++ b/src/usr/hwpf/hwp/mc_config/mc_config.C @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/usr/hwpf/hwp/mc_config/mc_config.C $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2012 - * - * p1 - * - * Object Code Only (OCO) source materials - * Licensed Internal Code Source Materials - * IBM HostBoot Licensed Internal Code - * - * The source code for this program is not published or other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/hwpf/hwp/mc_config/mc_config.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ /** * @file mc_config.C * @@ -114,10 +113,13 @@ void* call_mss_volt( void *io_pArgs ) //get a list of unique VmemIds std::vector<TARGETING::ATTR_VMEM_ID_type> l_VmemList; - for (size_t i = 0; i < l_membufTargetList.size(); i++ ) + for (TargetHandleList::const_iterator + l_membuf_iter = l_membufTargetList.begin(); + l_membuf_iter != l_membufTargetList.end(); + ++l_membuf_iter) { TARGETING::ATTR_VMEM_ID_type l_VmemID = - l_membufTargetList[i]->getAttr<ATTR_VMEM_ID>(); + (*l_membuf_iter)->getAttr<ATTR_VMEM_ID>(); l_VmemList.push_back(l_VmemID); } @@ -127,39 +129,36 @@ void* call_mss_volt( void *io_pArgs ) objItr=std::unique(l_VmemList.begin(), l_VmemList.end()); l_VmemList.erase(objItr,l_VmemList.end()); - //for each unique VmemId filter it out of the list of membuf targets //to create a subsetlist of membufs with just that vmemid - for(size_t i = 0; i < l_VmemList.size(); i++) + std::vector<TARGETING::ATTR_VMEM_ID_type>::iterator l_vmem_iter; + for (l_vmem_iter = l_VmemList.begin(); + l_vmem_iter != l_VmemList.end(); + ++l_vmem_iter) { - // declare a vector of fapi targets to pass to mss_volt std::vector<fapi::Target> l_membufFapiTargets; - for (size_t j = 0; j < l_membufTargetList.size(); j++) + for (TargetHandleList::const_iterator + l_membuf_iter = l_membufTargetList.begin(); + l_membuf_iter != l_membufTargetList.end(); + ++l_membuf_iter) { - if (l_membufTargetList[j]->getAttr<ATTR_VMEM_ID>()==l_VmemList[i]) + // make a local copy of the target for ease of use + const TARGETING::Target* l_membuf_target = *l_membuf_iter; + if (l_membuf_target->getAttr<ATTR_VMEM_ID>()==*l_vmem_iter) { - // make a local copy of the target for ease of use - const TARGETING::Target* l_membuf_target = - l_membufTargetList[j]; TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "===== add to fapi::Target vector vmem_id=0x%08X...", - l_membuf_target->getAttr<ATTR_VMEM_ID>()); - - EntityPath l_path; - l_path = l_membuf_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + "===== add to fapi::Target vector vmem_id=0x%08X " + "target HUID %.8X", + l_membuf_target->getAttr<ATTR_VMEM_ID>(), + TARGETING::get_huid(l_membuf_target)); - fapi::Target l_membuf_fapi_target( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> + fapi::Target l_membuf_fapi_target( TARGET_TYPE_MEMBUF_CHIP, (const_cast<TARGETING::Target*>(l_membuf_target)) ); l_membufFapiTargets.push_back( l_membuf_fapi_target ); - } - } //now have the a list of fapi membufs with just the one VmemId @@ -220,23 +219,23 @@ void* call_mss_freq( void *io_pArgs ) TARGETING::TargetHandleList l_membufTargetList; getAllChips(l_membufTargetList, TYPE_MEMBUF); - for ( size_t i = 0; i < l_membufTargetList.size(); i++ ) + for (TargetHandleList::const_iterator + l_membuf_iter = l_membufTargetList.begin(); + l_membuf_iter != l_membufTargetList.end(); + ++l_membuf_iter) { // make a local copy of the target for ease of use - const TARGETING::Target* l_membuf_target = l_membufTargetList[i]; + const TARGETING::Target* l_membuf_target = *l_membuf_iter; TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "===== mss_freq HWP( %d )", i ); - EntityPath l_path; - l_path = l_membuf_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + "===== mss_freq HWP " + "target HUID %.8X", + TARGETING::get_huid(l_membuf_target)); // call the HWP with each target ( if parallel, spin off a task ) // $$const fapi::Target l_fapi_membuf_target( - fapi::Target l_fapi_membuf_target( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> - (const_cast<TARGETING::Target*>(l_membuf_target)) ); + fapi::Target l_fapi_membuf_target( TARGET_TYPE_MEMBUF_CHIP, + (const_cast<TARGETING::Target*>(l_membuf_target)) ); FAPI_INVOKE_HWP(l_err, mss_freq, l_fapi_membuf_target); @@ -244,14 +243,11 @@ void* call_mss_freq( void *io_pArgs ) if ( l_err ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%.8X: mss_freq HWP( %d ) ", - l_err->reasonCode(), - i ); - - ErrlUserDetailsTarget myDetails(l_membuf_target); + "ERROR 0x%.8X: mss_freq HWP ", + l_err->reasonCode()); // capture the target data in the elog - myDetails.addToLog(l_err ); + ErrlUserDetailsTarget(l_membuf_target).addToLog( l_err ); /*@ * @errortype @@ -276,7 +272,7 @@ void* call_mss_freq( void *io_pArgs ) else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : mss_freq HWP( %d )", i ); + "SUCCESS : mss_freq HWP"); } } // End memBuf loop @@ -292,41 +288,42 @@ errlHndl_t call_mss_eff_grouping() TARGETING::TargetHandleList l_procsList; getAllChips(l_procsList, TYPE_PROC); - for ( size_t i = 0; i < l_procsList.size(); i++ ) + for (TargetHandleList::const_iterator + l_proc_iter = l_procsList.begin(); + l_proc_iter != l_procsList.end(); + ++l_proc_iter) { // make a local copy of the target for ease of use - const TARGETING::Target* l_cpu_target = l_procsList[i]; + const TARGETING::Target* l_cpu_target = *l_proc_iter; - // print call to hwp and dump physical path of the target(s) + // print call to hwp and write HUID of the target(s) TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "===== mss_eff_grouping HWP( cpu %d )", i ); - // dump physical path to targets - EntityPath l_path; - l_path = l_cpu_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + "===== mss_eff_grouping HWP cpu " + "target HUID %.8X", + TARGETING::get_huid(l_cpu_target)); // cast OUR type of target to a FAPI type of target. - const fapi::Target l_fapi_cpu_target( - TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> - (const_cast<TARGETING::Target*>(l_cpu_target)) ); + const fapi::Target l_fapi_cpu_target( TARGET_TYPE_PROC_CHIP, + (const_cast<TARGETING::Target*>(l_cpu_target)) ); TARGETING::TargetHandleList l_membufsList; getAffinityChips(l_membufsList, l_cpu_target, TYPE_MEMBUF); std::vector<fapi::Target> l_associated_centaurs; - size_t j = 0; - for ( ; j < l_membufsList.size(); j++ ) + for (TargetHandleList::const_iterator + l_membuf_iter = l_membufsList.begin(); + l_membuf_iter != l_membufsList.end(); + ++l_membuf_iter) { + // make a local copy of the target for ease of use + const TARGETING::Target* l_pTarget = *l_membuf_iter; + // cast OUR type of target to a FAPI type of target. - const fapi::Target l_fapi_centaur_target( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> - (const_cast<TARGETING::Target*>(l_membufsList[j])) ); + const fapi::Target l_fapi_centaur_target( TARGET_TYPE_MEMBUF_CHIP, + (const_cast<TARGETING::Target*>(l_pTarget)) ); - EntityPath l_path; - l_path = l_membufsList[j]->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", TARGETING::get_huid(l_pTarget)); l_associated_centaurs.push_back(l_fapi_centaur_target); } @@ -338,20 +335,18 @@ errlHndl_t call_mss_eff_grouping() if ( l_err ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%.8X: mss_eff_grouping HWP( cpu %d centaur %d ) ", - l_err->reasonCode(), i, j ); - - ErrlUserDetailsTarget myDetails(l_cpu_target); + "ERROR 0x%.8X: mss_eff_grouping HWP", + l_err->reasonCode()); // capture the target data in the elog - myDetails.addToLog(l_err ); + ErrlUserDetailsTarget(l_cpu_target).addToLog(l_err); break; // break out mba loop } else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : mss_eff_grouping HWP( cpu %d )", i ); + "SUCCESS : mss_eff_grouping HWP"); } } // endfor @@ -367,15 +362,16 @@ errlHndl_t call_opt_memmap() std::vector<fapi::Target> l_fapi_procs; - for ( TARGETING::TargetHandleList::iterator l_iter = l_procs.begin(); - l_iter != l_procs.end(); ++l_iter ) + for ( TARGETING::TargetHandleList::const_iterator + l_iter = l_procs.begin(); + l_iter != l_procs.end(); + ++l_iter ) { // make a local copy of the target for ease of use const TARGETING::Target* l_target = *l_iter; // cast OUR type of target to a FAPI type of target. const fapi::Target l_fapi_target( TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> (const_cast<TARGETING::Target*>(l_target)) ); l_fapi_procs.push_back(l_fapi_target); @@ -411,25 +407,23 @@ void* call_mss_eff_config( void *io_pArgs ) TARGETING::TargetHandleList l_mbaTargetList; getAllChiplets(l_mbaTargetList, TYPE_MBA); - for ( size_t i = 0; i < l_mbaTargetList.size(); i++ ) + for (TargetHandleList::const_iterator + l_mba_iter = l_mbaTargetList.begin(); + l_mba_iter != l_mbaTargetList.end(); + ++l_mba_iter) { // make a local copy of the target for ease of use - const TARGETING::Target* l_mba_target = l_mbaTargetList[i]; + const TARGETING::Target* l_mba_target = *l_mba_iter; // print call to hwp and dump physical path of the target(s) TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "===== mss_eff_config HWP( mba %d )", i ); - // dump physical path to targets - EntityPath l_path; - l_path = l_mba_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); - + "===== mss_eff_config HWP " + "target HUID %.8X", + TARGETING::get_huid(l_mba_target)); // cast OUR type of target to a FAPI type of target. - const fapi::Target l_fapi_mba_target( - TARGET_TYPE_MBA_CHIPLET, - reinterpret_cast<void *> - (const_cast<TARGETING::Target*>(l_mba_target)) ); + const fapi::Target l_fapi_mba_target( TARGET_TYPE_MBA_CHIPLET, + (const_cast<TARGETING::Target*>(l_mba_target)) ); // call the HWP with each fapi::Target FAPI_INVOKE_HWP(l_err, mss_eff_config, l_fapi_mba_target); @@ -438,8 +432,8 @@ void* call_mss_eff_config( void *io_pArgs ) if ( l_err ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%.8X: mss_eff_config HWP( mba %d ) ", - l_err->reasonCode(), i ); + "ERROR 0x%.8X: mss_eff_config HWP ", + l_err->reasonCode()); ErrlUserDetailsTarget myDetails(l_mba_target); @@ -451,15 +445,17 @@ void* call_mss_eff_config( void *io_pArgs ) else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : mss_eff_config HWP( mba %d )", i ); + "SUCCESS : mss_eff_config HWP"); } } // endfor TARGETING::TargetHandleList l_procs; getAllChips(l_procs, TYPE_PROC); - for (TARGETING::TargetHandleList::iterator l_iter = l_procs.begin(); - l_iter != l_procs.end() && !l_err; ++l_iter) + for (TARGETING::TargetHandleList::const_iterator + l_iter = l_procs.begin(); + l_iter != l_procs.end() && !l_err; + ++l_iter) { TARGETING::Target* l_target = *l_iter; diff --git a/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C b/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C index 5c62d9cca..7714ca213 100644 --- a/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C +++ b/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C @@ -26,10 +26,6 @@ * Support file for IStep: nest_chiplets * Nest Chiplets * - * ***************************************************************** - * THIS FILE WAS GENERATED ON 2012-04-03:1952 - * ***************************************************************** - * * HWP_IGNORE_VERSION_CHECK * */ @@ -104,20 +100,18 @@ void* call_proc_a_x_pci_dmi_pll_initf( void *io_pArgs ) TARGETING::TargetHandleList l_procTargetList; getAllChips(l_procTargetList, TYPE_PROC); - for ( TargetHandleList::iterator l_iter = l_procTargetList.begin(); - l_iter != l_procTargetList.end(); ++l_iter ) + for ( TargetHandleList::const_iterator + l_iter = l_procTargetList.begin(); + l_iter != l_procTargetList.end(); + ++l_iter ) { const TARGETING::Target* l_proc_target = *l_iter; - const fapi::Target l_fapi_proc_target( - TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> + const fapi::Target l_fapi_proc_target( TARGET_TYPE_PROC_CHIP, ( const_cast<TARGETING::Target*>(l_proc_target) ) ); TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running proc_a_x_pci_dmi_pll_initf HWP"); - EntityPath l_path; - l_path = l_proc_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + "Running proc_a_x_pci_dmi_pll_initf HWP on " + "target HUID %.8X", TARGETING::get_huid(l_proc_target)); // call proc_a_x_pci_dmi_pll_initf FAPI_INVOKE_HWP(l_err, proc_a_x_pci_dmi_pll_initf, @@ -134,10 +128,8 @@ void* call_proc_a_x_pci_dmi_pll_initf( void *io_pArgs ) " HWP returns error", l_err->reasonCode()); - ErrlUserDetailsTarget myDetails(l_proc_target); - // capture the target data in the elog - myDetails.addToLog(l_err ); + ErrlUserDetailsTarget(l_proc_target).addToLog( l_err ); /*@ * @errortype @@ -185,21 +177,18 @@ void* call_proc_a_x_pci_dmi_pll_setup( void *io_pArgs ) TARGETING::TargetHandleList l_procTargetList; getAllChips(l_procTargetList, TYPE_PROC); - for (TARGETING::TargetHandleList::iterator l_cpuIter = - l_procTargetList.begin(); l_cpuIter != l_procTargetList.end(); + for (TARGETING::TargetHandleList::const_iterator + l_cpuIter = l_procTargetList.begin(); + l_cpuIter != l_procTargetList.end(); ++l_cpuIter) { const TARGETING::Target* l_proc_target = *l_cpuIter; - const fapi::Target l_fapi_proc_target( - TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> + const fapi::Target l_fapi_proc_target( TARGET_TYPE_PROC_CHIP, ( const_cast<TARGETING::Target*>(l_proc_target) ) ); TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running proc_a_x_pci_dmi_pll_setup HWP on..."); - EntityPath l_path; - l_path = l_proc_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + "Running proc_a_x_pci_dmi_pll_setup HWP on " + "target HUID %.8X", TARGETING::get_huid(l_proc_target)); // call proc_a_x_pci_dmi_pll_setup FAPI_INVOKE_HWP(l_err, proc_a_x_pci_dmi_pll_setup, @@ -216,10 +205,8 @@ void* call_proc_a_x_pci_dmi_pll_setup( void *io_pArgs ) HWP returns error", l_err->reasonCode()); - ErrlUserDetailsTarget myDetails(l_proc_target); - // capture the target data in the elog - myDetails.addToLog(l_err ); + ErrlUserDetailsTarget(l_proc_target).addToLog( l_err ); /*@ * @errortype @@ -357,15 +344,14 @@ void* call_proc_startclock_chiplets( void *io_pArgs ) TARGETING::TargetHandleList l_procTargetList; getAllChips(l_procTargetList, TYPE_PROC); - for ( TargetHandleList::iterator l_iter = l_procTargetList.begin(); - l_iter != l_procTargetList.end(); ++l_iter ) + for ( TargetHandleList::const_iterator + l_iter = l_procTargetList.begin(); + l_iter != l_procTargetList.end(); + ++l_iter ) { const TARGETING::Target* l_proc_target = *l_iter; - const fapi::Target l_fapi_proc_target( - TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> - ( const_cast<TARGETING::Target*>(l_proc_target) ) - ); + const fapi::Target l_fapi_proc_target( TARGET_TYPE_PROC_CHIP, + ( const_cast<TARGETING::Target*>(l_proc_target) )); l_err = customizeChipRegions(*l_iter); if(l_err) @@ -375,10 +361,8 @@ void* call_proc_startclock_chiplets( void *io_pArgs ) "returns error", l_err->reasonCode()); - ErrlUserDetailsTarget myDetails(l_proc_target); - // capture the target data in the elog - myDetails.addToLog(l_err ); + ErrlUserDetailsTarget(l_proc_target).addToLog( l_err ); /*@ * @errortype @@ -401,11 +385,8 @@ void* call_proc_startclock_chiplets( void *io_pArgs ) } TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running proc_startclock_chiplets HWP on..." ); - // dump physical path to targets - EntityPath l_path; - l_path = l_proc_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + "Running proc_startclock_chiplets HWP on " + "target HUID %.8X", TARGETING::get_huid(l_proc_target)); // call the HWP with each fapi::Target FAPI_INVOKE_HWP(l_err, proc_start_clocks_chiplets, @@ -420,10 +401,8 @@ void* call_proc_startclock_chiplets( void *io_pArgs ) "returns error", l_err->reasonCode()); - ErrlUserDetailsTarget myDetails(l_proc_target); - // capture the target data in the elog - myDetails.addToLog(l_err ); + ErrlUserDetailsTarget(l_proc_target).addToLog( l_err ); /*@ * @errortype @@ -464,7 +443,6 @@ void* call_proc_startclock_chiplets( void *io_pArgs ) void* call_proc_chiplet_scominit( void *io_pArgs ) { errlHndl_t l_err = NULL; - fapi::ReturnCode rc; IStepError l_StepError; TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_chiplet_scominit entry" ); @@ -478,30 +456,29 @@ void* call_proc_chiplet_scominit( void *io_pArgs ) // Execute PROC_CHIPLET_SCOMINIT_FBC_IF initfile // ---------------------------------------------- - for (TARGETING::TargetHandleList::iterator l_cpuIter = - l_cpuTargetList.begin(); l_cpuIter != l_cpuTargetList.end(); + for (TARGETING::TargetHandleList::const_iterator + l_cpuIter = l_cpuTargetList.begin(); + l_cpuIter != l_cpuTargetList.end(); ++l_cpuIter) { const TARGETING::Target* l_cpu_target = *l_cpuIter; - const fapi::Target l_fapi_proc_target( - TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> + const fapi::Target l_fapi_proc_target( TARGET_TYPE_PROC_CHIP, ( const_cast<TARGETING::Target*>(l_cpu_target) ) ); - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Running proc_chiplet_scominit HWP on..." ); - // dump physical path to targets - EntityPath l_path; - l_path = l_cpu_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running proc_chiplet_scominit HWP on " + "target HUID %.8X", TARGETING::get_huid(l_cpu_target)); // call the HWP with each fapi::Target FAPI_INVOKE_HWP(l_err, proc_chiplet_scominit, l_fapi_proc_target); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : " - "proc_chiplet_scominit HWP returns error. Target 0x%.8X", + "proc_chiplet_scominit HWP returns error. target HUID %.8X", l_err->reasonCode(), TARGETING::get_huid(l_cpu_target)); - ErrlUserDetailsTarget myDetails(l_cpu_target); + + ErrlUserDetailsTarget(l_cpu_target).addToLog( l_err ); + /*@ * @errortype * @reasoncode ISTEP_PROC_CHIPLET_SCOMINIT_FAILED @@ -528,16 +505,17 @@ void* call_proc_chiplet_scominit( void *io_pArgs ) return l_StepError.getErrorHandle(); } + //***************************************************************************** // wrapper function to call proc_xbus_scominit //****************************************************************************** void* call_proc_xbus_scominit( void *io_pArgs ) { errlHndl_t l_err = NULL; - fapi::ReturnCode rc; IStepError l_StepError; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_xbus_scominit entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_xbus_scominit entry" ); TARGETING::TargetHandleList l_cpuTargetList; getAllChips(l_cpuTargetList, TYPE_PROC); @@ -550,8 +528,9 @@ void* call_proc_xbus_scominit( void *io_pArgs ) l_XbusConnections, TYPE_XBUS, false); if (l_err) { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : getPbusConnections XBUS returns error", - l_err->reasonCode()); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X : getPbusConnections XBUS returns error", + l_err->reasonCode()); // TODO - RTC 57977 // Need to discuss with Jamie on how to handle this: @@ -563,24 +542,34 @@ void* call_proc_xbus_scominit( void *io_pArgs ) l_StepError.addErrorDetails(ISTEP_PROC_CHIPLET_SCOMINIT_FAILED, ISTEP_PROC_CHIPLET_SCOMINIT, l_err); + // Commit the error log + // Log should be deleted and set to NULL in errlCommit. + errlCommit(l_err, HWPF_COMP_ID); // Shouldn't continue on this fatal error (no XBUS), break out break; } - for (TARGETING::TargetHandleList::iterator l_cpuIter = - l_cpuTargetList.begin(); l_cpuIter != l_cpuTargetList.end(); - ++l_cpuIter) + // Loop thru the proc + for (TargetHandleList::const_iterator + l_cpuIter = l_cpuTargetList.begin(); + l_cpuIter != l_cpuTargetList.end(); + ++l_cpuIter) { - const TARGETING::Target* l_cpu_target = *l_cpuIter; + const TARGETING::Target* l_cpuTarget = *l_cpuIter; + // Get the XBUS under this proc TARGETING::TargetHandleList l_xbusList; - getChildChiplets( l_xbusList, l_cpu_target, TYPE_XBUS ); + getChildChiplets( l_xbusList, l_cpuTarget, TYPE_XBUS ); // For each XBUS unit in this proc - for (size_t jj = 0; jj < l_xbusList.size(); jj++) + for (TargetHandleList::const_iterator + l_xbus_iter = l_xbusList.begin(); + l_xbus_iter != l_xbusList.end(); + ++l_xbus_iter) { - TARGETING::Target * l_xbusTarget = l_xbusList[jj]; + // make a local copy of the target for ease of use + TARGETING::Target* l_xbusTarget = *l_xbus_iter; EDI_EI_INITIALIZATION::TargetPairs_t::iterator l_itr = l_XbusConnections.find(l_xbusTarget); if ( l_itr == l_XbusConnections.end() ) @@ -597,32 +586,28 @@ void* call_proc_xbus_scominit( void *io_pArgs ) const fapi::Target l_fapi_xbus_target( TARGET_TYPE_XBUS_ENDPOINT, - reinterpret_cast<void *> (const_cast<TARGETING::Target*>(l_xbusTarget))); targets.push_back(l_fapi_xbus_target); const fapi::Target l_fapi_this_cpu_target( TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> (const_cast<TARGETING::Target*>( - l_cpu_target))); + l_cpuTarget))); targets.push_back(l_fapi_this_cpu_target); const fapi::Target l_fapi_other_cpu_target( TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> (const_cast<TARGETING::Target*>( l_pParent))); targets.push_back(l_fapi_other_cpu_target); // Call HW procedure - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Running proc_xbus_scominit HWP on..." ); - EntityPath l_path = l_xbusTarget->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); - l_path = l_cpu_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); - l_path = l_pParent->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running proc_xbus_scominit HWP on " + "xbus HUID %.8X this cpu HUID %.8X other cpu HUID %.8X", + TARGETING::get_huid(l_xbusTarget), + TARGETING::get_huid(l_cpuTarget), + TARGETING::get_huid(l_pParent)); FAPI_INVOKE_HWP(l_err, proc_xbus_scominit, l_fapi_xbus_target, @@ -630,13 +615,19 @@ void* call_proc_xbus_scominit( void *io_pArgs ) l_fapi_other_cpu_target); if (l_err) { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : " - "proc_xbus_scominit HWP returns error. XBUS target 0x%.8X, " - "This CPU target 0x%.8X, Other CPU target 0x%.8X", - l_err->reasonCode(), TARGETING::get_huid(l_xbusTarget), - TARGETING::get_huid(l_cpu_target), - TARGETING::get_huid(l_pParent)); - ErrlUserDetailsTarget myDetails(l_xbusTarget); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X : proc_xbus_scominit HWP returns error. " + "xbus HUID %.8X this cpu HUID %.8X other cpu HUID %.8X", + l_err->reasonCode(), + TARGETING::get_huid(l_xbusTarget), + TARGETING::get_huid(l_cpuTarget), + TARGETING::get_huid(l_pParent)); + + // capture the target data in the elog + ErrlUserDetailsTarget(l_pParent).addToLog( l_err ); + ErrlUserDetailsTarget(l_cpuTarget).addToLog( l_err ); + ErrlUserDetailsTarget(l_xbusTarget).addToLog( l_err ); + /*@ * @errortype * @reasoncode ISTEP_PROC_XBUS_SCOMINIT_FAILED @@ -657,11 +648,8 @@ void* call_proc_xbus_scominit( void *io_pArgs ) // after committing errlCommit(l_err, HWPF_COMP_ID); } - } // End xbus loop - } // End cpu loop - } while (0); return l_StepError.getErrorHandle(); @@ -674,10 +662,10 @@ void* call_proc_abus_scominit( void *io_pArgs ) { errlHndl_t l_err = NULL; - fapi::ReturnCode rc; IStepError l_StepError; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_abus_scominit entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_abus_scominit entry" ); TARGETING::TargetHandleList l_cpuTargetList; getAllChips(l_cpuTargetList, TYPE_PROC); @@ -690,8 +678,9 @@ void* call_proc_abus_scominit( void *io_pArgs ) l_AbusConnections, TYPE_ABUS, false); if (l_err) { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : getPbusConnections ABUS returns error", - l_err->reasonCode()); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X : getPbusConnections ABUS returns error", + l_err->reasonCode()); // TODO - RTC 57977 // Need to discuss with Jamie on how to handle this: @@ -704,25 +693,34 @@ void* call_proc_abus_scominit( void *io_pArgs ) ISTEP_PROC_CHIPLET_SCOMINIT, l_err); + // Commit the error log + // Log should be deleted and set to NULL in errlCommit. + errlCommit(l_err, HWPF_COMP_ID); + // Shouldn't continue on this fatal error (no ABUS), break out break; } // Loop thru the proc - for (TARGETING::TargetHandleList::iterator l_cpuIter = - l_cpuTargetList.begin(); l_cpuIter != l_cpuTargetList.end(); - ++l_cpuIter) + for (TargetHandleList::const_iterator + l_cpuIter = l_cpuTargetList.begin(); + l_cpuIter != l_cpuTargetList.end(); + ++l_cpuIter) { - const TARGETING::Target* l_cpu_target = *l_cpuIter; + const TARGETING::Target* l_cpuTarget = *l_cpuIter; // Get the ABUS under this proc TARGETING::TargetHandleList l_abusList; - getChildChiplets( l_abusList, l_cpu_target, TYPE_ABUS ); + getChildChiplets( l_abusList, l_cpuTarget, TYPE_ABUS ); // For each ABUS unit in this proc - for (size_t ii = 0; ii < l_abusList.size(); ii++) + for (TargetHandleList::const_iterator + l_abus_iter = l_abusList.begin(); + l_abus_iter != l_abusList.end(); + ++l_abus_iter) { - TARGETING::Target * l_abusTarget = l_abusList[ii]; + // make a local copy of the target for ease of use + TARGETING::Target* l_abusTarget = *l_abus_iter; EDI_EI_INITIALIZATION::TargetPairs_t::iterator l_itr = l_AbusConnections.find(l_abusTarget); if ( l_itr == l_AbusConnections.end() ) @@ -739,32 +737,28 @@ void* call_proc_abus_scominit( void *io_pArgs ) const fapi::Target l_fapi_abus_target( TARGET_TYPE_ABUS_ENDPOINT, - reinterpret_cast<void *> (const_cast<TARGETING::Target*>(l_abusTarget))); targets.push_back(l_fapi_abus_target); const fapi::Target l_fapi_this_cpu_target( TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> (const_cast<TARGETING::Target*>( - l_cpu_target))); + l_cpuTarget))); targets.push_back(l_fapi_this_cpu_target); const fapi::Target l_fapi_other_cpu_target( TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> (const_cast<TARGETING::Target*>( l_pParent))); targets.push_back(l_fapi_other_cpu_target); // Call HW procedure - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Running proc_abus_scominit HWP on..." ); - EntityPath l_path = l_abusTarget->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); - l_path = l_cpu_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); - l_path = l_pParent->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running proc_abus_scominit HWP on " + "abus HUID %.8X this cpu HUID %.8X other cpu HUID %.8X", + TARGETING::get_huid(l_abusTarget), + TARGETING::get_huid(l_cpuTarget), + TARGETING::get_huid(l_pParent)); FAPI_INVOKE_HWP(l_err, proc_abus_scominit, l_fapi_abus_target, @@ -772,13 +766,19 @@ void* call_proc_abus_scominit( void *io_pArgs ) l_fapi_other_cpu_target); if (l_err) { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : " - "proc_abus_scominit HWP returns error. ABUS target 0x%.8X, " - "This CPU target 0x%.8X, Other CPU target 0x%.8X", - l_err->reasonCode(), TARGETING::get_huid(l_abusTarget), - TARGETING::get_huid(l_cpu_target), - TARGETING::get_huid(l_pParent)); - ErrlUserDetailsTarget myDetails(l_abusTarget); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR %.8X : proc_abus_scominit HWP returns error. " + "abus HUID %.8X this cpu HUID %.8X other cpu HUID %.8X", + l_err->reasonCode(), + TARGETING::get_huid(l_abusTarget), + TARGETING::get_huid(l_cpuTarget), + TARGETING::get_huid(l_pParent)); + + // capture the target data in the elog + ErrlUserDetailsTarget(l_pParent).addToLog( l_err ); + ErrlUserDetailsTarget(l_cpuTarget).addToLog( l_err ); + ErrlUserDetailsTarget(l_abusTarget).addToLog( l_err ); + /*@ * @errortype * @reasoncode ISTEP_PROC_ABUS_SCOMINIT_FAILED @@ -799,15 +799,11 @@ void* call_proc_abus_scominit( void *io_pArgs ) // after committing errlCommit(l_err, HWPF_COMP_ID); } - } // End abus list loop - } // End cpu loop - } while (0); return l_StepError.getErrorHandle(); - } @@ -820,28 +816,23 @@ void* call_proc_pcie_scominit( void *io_pArgs ) IStepError l_StepError; TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_proc_pcie_scominit entry" ); + "call_proc_pcie_scominit entry" ); TARGETING::TargetHandleList l_procTargetList; getAllChips(l_procTargetList, TYPE_PROC); - for ( TargetHandleList::iterator l_iter = l_procTargetList.begin(); - l_iter != l_procTargetList.end(); ++l_iter ) + for ( TargetHandleList::const_iterator + l_iter = l_procTargetList.begin(); + l_iter != l_procTargetList.end(); + ++l_iter ) { const TARGETING::Target* l_proc_target = *l_iter; - const fapi::Target l_fapi_proc_target( - TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> - ( const_cast<TARGETING::Target*>(l_proc_target) ) - ); + const fapi::Target l_fapi_proc_target( TARGET_TYPE_PROC_CHIP, + ( const_cast<TARGETING::Target*>(l_proc_target) )); TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running proc_pcie_scominit HWP on..." ); - - // dump physical path to targets - EntityPath l_path; - l_path = l_proc_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + "Running proc_pcie_scominit HWP on " + "target HUID %.8X", TARGETING::get_huid(l_proc_target)); // call the HWP with each fapi::Target FAPI_INVOKE_HWP(l_errl, proc_pcie_scominit, l_fapi_proc_target); @@ -852,6 +843,9 @@ void* call_proc_pcie_scominit( void *io_pArgs ) "ERROR 0x%.8X : proc_pcie_scominit HWP returns error", l_errl->reasonCode()); + // capture the target data in the elog + ErrlUserDetailsTarget(l_proc_target).addToLog( l_errl ); + /*@ * @errortype * @reasoncode ISTEP_NEST_CHIPLETS_FAILED @@ -867,9 +861,6 @@ void* call_proc_pcie_scominit( void *io_pArgs ) ISTEP_PROC_PCIE_SCOMINIT, l_errl); - // capture the target data in the elog - ErrlUserDetailsTarget(l_proc_target).addToLog( l_errl ); - errlCommit( l_errl, HWPF_COMP_ID ); break; diff --git a/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.C b/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.C index bb7c01138..9b93441e9 100644 --- a/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.C +++ b/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.C @@ -52,6 +52,7 @@ #include <vfs/vfs.H> #include "sbe_centaur_init.H" #include <hwpisteperror.H> +#include <errl/errludtarget.H> extern fapi::ReturnCode fapiPoreVe(const fapi::Target i_target, std::list<uint64_t> & io_sharedObjectArgs); @@ -66,6 +67,7 @@ namespace SBE_CENTAUR_INIT using namespace ISTEP; using namespace ISTEP_ERROR; +using namespace ERRORLOG; using namespace TARGETING; using namespace fapi; using namespace vsbe; @@ -157,21 +159,20 @@ void* call_sbe_centaur_init( void *io_pArgs ) myArgs.push_back(reinterpret_cast<uint64_t>(l_stateArg)); // Loop thru all Centaurs in list - for ( size_t i = 0; i < l_membufTargetList.size(); i++ ) + for (TargetHandleList::const_iterator + l_membuf_iter = l_membufTargetList.begin(); + l_membuf_iter != l_membufTargetList.end(); + ++l_membuf_iter) { // Create a FAPI Target - const TARGETING::Target* l_membuf_target = l_membufTargetList[i]; + const TARGETING::Target* l_membuf_target = *l_membuf_iter; const fapi::Target l_fapiTarget( fapi::TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> (const_cast<TARGETING::Target*>(l_membuf_target))); // Put out info on target TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running call_sbe_centaur_init on Centaur entity path..."); - - EntityPath l_path; - l_path = l_membuf_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + "Running call_sbe_centaur_init on Centaur " + "target HUID %.8X", TARGETING::get_huid(l_membuf_target)); // Run the engine TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, @@ -185,6 +186,10 @@ void* call_sbe_centaur_init( void *io_pArgs ) "ERROR 0x%.8X call_sbe_centaur_init - Error returned from" " VSBE engine on this Centaur, l_rc 0x%llX", l_errl->reasonCode()); + + // capture the target data in the elog + ErrlUserDetailsTarget(l_membuf_target).addToLog( l_errl ); + /*@ * @errortype * @reasoncode ISTEP_SBE_CENTAUR_INIT_FAILED diff --git a/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C b/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C index 9c1db97e4..820ae8e31 100644 --- a/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C +++ b/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C @@ -92,10 +92,8 @@ void* call_proc_revert_sbe_mcs_setup(void *io_pArgs) "ERROR : failed executing proc_revert_sbe_mcs_setup " "returning error"); - ErrlUserDetailsTarget myDetails(l_pProcTarget); - // capture the target data in the elog - myDetails.addToLog( l_errl ); + ErrlUserDetailsTarget(l_pProcTarget).addToLog( l_errl ); /*@ * @errortype @@ -200,17 +198,17 @@ void* call_proc_check_slave_sbe_seeprom_complete( void *io_pArgs ) "proc_check_slave_sbe_seeprom_complete: %d procs in the system.", l_procTargetList.size() ); - // @todo $$ convert to iterators - RTC 52905 // loop thru all the cpu's - for ( uint8_t l_procNum=0; l_procNum < l_procTargetList.size(); l_procNum++) + for (TargetHandleList::const_iterator + l_proc_iter = l_procTargetList.begin(); + l_proc_iter != l_procTargetList.end(); + ++l_proc_iter) { // make a local copy of the Processor target - TARGETING::Target* l_pProcTarget = l_procTargetList[l_procNum]; + TARGETING::Target* l_pProcTarget = *l_proc_iter; - // dump physical path to proc target - EntityPath l_path; - l_path = l_pProcTarget->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "target HUID %.8X", TARGETING::get_huid(l_pProcTarget)); if ( l_pProcTarget == l_pMasterProcTarget ) { @@ -232,10 +230,8 @@ void* call_proc_check_slave_sbe_seeprom_complete( void *io_pArgs ) "ERROR : proc_check_slave_sbe_seeprom_complete", "failed, returning errorlog" ); - ErrlUserDetailsTarget myDetails(l_pProcTarget); - // capture the target data in the elog - myDetails.addToLog( l_errl ); + ErrlUserDetailsTarget(l_pProcTarget).addToLog( l_errl ); /*@ * @errortype diff --git a/src/usr/hwpf/hwp/start_payload/start_payload.C b/src/usr/hwpf/hwp/start_payload/start_payload.C index 4b62e5243..544499b21 100644 --- a/src/usr/hwpf/hwp/start_payload/start_payload.C +++ b/src/usr/hwpf/hwp/start_payload/start_payload.C @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/usr/hwpf/hwp/start_payload/start_payload.C $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2012 - * - * p1 - * - * Object Code Only (OCO) source materials - * Licensed Internal Code Source Materials - * IBM HostBoot Licensed Internal Code - * - * The source code for this program is not published or other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/hwpf/hwp/start_payload/start_payload.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ /** * @file start_payload.C * @@ -136,6 +135,13 @@ void* call_host_runtime_setup( void *io_pArgs ) // Write the HostServices attributes into mainstore l_err = RUNTIME::populate_attributes(); + if ( l_err ) + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Could not populate attributes" ); + // break from do loop if error occured + break; + } // - Update HDAT with tpmd logs @@ -146,6 +152,17 @@ void* call_host_runtime_setup( void *io_pArgs ) TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "istep start_payload_failed see plid 0x%x", l_err->plid()); + /*@ + * @errortype + * @reasoncode ISTEP_START_PAYLOAD_FAILED + * @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE + * @moduleid ISTEP_HOST_RUNTIME_SETUP + * @userdata1 bytes 0-1: plid identifying first error + * bytes 2-3: reason code of first error + * @userdata2 bytes 0-1: total number of elogs included + * bytes 2-3: N/A + * @devdesc host_runtime_setup failed + */ l_StepError.addErrorDetails(ISTEP_START_PAYLOAD_FAILED, ISTEP_HOST_RUNTIME_SETUP, l_err ); @@ -213,6 +230,17 @@ void* call_host_start_payload( void *io_pArgs ) TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "istep start_payload_failed see plid 0x%x", l_errl->plid()); + /*@ + * @errortype + * @reasoncode ISTEP_START_PAYLOAD_FAILED + * @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE + * @moduleid ISTEP_HOST_START_PAYLOAD + * @userdata1 bytes 0-1: plid identifying first error + * bytes 2-3: reason code of first error + * @userdata2 bytes 0-1: total number of elogs included + * bytes 2-3: N/A + * @devdesc host_start_payload failed + */ l_StepError.addErrorDetails(ISTEP_START_PAYLOAD_FAILED, ISTEP_HOST_START_PAYLOAD, l_errl ); diff --git a/src/usr/hwpf/hwp/thread_activate/thread_activate.C b/src/usr/hwpf/hwp/thread_activate/thread_activate.C index 23040c4bc..4e98d354f 100644 --- a/src/usr/hwpf/hwp/thread_activate/thread_activate.C +++ b/src/usr/hwpf/hwp/thread_activate/thread_activate.C @@ -262,13 +262,14 @@ void activate_threads( errlHndl_t& io_rtaskRetErrl ) uint64_t l_masterCoreID = (cpuid & 0x0078)>>3; uint64_t l_masterThreadID = (cpuid & 0x0007); - TARGETING::Target* l_masterCore = NULL; - for( TARGETING::TargetHandleList::iterator core_it - = l_coreTargetList.begin(); + const TARGETING::Target* l_masterCore = NULL; + for( TARGETING::TargetHandleList::const_iterator + core_it = l_coreTargetList.begin(); core_it != l_coreTargetList.end(); ++core_it ) { - uint8_t l_coreId = (*core_it)->getAttr<TARGETING::ATTR_CHIP_UNIT>(); + TARGETING::ATTR_CHIP_UNIT_type l_coreId = + (*core_it)->getAttr<TARGETING::ATTR_CHIP_UNIT>(); if( l_coreId == l_masterCoreID ) { l_masterCore = (*core_it); @@ -303,22 +304,15 @@ void activate_threads( errlHndl_t& io_rtaskRetErrl ) TRACFCOMP( g_fapiTd, "Master CPU : c%d t%d (HUID=%.8X)", - l_masterCoreID, l_masterThreadID, TARGETING::get_huid(l_masterCore) ); - - // dump physical path to core target - TARGETING::EntityPath l_path; - l_path = l_masterCore->getAttr<TARGETING::ATTR_PHYS_PATH>(); - l_path.dump(); + l_masterCoreID, l_masterThreadID, + TARGETING::get_huid(l_masterCore) ); // cast OUR type of target to a FAPI type of target. - const fapi::Target l_fapiCore( - fapi::TARGET_TYPE_EX_CHIPLET, - reinterpret_cast<void *> - (const_cast<TARGETING::Target*>(l_masterCore)) - ); + const fapi::Target l_fapiCore( fapi::TARGET_TYPE_EX_CHIPLET, + (const_cast<TARGETING::Target*>(l_masterCore))); // loop around threads 0-6, SBE starts thread 7 - uint64_t max_threads = cpu_thread_count(); + const uint64_t max_threads = cpu_thread_count(); for( uint64_t thread = 0; thread < max_threads; thread++ ) { // Skip the thread that we're running on diff --git a/src/usr/hwpf/test/fapiwinkletest.H b/src/usr/hwpf/test/fapiwinkletest.H index 31687607b..5ab22fcca 100644 --- a/src/usr/hwpf/test/fapiwinkletest.H +++ b/src/usr/hwpf/test/fapiwinkletest.H @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/usr/hwpf/test/fapiwinkletest.H $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2012 - * - * p1 - * - * Object Code Only (OCO) source materials - * Licensed Internal Code Source Materials - * IBM HostBoot Licensed Internal Code - * - * The source code for this program is not published or other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/hwpf/test/fapiwinkletest.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ #ifndef __FAPIWINKLETEST_H #define __FAPIWINKLETEST_H @@ -76,15 +75,14 @@ public: // loop thru all the cpu's - for (uint8_t l_cpuNum=0; l_cpuNum < l_cpuTargetList.size(); l_cpuNum++ ) + for (TargetHandleList::iterator l_cpu_iter = l_cpuTargetList.begin(); + l_cpu_iter != l_cpuTargetList.end(); + ++l_cpu_iter) { // make a local copy of the CPU target - TARGETING::Target* l_cpu_target = l_cpuTargetList[l_cpuNum]; + TARGETING::Target* l_cpu_target = *l_cpu_iter; - // dump physical path to target - EntityPath l_path; - l_path = l_cpu_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + TS_TRACE( "target HUID %.8X", TARGETING::get_huid(l_cpu_target)); // cast OUR type of target to a FAPI type of target. fapi::Target l_fapi_cpu_target( @@ -174,17 +172,16 @@ public: getAllChips(l_cpuTargetList, TYPE_PROC); // loop thru all the cpu's - for (uint8_t l_cpuNum=0; l_cpuNum < l_cpuTargetList.size(); l_cpuNum++ ) + for (TargetHandleList::iterator l_cpu_iter = l_cpuTargetList.begin(); + l_cpu_iter != l_cpuTargetList.end(); + ++l_cpu_iter) { // make a local copy of the CPU target - TARGETING::Target* l_cpu_target = l_cpuTargetList[l_cpuNum]; - - TS_TRACE( "testRepairRings: cpuNum = 0x%x ", l_cpuNum ); + TARGETING::Target* l_cpu_target = *l_cpu_iter; - // dump physical path to target - EntityPath l_path; - l_path = l_cpu_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); + TS_TRACE( "testRepairRings: " + "target HUID %.8X", + TARGETING::get_huid(l_cpu_target)); // cast OUR type of target to a FAPI type of target. fapi::Target l_fapi_cpu_target( |