/* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ /* $Source: src/usr/hwpf/hwp/dram_training/dram_training.C $ */ /* */ /* OpenPOWER HostBoot Project */ /* */ /* Contributors Listed Below - COPYRIGHT 2012,2015 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ /* You may obtain a copy of the License at */ /* */ /* http://www.apache.org/licenses/LICENSE-2.0 */ /* */ /* Unless required by applicable law or agreed to in writing, software */ /* distributed under the License is distributed on an "AS IS" BASIS, */ /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ /* implied. See the License for the specific language governing */ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ /** * @file dram_training.C * * Support file for IStep: dram_training * Step 13 DRAM Training * * HWP_IGNORE_VERSION_CHECK * */ /******************************************************************************/ // Includes /******************************************************************************/ #include #include #include #include #include // targeting support #include #include #include #include #include // fapi support #include #include //hb vddr support #include "platform_vddr.H" #include // Run on all Centaurs/MBAs, but needs to keep this one handy in case we // want to limit them in VPO const uint8_t UNLIMITED_RUN = 0xFF; const uint8_t VPO_NUM_OF_MBAS_TO_RUN = UNLIMITED_RUN; const uint8_t VPO_NUM_OF_MEMBUF_TO_RUN = UNLIMITED_RUN; // -- prototype includes -- #include "dram_training.H" #include "mem_pll_setup/cen_mem_pll_initf.H" #include "mem_pll_setup/cen_mem_pll_setup.H" #include "mem_startclocks/cen_mem_startclocks.H" #include "mss_scominit/mss_scominit.H" #include "mss_ddr_phy_reset/mss_ddr_phy_reset.H" #include "mss_draminit/mss_draminit.H" #include "mss_draminit_training/mss_draminit_training.H" #include "mss_draminit_trainadv/mss_draminit_training_advanced.H" #include "mss_draminit_mc/mss_draminit_mc.H" #include "proc_throttle_sync.H" #include "../mc_config/mc_config.H" namespace DRAM_TRAINING { using namespace ISTEP; using namespace ISTEP_ERROR; using namespace ERRORLOG; using namespace TARGETING; using namespace fapi; // // Wrapper function to call host_disable_vddr // void* call_host_disable_vddr( void *io_pArgs ) { errlHndl_t l_err = NULL; IStepError l_StepError; TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace, ENTER_MRK"call_host_disable_vddr"); // This function has Compile-time binding for desired platform l_err = platform_disable_vddr(); if(l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: call_host_disable_vddr returns error", l_err->reasonCode()); // Create IStep error log and cross reference to error that occurred l_StepError.addErrorDetails( l_err ); errlCommit( l_err, HWPF_COMP_ID ); } TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, EXIT_MRK"call_host_disable_vddr"); return l_StepError.getErrorHandle(); } // // Wrapper function to call mem_pll_initf // void* call_mem_pll_initf( void *io_pArgs ) { errlHndl_t l_err = NULL; IStepError l_StepError; TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mem_pll_initf entry" ); // Get all Centaur targets TARGETING::TargetHandleList l_membufTargetList; getAllChips(l_membufTargetList, TYPE_MEMBUF); 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_membuf_iter; TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Running cen_mem_pll_initf 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, (const_cast(l_pCentaur))); // call cen_mem_pll_initf to do pll init FAPI_INVOKE_HWP(l_err, cen_mem_pll_initf, l_fapi_centaur); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: cen_mem_pll_initf HWP returns error", l_err->reasonCode()); // capture the target data in the elog ErrlUserDetailsTarget(l_pCentaur).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: cen_mem_pll_initf HWP( )" ); } } TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mem_pll_initf exit" ); return l_StepError.getErrorHandle(); } // // Wrapper function to call mem_pll_setup // void* call_mem_pll_setup( void *io_pArgs ) { errlHndl_t l_err = NULL; IStepError l_StepError; TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mem_pll_setup entry" ); // Get all Centaur targets TARGETING::TargetHandleList l_membufTargetList; getAllChips(l_membufTargetList, TYPE_MEMBUF); 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_membuf_iter; TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "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, (const_cast(l_pCentaur))); // call cen_mem_pll_setup to verify lock FAPI_INVOKE_HWP(l_err, cen_mem_pll_setup, l_fapi_centaur); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: mem_pll_setup HWP returns error", l_err->reasonCode()); // capture the target data in the elog ErrlUserDetailsTarget(l_pCentaur).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: mem_pll_setup HWP( )" ); } } TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mem_pll_setup exit" ); return l_StepError.getErrorHandle(); } // // Wrapper function to call mem_startclocks // void* call_mem_startclocks( void *io_pArgs ) { errlHndl_t l_err = NULL; IStepError l_StepError; TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace,"call_mem_startclocks entry" ); // Get all Centaur targets TARGETING::TargetHandleList l_membufTargetList; getAllChips(l_membufTargetList, TYPE_MEMBUF); 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_membuf_iter; // Dump current run on target TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "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, (const_cast(l_pCentaur)) ); // call the HWP with each fapi::Target FAPI_INVOKE_HWP(l_err, cen_mem_startclocks, l_fapi_centaur); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: cen_mem_startclocks HWP returns error", l_err->reasonCode()); // capture the target data in the elog ErrlUserDetailsTarget(l_pCentaur).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 : cen_mem_startclocks HWP( )" ); } } TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mem_startclocks exit" ); return l_StepError.getErrorHandle(); } // // Wrapper function to call host_enable_vddr // void* call_host_enable_vddr( void *io_pArgs ) { TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, ENTER_MRK"call_host_enable_vddr" ); errlHndl_t l_err = NULL; IStepError l_StepError; // This fuction has compile-time binding for different platforms l_err = platform_enable_vddr(); if( l_err ) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: call_host_enable_vddr returns error", l_err->reasonCode()); l_StepError.addErrorDetails( 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 ); } TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, EXIT_MRK"call_host_enable_vddr" ); return l_StepError.getErrorHandle(); } // // Wrapper function to call mss_scominit // void* call_mss_scominit( void *io_pArgs ) { errlHndl_t l_err = NULL; IStepError l_stepError; TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_scominit entry" ); do { // Get all Centaur targets TARGETING::TargetHandleList l_membufTargetList; getAllChips(l_membufTargetList, TYPE_MEMBUF); 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_membuf_iter; // Dump current run on target TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "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, (const_cast(l_pCentaur)) ); // call the HWP with each fapi::Target FAPI_INVOKE_HWP(l_err, mss_scominit, l_fapi_centaur); if (l_err) { 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); // 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_scominit HWP( )" ); } } if (!l_stepError.isNull()) { break; } // Run proc throttle sync // Get all functional proc chip targets TARGETING::TargetHandleList l_cpuTargetList; getAllChips(l_cpuTargetList, TYPE_PROC); for (TARGETING::TargetHandleList::const_iterator l_cpuIter = l_cpuTargetList.begin(); l_cpuIter != l_cpuTargetList.end(); ++l_cpuIter) { const TARGETING::Target* l_pTarget = *l_cpuIter; fapi::Target l_fapiproc_target( TARGET_TYPE_PROC_CHIP, (const_cast(l_pTarget))); TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Running proc_throttle_sync HWP on " "target HUID %.8X", TARGETING::get_huid(l_pTarget)); // Call proc_throttle_sync FAPI_INVOKE_HWP( l_err, proc_throttle_sync, l_fapiproc_target ); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: proc_throttle_sync HWP returns error", l_err->reasonCode()); // Capture the target data in the elog ErrlUserDetailsTarget(l_pTarget).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 : proc_throttle_sync HWP( )" ); } } } while (0); TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_scominit exit" ); return l_stepError.getErrorHandle(); } // // Wrapper function to call mss_ddr_phy_reset // void* call_mss_ddr_phy_reset( void *io_pArgs ) { errlHndl_t l_err = NULL; IStepError l_stepError; TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_ddr_phy_reset 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 = l_mbaTargetList.size(); if (TARGETING::is_vpo() && (VPO_NUM_OF_MBAS_TO_RUN < l_mbaLimit)) { l_mbaLimit = VPO_NUM_OF_MBAS_TO_RUN; } 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 " "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, (const_cast(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", l_err->reasonCode()); // capture the target data in the elog ErrlUserDetailsTarget(l_mba_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 : call_mss_ddr_phy_reset HWP( )" ); } } // end l_mbaNum loop TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_ddr_phy_reset exit" ); return l_stepError.getErrorHandle(); } // // Wrapper function to call mss_post_draminit // void mss_post_draminit( IStepError & l_stepError ) { errlHndl_t l_err = NULL; bool rerun_vddr = false; do { TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "mss_post_draminit entry" ); set_eff_config_attrs_helper(MC_CONFIG::POST_DRAM_INIT, rerun_vddr); if ( rerun_vddr == false ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "mss_post_draminit: nothing to do" ); break; } // Call mss_volt_vddr_offset to recalculate VDDR voltage l_err = MC_CONFIG::setMemoryVoltageDomainOffsetVoltage< TARGETING::ATTR_MSS_VOLT_VDDR_OFFSET_DISABLE, TARGETING::ATTR_MEM_VDDR_OFFSET_MILLIVOLTS, TARGETING::ATTR_VMEM_ID>(); if(l_err) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "mss_post_draminit: " "ERROR 0x%08X: setMemoryVoltageDomainOffsetVoltage for VDDR domain", l_err->reasonCode()); l_stepError.addErrorDetails(l_err); errlCommit(l_err,HWPF_COMP_ID); break; } else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "mss_post_draminit: mss_volt_vddr_offset(): SUCCESS"); } // Call HWSV to call POWR code // This fuction has compile-time binding for different platforms l_err = platform_adjust_vddr_post_dram_init(); if( l_err ) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: mss_post_draminit: " "platform_adjust_vddr_post_dram_init() returns error", l_err->reasonCode()); // Create IStep error log and cross reference to error that occurred l_stepError.addErrorDetails( l_err ); // Commit Error errlCommit( l_err, HWPF_COMP_ID ); } } while(0); TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "mss_post_draminit exit" ); return; } // // Wrapper function to call mss_draminit // void* call_mss_draminit( void *io_pArgs ) { errlHndl_t l_err = NULL; IStepError l_stepError; TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_draminit 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 = l_mbaTargetList.size(); if (TARGETING::is_vpo() && (VPO_NUM_OF_MBAS_TO_RUN < l_mbaLimit)) { l_mbaLimit = VPO_NUM_OF_MBAS_TO_RUN; } 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 " "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, (const_cast(l_mba_target)) ); // call the HWP with each fapi::Target FAPI_INVOKE_HWP(l_err, mss_draminit, l_fapi_mba_target); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : mss_draminit HWP returns error", l_err->reasonCode()); // capture the target data in the elog ErrlUserDetailsTarget(l_mba_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_draminit HWP( )" ); } } // endfor mba's // call POST_DRAM_INIT function if(INITSERVICE::spBaseServicesEnabled()) { mss_post_draminit(l_stepError); } TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_draminit exit" ); return l_stepError.getErrorHandle(); } // // Wrapper function to call mss_draminit_training // void* call_mss_draminit_training( void *io_pArgs ) { errlHndl_t l_err = NULL; IStepError l_stepError; TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_draminit_training 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 = l_mbaTargetList.size(); if (TARGETING::is_vpo() && (VPO_NUM_OF_MBAS_TO_RUN < l_mbaLimit)) { l_mbaLimit = VPO_NUM_OF_MBAS_TO_RUN; } 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 " "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, (const_cast(l_mba_target)) ); // call the HWP with each fapi::Target FAPI_INVOKE_HWP(l_err, mss_draminit_training, l_fapi_mba_target); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : mss_draminit_training HWP returns error", l_err->reasonCode()); // capture the target data in the elog ErrlUserDetailsTarget(l_mba_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_draminit_training HWP( )" ); } } TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_draminit_training exit" ); return l_stepError.getErrorHandle(); } // // Wrapper function to call mss_draminit_trainadv // void* call_mss_draminit_trainadv( void *io_pArgs ) { errlHndl_t l_err = NULL; IStepError l_stepError; 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 = l_mbaTargetList.size(); if (TARGETING::is_vpo() && (VPO_NUM_OF_MBAS_TO_RUN < l_mbaLimit)) { l_mbaLimit = VPO_NUM_OF_MBAS_TO_RUN; } 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_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, (const_cast(l_mba_target)) ); // call the HWP with each fapi::Target FAPI_INVOKE_HWP(l_err, mss_draminit_training_advanced, l_fapi_mba_target); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : mss_draminit_training_advanced HWP returns error", l_err->reasonCode()); // capture the target data in the elog ErrlUserDetailsTarget(l_mba_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 ); } TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : mss_draminit_training_advanced HWP( )" ); } TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_draminit_trainadv exit" ); return l_stepError.getErrorHandle(); } // // Wrapper function to call mss_draminit_mc // void* call_mss_draminit_mc( void *io_pArgs ) { errlHndl_t l_err = NULL; IStepError l_stepError; TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,"call_mss_draminit_mc entry" ); // Get all centaur targets TARGETING::TargetHandleList l_mBufTargetList; getAllChips(l_mBufTargetList, TYPE_MEMBUF); // Limit the number of MBAs to run in VPO environment to save time. 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; } 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 " "target HUID %.8X", TARGETING::get_huid(l_membuf_target)); // Cast to a fapi target fapi::Target l_fapi_membuf_target( TARGET_TYPE_MEMBUF_CHIP, (const_cast(l_membuf_target)) ); // call the HWP with each fapi::Target FAPI_INVOKE_HWP(l_err, mss_draminit_mc, l_fapi_membuf_target); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : mss_draminit_mc HWP returns error", l_err->reasonCode()); // 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, HWPF_COMP_ID ); } else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : mss_draminit_mc HWP( )" ); } } // End; memBuf loop TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_draminit_mc exit" ); return l_stepError.getErrorHandle(); } // // Wrapper function to call mss_dimm_power_test // void* call_mss_dimm_power_test( void *io_pArgs ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_dimm_power_test entry" ); // This istep is a place holder TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_dimm_power_test exit" ); return NULL; } }; // end namespace