void* call_cen_arrayinit (void *io_pArgs) { IStepError l_StepError; errlHndl_t l_err = NULL; TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_arrayinit entry" ); TARGETING::TargetHandleList l_membufTargetList; getAllChips(l_membufTargetList, TYPE_MEMBUF); TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_arrayinit: %d membufs found", l_membufTargetList.size()); for (const auto & l_membuf_target : l_membufTargetList) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "cen_arrayinit HWP target HUID %.8x", TARGETING::get_huid(l_membuf_target)); // call the HWP with each target fapi2::Target <fapi2::TARGET_TYPE_MEMBUF_CHIP> l_fapi_membuf_target (l_membuf_target); FAPI_INVOKE_HWP(l_err, cen_arrayinit, l_fapi_membuf_target); // process return code. if ( l_err ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: cen_arrayinit HWP on target HUID %.8x", l_err->reasonCode(), TARGETING::get_huid(l_membuf_target) ); // capture the target data in the elog ErrlUserDetailsTarget(l_membuf_target).addToLog( l_err ); // Create IStep error log and cross reference to error that occurred l_StepError.addErrorDetails( l_err ); // Commit Error errlCommit( l_err, ISTEP_COMP_ID ); } else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : cen_arrayinit HWP"); } } TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_arrayinit exit" ); return l_StepError.getErrorHandle(); }
void* call_dmi_pre_trainadv (void *io_pArgs) { IStepError l_StepError; errlHndl_t l_err = NULL; TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_pre_trainadv entry" ); TARGETING::TargetHandleList l_dmiTargetList; getAllChiplets(l_dmiTargetList, TYPE_DMI); TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_pre_trainadv: %d DMIs found", l_dmiTargetList.size()); for (const auto & l_dmi_target : l_dmiTargetList) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "p9_io_dmi_pre_trainadv HWP target HUID %.8x", TARGETING::get_huid(l_dmi_target)); //get the membuf associated with this DMI. TARGETING::TargetHandleList l_pChildMembufList; getChildAffinityTargetsByState(l_pChildMembufList, l_dmi_target, CLASS_CHIP, TYPE_MEMBUF, UTIL_FILTER_PRESENT); // call the HWP p9_io_dmi_pre_trainadv only if membuf connected. //we can't expect more than one membufs connected to a DMI if (l_pChildMembufList.size() == 1) { // call the HWP with each DMI target fapi2::Target<fapi2::TARGET_TYPE_DMI> l_fapi_dmi_target (l_dmi_target); fapi2::Target<fapi2::TARGET_TYPE_MEMBUF_CHIP> l_fapi_membuf_target (l_pChildMembufList[0]); FAPI_INVOKE_HWP(l_err, p9_io_dmi_pre_trainadv, l_fapi_dmi_target, l_fapi_membuf_target ); // process return code. if ( l_err ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: p9_io_dmi_pre_trainadv HWP on target HUID %.8x", l_err->reasonCode(), TARGETING::get_huid(l_dmi_target) ); // capture the target data in the elog ErrlUserDetailsTarget(l_dmi_target).addToLog( l_err ); // Create IStep error log and cross reference to error that occurred l_StepError.addErrorDetails( l_err ); // Commit Error errlCommit( l_err, ISTEP_COMP_ID ); } else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : p9_io_dmi_pre_trainadv HWP"); } } else //No associated membuf { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "p9_io_dmi_pre_trainadv HWP skipped, no associated membufs %d" ,l_pChildMembufList.size()); } } TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_pre_trainadv exit" ); // end task, returning any errorlogs to IStepDisp return l_StepError.getErrorHandle(); }
void cumulus_dccal_setup(IStepError & io_istepError) { errlHndl_t l_err = nullptr; TARGETING::TargetHandleList l_procTargetList; getAllChips(l_procTargetList, TYPE_PROC); for (const auto & l_proc_target : l_procTargetList) { // a. p9_io_dmi_dccal.C (DMI target) TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "p9_io_dmi_dccal HWP target HUID %.8x", TARGETING::get_huid(l_proc_target)); // call the HWP with each target fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_fapi_proc_target (l_proc_target); FAPI_INVOKE_HWP(l_err, p9_io_dmi_dccal, l_fapi_proc_target); // process return code. if ( l_err ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: p9_io_dmi_dccal HWP on target HUID %.8x", l_err->reasonCode(), TARGETING::get_huid(l_proc_target) ); // capture the target data in the elog ErrlUserDetailsTarget(l_proc_target).addToLog( l_err ); // Create IStep error log and cross reference to error that occurred io_istepError.addErrorDetails( l_err ); // Commit Error errlCommit( l_err, ISTEP_COMP_ID ); } else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : p9_io_dmi_dccal HWP on target HUID %.8x", TARGETING::get_huid(l_proc_target) ); } // b. p9_io_cen_dccal.C (Centaur target) TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "p9_io_cen_dccal HWP target HUID %.8x", TARGETING::get_huid(l_proc_target)); FAPI_INVOKE_HWP(l_err, p9_io_cen_dccal, l_fapi_proc_target); // process return code. if ( l_err ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: p9_io_cen_dccal HWP on target HUID %.8x", l_err->reasonCode(), TARGETING::get_huid(l_proc_target) ); // capture the target data in the elog ErrlUserDetailsTarget(l_proc_target).addToLog( l_err ); // Create IStep error log and cross reference to error that occurred io_istepError.addErrorDetails( l_err ); // Commit Error errlCommit( l_err, ISTEP_COMP_ID ); } else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : p9_io_cen_dccal HWP on target HUID %.8x", TARGETING::get_huid(l_proc_target) ); } } }
void axone_dccal_setup(IStepError & io_istepError) { errlHndl_t l_err = nullptr; TargetHandleList l_omic_target_list; getAllChiplets(l_omic_target_list, TYPE_OMIC); for (const auto & l_omic_target : l_omic_target_list) { // call the HWP with each target fapi2::Target<fapi2::TARGET_TYPE_OMIC> l_fapi_omic_target (l_omic_target); TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "p9a_io_omi_scominit HWP target HUID %.8x", get_huid(l_omic_target)); FAPI_INVOKE_HWP(l_err, p9a_io_omi_scominit, l_fapi_omic_target); // process return code. if ( l_err ) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: p9a_io_omi_scominit HWP on target HUID %.8x", l_err->reasonCode(), TARGETING::get_huid(l_omic_target) ); // capture the target data in the elog ErrlUserDetailsTarget(l_omic_target).addToLog( l_err ); // Create IStep error log and cross reference to error that occurred io_istepError.addErrorDetails( l_err ); // Commit Error errlCommit( l_err, ISTEP_COMP_ID ); } else { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : p9a_io_omi_scominit HWP on target HUID %.8x", TARGETING::get_huid(l_omic_target) ); } TargetHandleList l_omi_target_list; getChildOmiTargetsByState(l_omi_target_list, l_omic_target, CLASS_UNIT, TYPE_OMI, UTIL_FILTER_FUNCTIONAL); uint32_t l_laneVector = 0x00000000; for(const auto & l_omi_target : l_omi_target_list) { // The OMI dc calibration HWP requires us to pass in the OMIC target // and then a bit mask representing which positon of OMI we are calibrating. // To get the position of the OMI relative to its parent OMIC, look up // ATTR_OMI_DL_GROUP_POS then shift the POS_0_VECTOR = 0x000000FF by 1 byte to the left // for every position away from 0 OMI_DL_GROUP_POS is. // Therefore // POS_0_VECTOR = 0x000000FF // POS_1_VECTOR = 0x0000FF00 // POS_2_VECTOR = 0x00FF0000 l_laneVector |= POS_0_VECTOR << (l_omi_target->getAttr<ATTR_OMI_DL_GROUP_POS>() * BITS_PER_BYTE); } TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "p9a_io_omi_dccal HWP target HUID %.8x with lane vector 0x%x", TARGETING::get_huid(l_omic_target), l_laneVector); FAPI_INVOKE_HWP(l_err, p9a_io_omi_dccal, l_fapi_omic_target, l_laneVector); // process return code. if ( l_err ) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: p9a_io_omi_dccal HWP on target HUID %.8x with lane vector 0x%x", l_err->reasonCode(), TARGETING::get_huid(l_omic_target), l_laneVector); // capture the target data in the elog ErrlUserDetailsTarget(l_omic_target).addToLog( l_err ); l_err->collectTrace("ISTEPS_TRACE", 256); // Create IStep error log and cross reference to error that occurred io_istepError.addErrorDetails( l_err ); // Commit Error errlCommit( l_err, ISTEP_COMP_ID ); } else { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : p9a_io_omi_dccal HWP on target HUID %.8x with lane vector 0x%x", TARGETING::get_huid(l_omic_target), l_laneVector ); } } }
void* call_mss_power_cleanup (void *io_pArgs) { errlHndl_t l_err = NULL; IStepError l_stepError; TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_power_cleanup entry" ); TARGETING::TargetHandleList l_mcbistTargetList; getAllChiplets(l_mcbistTargetList, TYPE_MCBIST); for (const auto & l_target : l_mcbistTargetList) { // Dump current run on target TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Running mss_power_cleanup HWP on " "target HUID %.8X", TARGETING::get_huid(l_target)); fapi2::Target <fapi2::TARGET_TYPE_MCBIST> l_fapi_target (l_target); // call the HWP with each fapi2::Target FAPI_INVOKE_HWP(l_err, p9_mss_power_cleanup, l_fapi_target); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: mss_power_cleanup HWP returns error", l_err->reasonCode()); // capture the target data in the elog ErrlUserDetailsTarget(l_target).addToLog(l_err); // Create IStep error log and cross reference to error that // occurred l_stepError.addErrorDetails( l_err ); // Commit Error errlCommit( l_err, HWPF_COMP_ID ); } else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : mss_power_cleanup HWP( )" ); } } // -- Cumulus only // Get a list of all present Centaurs TargetHandleList l_presCentaurs; getChipResources(l_presCentaurs, TYPE_MEMBUF, UTIL_FILTER_PRESENT); // For each present Centaur for (TargetHandleList::const_iterator l_cenIter = l_presCentaurs.begin(); l_cenIter != l_presCentaurs.end(); ++l_cenIter) { // Make a local copy of the target for ease of use TARGETING::Target * l_pCentaur = *l_cenIter; // Retrieve HUID of current Centaur TARGETING::ATTR_HUID_type l_currCentaurHuid = TARGETING::get_huid(l_pCentaur); // Find all present MBAs associated with this Centaur TARGETING::TargetHandleList l_presMbas; getChildAffinityTargetsByState(l_presMbas, l_pCentaur, CLASS_UNIT, TYPE_MBA, UTIL_FILTER_PRESENT); // If not at least two MBAs found if (l_presMbas.size() < 2) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "Not enough MBAs found for Centaur target HUID %.8X, " "skipping this Centaur.", l_currCentaurHuid); continue; } // Cache current MBA HUIDs for tracing TARGETING::ATTR_HUID_type l_currMBA0Huid = TARGETING::get_huid(l_presMbas[0]); TARGETING::ATTR_HUID_type l_currMBA1Huid = TARGETING::get_huid(l_presMbas[1]); TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "Running mss_power_cleanup HWP on " "Centaur HUID %.8X, MBA0 HUID %.8X, " "MBA1 HUID %.8X, ", l_currCentaurHuid, l_currMBA0Huid, l_currMBA1Huid); // Create FAPI Targets. fapi2::Target<fapi2::TARGET_TYPE_MEMBUF_CHIP> l_fapiCentaurTarget( l_pCentaur ); fapi2::Target<fapi2::TARGET_TYPE_MBA_CHIPLET> l_fapiMba0Target( l_presMbas[0] ); fapi2::Target<fapi2::TARGET_TYPE_MBA_CHIPLET> l_fapiMba1Target( l_presMbas[1] ); // Call the HWP with each fapi::Target FAPI_INVOKE_HWP(l_err, p9c_mss_power_cleanup, l_fapiCentaurTarget, l_fapiMba0Target, l_fapiMba1Target); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "mss_power_cleanup HWP failed to perform" " cleanup on centaur: 0x%.8X HWP_ERROR: 0x%.8X", l_currCentaurHuid,l_err->reasonCode()); // Capture the target data in the error log ErrlUserDetailsTarget(l_pCentaur).addToLog(l_err); // Create IStep error log and cross reference error that occurred l_stepError.addErrorDetails(l_err); // Commit error errlCommit(l_err, HWPF_COMP_ID); } else { // Success TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "Successfully ran mss_power_cleanup HWP on " "Centaur HUID %.8X, MBA0 HUID %.8X, " "MBA1 HUID %.8X, ", l_currCentaurHuid, l_currMBA0Huid, l_currMBA1Huid); } } TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_power_cleanup exit" ); // end task, returning any errorlogs to IStepDisp return l_stepError.getErrorHandle(); }