diff options
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/isteps/istep13/call_mem_pll_initf.C | 44 | ||||
-rw-r--r-- | src/usr/isteps/istep13/call_mem_pll_setup.C | 43 | ||||
-rw-r--r-- | src/usr/isteps/istep13/call_mem_startclocks.C | 35 | ||||
-rw-r--r-- | src/usr/isteps/istep13/call_mss_ddr_phy_reset.C | 47 | ||||
-rw-r--r-- | src/usr/isteps/istep13/call_mss_draminit.C | 49 | ||||
-rw-r--r-- | src/usr/isteps/istep13/call_mss_draminit_mc.C | 46 | ||||
-rw-r--r-- | src/usr/isteps/istep13/call_mss_draminit_trainadv.C | 47 | ||||
-rw-r--r-- | src/usr/isteps/istep13/call_mss_draminit_training.C | 48 | ||||
-rw-r--r-- | src/usr/isteps/istep13/call_mss_scominit.C | 74 | ||||
-rw-r--r-- | src/usr/isteps/istep13/call_proc_mcs_skewadjust.C | 61 | ||||
-rw-r--r-- | src/usr/isteps/istep13/makefile | 37 |
11 files changed, 294 insertions, 237 deletions
diff --git a/src/usr/isteps/istep13/call_mem_pll_initf.C b/src/usr/isteps/istep13/call_mem_pll_initf.C index bbeb93e83..a59ac129b 100644 --- a/src/usr/isteps/istep13/call_mem_pll_initf.C +++ b/src/usr/isteps/istep13/call_mem_pll_initf.C @@ -5,8 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ -/* [+] Google Inc. */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -29,10 +28,17 @@ #include <isteps/hwpisteperror.H> #include <initservice/isteps_trace.H> +//HWP Invoker +#include <fapi2/plat_hwp_invoker.H> + // targeting support #include <targeting/common/commontargeting.H> #include <targeting/common/util.H> #include <targeting/common/utilFilter.H> +#include <fapi2/target.H> + +//From Import Directory (EKB Repository) +#include <p9_mem_pll_initf.H> using namespace ERRORLOG; using namespace ISTEP; @@ -48,38 +54,30 @@ void* call_mem_pll_initf (void *io_pArgs) 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); + // Get all Proc targets + TARGETING::TargetHandleList l_procTargetList; + getAllChips(l_procTargetList, TYPE_PROC); - for (TargetHandleList::const_iterator - l_membuf_iter = l_membufTargetList.begin(); - l_membuf_iter != l_membufTargetList.end(); - ++l_membuf_iter) + for (const auto & l_procChip: l_procTargetList) { - // 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)); + "Running p9_mem_pll_initf HWP on " + "target HUID %.8X", TARGETING::get_huid(l_procChip)); - //@TODO RTC:133831 use fapi2 targets - // Cast to a FAPI type of target. - //const fapi::Target l_fapi_centaur( TARGET_TYPE_MEMBUF_CHIP, - // (const_cast<TARGETING::Target*>(l_pCentaur))); + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> + l_fapi2_procChip( l_procChip); - //call cen_mem_pll_initf to do pll init - //FAPI_INVOKE_HWP(l_err, cen_mem_pll_initf, l_fapi_centaur); + //call cen_mem_pll_initf to do pll l_fapi2_memChip + FAPI_INVOKE_HWP(l_err, p9_mem_pll_initf, l_fapi2_procChip); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%.8X: cen_mem_pll_initf HWP returns error", + "ERROR 0x%.8X: p9_mem_pll_initf HWP returns error", l_err->reasonCode()); // capture the target data in the elog - ErrlUserDetailsTarget(l_pCentaur).addToLog(l_err ); + ErrlUserDetailsTarget(l_procChip).addToLog(l_err ); //Create IStep error log and cross reference to error that occurred l_StepError.addErrorDetails(l_err); @@ -90,7 +88,7 @@ void* call_mem_pll_initf (void *io_pArgs) else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS: cen_mem_pll_initf HWP( )" ); + "SUCCESS: p9_mem_pll_initf HWP( )" ); } } diff --git a/src/usr/isteps/istep13/call_mem_pll_setup.C b/src/usr/isteps/istep13/call_mem_pll_setup.C index 3e5715cc7..9b1143f5b 100644 --- a/src/usr/isteps/istep13/call_mem_pll_setup.C +++ b/src/usr/isteps/istep13/call_mem_pll_setup.C @@ -5,8 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ -/* [+] Google Inc. */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -29,10 +28,18 @@ #include <isteps/hwpisteperror.H> #include <initservice/isteps_trace.H> +//HWP Invoker +#include <fapi2/plat_hwp_invoker.H> + // targeting support #include <targeting/common/commontargeting.H> #include <targeting/common/util.H> #include <targeting/common/utilFilter.H> +#include <fapi2/target.H> + +//From Import Directory (EKB Repository) +#include <p9_mem_pll_setup.H> + using namespace ERRORLOG; using namespace ISTEP; @@ -49,37 +56,31 @@ void* call_mem_pll_setup (void *io_pArgs) 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); + // Get all Proc targets + TARGETING::TargetHandleList l_procTargetList; + getAllChips(l_procTargetList, TYPE_PROC); - for (TargetHandleList::const_iterator - l_membuf_iter = l_membufTargetList.begin(); - l_membuf_iter != l_membufTargetList.end(); - ++l_membuf_iter) + for (const auto & l_procChip: l_procTargetList) { - // 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)); - - //@TODO RTC:133831 Cast to a FAPI type of target. - //const fapi::Target l_fapi_centaur( TARGET_TYPE_MEMBUF_CHIP, - // (const_cast<TARGETING::Target*>(l_pCentaur))); + "Running p9_mem_pll_setup HWP on " + "target HUID %.8X", TARGETING::get_huid(l_procChip)); + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> + l_fapi2_procChip( l_procChip); +//@TODO RTC:152210 Enable Istep 13 HWPs that are waiting on mirrored files //call cen_mem_pll_setup to verify lock - //FAPI_INVOKE_HWP(l_err, cen_mem_pll_setup, l_fapi_centaur); +// FAPI_INVOKE_HWP(l_err, p9_mem_pll_setup, l_fapi2_procChip); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%.8X: mem_pll_setup HWP returns error", + "ERROR 0x%.8X: p9_mem_pll_setup HWP returns error", l_err->reasonCode()); // capture the target data in the elog - ErrlUserDetailsTarget(l_pCentaur).addToLog(l_err); + ErrlUserDetailsTarget(l_procChip).addToLog(l_err); //Create IStep error log and cross reference to error that occurred l_StepError.addErrorDetails(l_err); @@ -90,7 +91,7 @@ void* call_mem_pll_setup (void *io_pArgs) else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS: mem_pll_setup HWP( )" ); + "SUCCESS: p9_mem_pll_setup HWP( )" ); } } diff --git a/src/usr/isteps/istep13/call_mem_startclocks.C b/src/usr/isteps/istep13/call_mem_startclocks.C index 47ed80a6a..f83dbf192 100644 --- a/src/usr/isteps/istep13/call_mem_startclocks.C +++ b/src/usr/isteps/istep13/call_mem_startclocks.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -28,10 +28,19 @@ #include <isteps/hwpisteperror.H> #include <initservice/isteps_trace.H> +//HWP Invoker +#include <fapi2/plat_hwp_invoker.H> + + // targeting support #include <targeting/common/commontargeting.H> #include <targeting/common/util.H> #include <targeting/common/utilFilter.H> +#include <fapi2/target.H> + +//From Import Directory (EKB Repository) +#include <p9_mem_startclocks.H> + using namespace ERRORLOG; using namespace ISTEP; @@ -49,28 +58,22 @@ void* call_mem_startclocks (void *io_pArgs) TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace,"call_mem_startclocks entry" ); // Get all Centaur targets - TARGETING::TargetHandleList l_membufTargetList; - getAllChips(l_membufTargetList, TYPE_MEMBUF); + TARGETING::TargetHandleList l_procTargetList; + getAllChips(l_procTargetList, TYPE_PROC); - for (TargetHandleList::const_iterator - l_membuf_iter = l_membufTargetList.begin(); - l_membuf_iter != l_membufTargetList.end(); - ++l_membuf_iter) + for (const auto & l_procChip: l_procTargetList) { - // 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)); + "target HUID %.8X", TARGETING::get_huid(l_procChip)); - //@TODO RTC:133831 Cast to a FAPI type of target. - //const fapi::Target l_fapi_centaur( TARGET_TYPE_MEMBUF_CHIP, - // (const_cast<TARGETING::Target*>(l_pCentaur)) ); + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> + l_fapi2_procChip( l_procChip); +//@TODO RTC:152210 Enable Istep 13 HWPs that are waiting on mirrored files // call the HWP with each fapi::Target - //FAPI_INVOKE_HWP(l_err, cen_mem_startclocks, l_fapi_centaur); +// FAPI_INVOKE_HWP(l_err, p9_mem_startclocks, l_fapi2_procChip); if (l_err) { @@ -79,7 +82,7 @@ void* call_mem_startclocks (void *io_pArgs) l_err->reasonCode()); // capture the target data in the elog - ErrlUserDetailsTarget(l_pCentaur).addToLog(l_err); + ErrlUserDetailsTarget(l_procChip).addToLog(l_err); //Create IStep error log and cross reference to error that occurred l_StepError.addErrorDetails( l_err ); diff --git a/src/usr/isteps/istep13/call_mss_ddr_phy_reset.C b/src/usr/isteps/istep13/call_mss_ddr_phy_reset.C index 27084aa4d..911109829 100644 --- a/src/usr/isteps/istep13/call_mss_ddr_phy_reset.C +++ b/src/usr/isteps/istep13/call_mss_ddr_phy_reset.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -27,6 +27,7 @@ #include <errl/errludtarget.H> #include <isteps/hwpisteperror.H> #include <initservice/isteps_trace.H> +#include <plat_trace.H> // targeting support #include <targeting/common/commontargeting.H> @@ -34,6 +35,10 @@ #include <targeting/common/utilFilter.H> #include "istep13consts.H" +#include <fapi2.H> +#include <fapi2/plat_hwp_invoker.H> +//TODO RTC:152209 Implement std::enable_if in HB +// #include <p9_mss_ddr_phy_reset.H> using namespace ERRORLOG; using namespace ISTEP; @@ -51,42 +56,30 @@ void* call_mss_ddr_phy_reset (void *io_pArgs) 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); + // Get all MCBIST targets + TARGETING::TargetHandleList l_mcbistTargetList; + getAllChiplets(l_mcbistTargetList, TYPE_MCBIST); - // 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)) + for (const auto & l_mcbist_target : l_mcbistTargetList) { - 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)); - - //@TODO RTC:133831 Cast to a FAPI type of target. - //const fapi::Target l_fapi_mba_target( TARGET_TYPE_MBA_CHIPLET, - // (const_cast<TARGETING::Target*>(l_mba_target)) ); + "Running p9_mss_ddr_phy_reset HWP on " + "target HUID %.8X", TARGETING::get_huid(l_mcbist_target)); - // call the HWP with each fapi::Target - //FAPI_INVOKE_HWP(l_err, mss_ddr_phy_reset, l_fapi_mba_target); + fapi2::Target<fapi2::TARGET_TYPE_MCBIST> l_fapi_mcbist_target + (l_mcbist_target); +//TODO RTC:152209 Implement std::enable_if in HB +// FAPI_INVOKE_HWP(l_err, p9_mss_ddr_phy_reset, l_fapi_mcbist_target); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%.8X: mss_ddr_phy_reset HWP returns error", + "ERROR 0x%.8X: p9_mss_ddr_phy_reset HWP returns error", l_err->reasonCode()); // capture the target data in the elog - ErrlUserDetailsTarget(l_mba_target).addToLog( l_err ); + ErrlUserDetailsTarget(l_mcbist_target).addToLog( l_err ); // Create IStep error log and cross reference to error that occurred l_stepError.addErrorDetails( l_err ); @@ -97,9 +90,9 @@ void* call_mss_ddr_phy_reset (void *io_pArgs) else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : call_mss_ddr_phy_reset HWP( )" ); + "SUCCESS : p9_mss_ddr_phy_reset HWP( )" ); } - } // end l_mbaNum loop + } // end l_mcbistNum loop TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_ddr_phy_reset exit" ); diff --git a/src/usr/isteps/istep13/call_mss_draminit.C b/src/usr/isteps/istep13/call_mss_draminit.C index fa5485739..9c1e9c04d 100644 --- a/src/usr/isteps/istep13/call_mss_draminit.C +++ b/src/usr/isteps/istep13/call_mss_draminit.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -28,6 +28,7 @@ #include <isteps/hwpisteperror.H> #include <initservice/isteps_trace.H> #include <initservice/initserviceif.H> +#include <plat_trace.H> // targeting support #include <targeting/common/commontargeting.H> @@ -36,6 +37,11 @@ #include "istep13consts.H" #include "platform_vddr.H" +#include <fapi2.H> +#include <fapi2/plat_hwp_invoker.H> +//TODO RTC:152209 Implement std::enable_if in HB +// #include <p9_mss_draminit.H> + using namespace ERRORLOG; using namespace ISTEP; using namespace ISTEP_ERROR; @@ -53,7 +59,7 @@ void mss_post_draminit( IStepError & l_stepError ) TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "mss_post_draminit entry" ); - //@TODO RTC: 133831. The helper function is currently commented out because + //@TODO RTC: 134081. The helper function is currently commented out because //some of the attributes don't exist. uncomment it once attribute support is //in place // set_eff_config_attrs_helper(ISTEP_07::POST_DRAM_INIT, rerun_vddr); @@ -66,7 +72,7 @@ void mss_post_draminit( IStepError & l_stepError ) } // Call mss_volt_vddr_offset to recalculate VDDR voltage - // @TODO RTC: 133831 Uncomment once attribute support is in place + // @TODO RTC: 152294 Uncomment once attribute support is in place /* l_err = ISTEP_07::setMemoryVoltageDomainOffsetVoltage< TARGETING::ATTR_MSS_VOLT_VDDR_OFFSET_DISABLE, @@ -121,42 +127,31 @@ void* call_mss_draminit (void *io_pArgs) TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_draminit entry" ); - // Get all MBA targets - TARGETING::TargetHandleList l_mbaTargetList; - getAllChiplets(l_mbaTargetList, TYPE_MBA); + // Get all MCBIST targets + TARGETING::TargetHandleList l_mcbistTargetList; + getAllChiplets(l_mcbistTargetList, TYPE_MCBIST); - // 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)) + for (const auto & l_mcbist_target : l_mcbistTargetList) { - 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)); + "Running p9_mss_draminit HWP on " + "target HUID %.8X", TARGETING::get_huid(l_mcbist_target)); - //@TODO RTC:133831 Cast to a FAPI type of target. - //const fapi::Target l_fapi_mba_target( TARGET_TYPE_MBA_CHIPLET, - // (const_cast<TARGETING::Target*>(l_mba_target)) ); + fapi2::Target<fapi2::TARGET_TYPE_MCBIST> l_fapi_mcbist_target + (l_mcbist_target); - // call the HWP with each fapi::Target - //FAPI_INVOKE_HWP(l_err, mss_draminit, l_fapi_mba_target); +//TODO RTC:152209 Implement std::enable_if in HB +// FAPI_INVOKE_HWP(l_err, p9_mss_draminit, l_fapi_mcbist_target); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%.8X : mss_draminit HWP returns error", + "ERROR 0x%.8X : p9_mss_draminit HWP returns error", l_err->reasonCode()); // capture the target data in the elog - ErrlUserDetailsTarget(l_mba_target).addToLog(l_err); + ErrlUserDetailsTarget(l_mcbist_target).addToLog(l_err); // Create IStep error log and cross reference to error that occurred l_stepError.addErrorDetails( l_err ); @@ -170,7 +165,7 @@ void* call_mss_draminit (void *io_pArgs) "SUCCESS : mss_draminit HWP( )" ); } - } // endfor mba's + } // endfor mcbist's // call POST_DRAM_INIT function if(INITSERVICE::spBaseServicesEnabled()) diff --git a/src/usr/isteps/istep13/call_mss_draminit_mc.C b/src/usr/isteps/istep13/call_mss_draminit_mc.C index 68d6efd6c..45a4607b6 100644 --- a/src/usr/isteps/istep13/call_mss_draminit_mc.C +++ b/src/usr/isteps/istep13/call_mss_draminit_mc.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -34,6 +34,13 @@ #include <targeting/common/utilFilter.H> #include "istep13consts.H" +#include <config.h> +#include <fapi2.H> +#include <fapi2/plat_hwp_invoker.H> +//TODO RTC:152209 Implement std::enable_if in HB +// #include <p9_mss_draminit_mc.H> + + using namespace ERRORLOG; using namespace ISTEP; using namespace ISTEP_ERROR; @@ -49,41 +56,30 @@ void* call_mss_draminit_mc (void *io_pArgs) 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; - } + // Get all MCBIST + TARGETING::TargetHandleList l_mcbistTargetList; + getAllChiplets(l_mcbistTargetList, TYPE_MCBIST); - for ( uint8_t l_mBufNum=0; l_mBufNum < l_memBufLimit; l_mBufNum++ ) + for (const auto & l_mcbist_target : l_mcbistTargetList) { - 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)); - - //@TODO RTC:133831 Cast to a fapi target - //fapi::Target l_fapi_membuf_target( TARGET_TYPE_MEMBUF_CHIP, - // (const_cast<TARGETING::Target*>(l_membuf_target)) ); + "Running p9_mss_draminit_mc HWP on " + "target HUID %.8X", TARGETING::get_huid(l_mcbist_target)); - // call the HWP with each fapi::Target - //FAPI_INVOKE_HWP(l_err, mss_draminit_mc, l_fapi_membuf_target); + fapi2::Target<fapi2::TARGET_TYPE_MCBIST> l_fapi_mcbist_target + (l_mcbist_target); +//TODO RTC:152209 Implement std::enable_if in HB +// FAPI_INVOKE_HWP(l_err, p9_mss_draminit_mc, l_fapi_mcbist_target); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%.8X : mss_draminit_mc HWP returns error", + "ERROR 0x%.8X : p9_mss_draminit_mc HWP returns error", l_err->reasonCode()); // capture the target data in the elog - ErrlUserDetailsTarget(l_membuf_target).addToLog( l_err ); + ErrlUserDetailsTarget(l_mcbist_target).addToLog( l_err ); // Create IStep error log and cross reference to error that occurred l_stepError.addErrorDetails( l_err ); @@ -94,7 +90,7 @@ void* call_mss_draminit_mc (void *io_pArgs) else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : mss_draminit_mc HWP( )" ); + "SUCCESS : p9_mss_draminit_mc HWP( )" ); } } // End; memBuf loop diff --git a/src/usr/isteps/istep13/call_mss_draminit_trainadv.C b/src/usr/isteps/istep13/call_mss_draminit_trainadv.C index 611e49e18..a27ae0f9f 100644 --- a/src/usr/isteps/istep13/call_mss_draminit_trainadv.C +++ b/src/usr/isteps/istep13/call_mss_draminit_trainadv.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -34,6 +34,9 @@ #include <targeting/common/utilFilter.H> #include "istep13consts.H" +#include <fapi2.H> +#include <fapi2/plat_hwp_invoker.H> + using namespace ERRORLOG; using namespace ISTEP; using namespace ISTEP_ERROR; @@ -47,45 +50,35 @@ void* call_mss_draminit_trainadv (void *io_pArgs) IStepError l_stepError; TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_mss_draminit_trainadv entry" ); + "call_mss_draminit_trainingadv entry" ); - // Get all MBA targets - TARGETING::TargetHandleList l_mbaTargetList; - getAllChiplets(l_mbaTargetList, TYPE_MBA); + // Get all MCBIST targets + TARGETING::TargetHandleList l_mcbistTargetList; + getAllChiplets(l_mcbistTargetList, TYPE_MCBIST); - // 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)) + for (const auto & l_mcbist_target : l_mcbistTargetList) { - 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)); + "Running p9_mss_draminit_trainingadv HWP on " + "target HUID %.8X", TARGETING::get_huid(l_mcbist_target)); - //@TODO RTC:133831 Cast to a FAPI type of target. - //const fapi::Target l_fapi_mba_target( TARGET_TYPE_MBA_CHIPLET, - // (const_cast<TARGETING::Target*>(l_mba_target)) ); + const fapi2::Target<fapi2::TARGET_TYPE_MCBIST> + l_fapi_mbcbist_target( l_mcbist_target); +//@TODO RTC:152210 Enable Istep 13 HWPs that are waiting on mirrored files // call the HWP with each fapi::Target - //FAPI_INVOKE_HWP(l_err, mss_draminit_training_advanced, - // l_fapi_mba_target); +// FAPI_INVOKE_HWP(l_err, mss_draminit_training_advanced, +// l_fapi_mbcbist_target); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%.8X : mss_draminit_training_advanced HWP returns error", + "ERROR 0x%.8X : p9_mss_draminit_trainingadv HWP returns error", l_err->reasonCode()); // capture the target data in the elog - ErrlUserDetailsTarget(l_mba_target).addToLog( l_err ); + ErrlUserDetailsTarget(l_mcbist_target).addToLog( l_err ); // Create IStep error log and cross reference to error that occurred l_stepError.addErrorDetails( l_err ); @@ -95,11 +88,11 @@ void* call_mss_draminit_trainadv (void *io_pArgs) } TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : mss_draminit_training_advanced HWP( )" ); + "SUCCESS : p9_mss_draminit_trainingadv HWP( )" ); } TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_mss_draminit_trainadv exit" ); + "call_mss_draminit_trainingadv exit" ); return l_stepError.getErrorHandle(); } diff --git a/src/usr/isteps/istep13/call_mss_draminit_training.C b/src/usr/isteps/istep13/call_mss_draminit_training.C index 28f0a879d..1fbffd540 100644 --- a/src/usr/isteps/istep13/call_mss_draminit_training.C +++ b/src/usr/isteps/istep13/call_mss_draminit_training.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -34,6 +34,13 @@ #include <targeting/common/utilFilter.H> #include "istep13consts.H" +#include <config.h> +#include <fapi2.H> +#include <fapi2/plat_hwp_invoker.H> +//TODO RTC:152209 Implement std::enable_if in HB +// #include <p9_mss_draminit_training.H> + + using namespace ERRORLOG; using namespace ISTEP; using namespace ISTEP_ERROR; @@ -50,43 +57,30 @@ void* call_mss_draminit_training (void *io_pArgs) 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; - } + // Get all MCBIST targets + TARGETING::TargetHandleList l_mcbistTargetList; + getAllChiplets(l_mcbistTargetList, TYPE_MCBIST); - for ( uint8_t l_mbaNum=0; l_mbaNum < l_mbaLimit; l_mbaNum++ ) + for (const auto & l_mcbist_target : l_mcbistTargetList) { - // 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)); - - //@TODO RTC:133831 Cast to a FAPI type of target. - //const fapi::Target l_fapi_mba_target( TARGET_TYPE_MBA_CHIPLET, - // (const_cast<TARGETING::Target*>(l_mba_target)) ); - + "Running p9_mss_draminit_training HWP on " + "target HUID %.8X", TARGETING::get_huid(l_mcbist_target)); - // call the HWP with each fapi::Target - //FAPI_INVOKE_HWP(l_err, mss_draminit_training, l_fapi_mba_target); + fapi2::Target <fapi2::TARGET_TYPE_MCBIST> l_fapi_mcbist_target + (l_mcbist_target); +//TODO RTC:152209 Implement std::enable_if in HB +// FAPI_INVOKE_HWP(l_err, p9_mss_draminit_training, l_fapi_mcbist_target); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%.8X : mss_draminit_training HWP returns error", + "ERROR 0x%.8X : p9_mss_draminit_training HWP returns error", l_err->reasonCode()); // capture the target data in the elog - ErrlUserDetailsTarget(l_mba_target).addToLog( l_err ); + ErrlUserDetailsTarget(l_mcbist_target).addToLog( l_err ); // Create IStep error log and cross reference to error that occurred l_stepError.addErrorDetails( l_err ); @@ -97,7 +91,7 @@ void* call_mss_draminit_training (void *io_pArgs) else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : mss_draminit_training HWP( )" ); + "SUCCESS : p9_mss_draminit_training HWP( )" ); } } diff --git a/src/usr/isteps/istep13/call_mss_scominit.C b/src/usr/isteps/istep13/call_mss_scominit.C index c6eaae3da..9a5898986 100644 --- a/src/usr/isteps/istep13/call_mss_scominit.C +++ b/src/usr/isteps/istep13/call_mss_scominit.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -33,6 +33,13 @@ #include <targeting/common/util.H> #include <targeting/common/utilFilter.H> +#include <config.h> +#include <fapi2.H> +#include <fapi2/plat_hwp_invoker.H> +//@TODO RTC:152210 Enable Istep 13 HWPs that are waiting on mirrored files +// #include <p9_mss_scominit.H> +#include <p9_throttle_sync.H> + using namespace ERRORLOG; using namespace ISTEP; using namespace ISTEP_ERROR; @@ -50,38 +57,32 @@ void* call_mss_scominit (void *io_pArgs) 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; + // Get all MCBIST targets + 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_scominit HWP on " - "target HUID %.8X", TARGETING::get_huid(l_pCentaur)); + "Running p9_mss_scominit HWP on " + "target HUID %.8X", + TARGETING::get_huid(l_target)); - //@TODO RTC:133831 Cast to a FAPI type of target. - //const fapi::Target l_fapi_centaur( TARGET_TYPE_MEMBUF_CHIP, - // (const_cast<TARGETING::Target*>(l_pCentaur)) ); - - // call the HWP with each fapi::Target - //FAPI_INVOKE_HWP(l_err, mss_scominit, l_fapi_centaur); + fapi2::Target <fapi2::TARGET_TYPE_MCBIST> l_fapi_target + (l_target); + //@TODO RTC:152210 Enable Istep 13 HWPs that are waiting on mirrored files + // call the HWP with each fapi2::Target +// FAPI_INVOKE_HWP(l_err, p9_mss_scominit, l_fapi_target); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%.8X: mss_scominit HWP returns error", + "ERROR 0x%.8X: p9_mss_scominit HWP returns error", l_err->reasonCode()); // capture the target data in the elog - ErrlUserDetailsTarget(l_pCentaur).addToLog(l_err); + ErrlUserDetailsTarget(l_target).addToLog(l_err); // Create IStep error log and cross reference to error that // occurred @@ -93,7 +94,7 @@ void* call_mss_scominit (void *io_pArgs) else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : mss_scominit HWP( )" ); + "SUCCESS : p9_mss_scominit HWP( )" ); } } if (!l_stepError.isNull()) @@ -106,31 +107,27 @@ void* call_mss_scominit (void *io_pArgs) 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) + for (const auto & l_procChip: l_cpuTargetList) { - const TARGETING::Target* l_pTarget = *l_cpuIter; - //@TODO RTC:133831 - //fapi::Target l_fapiproc_target( TARGET_TYPE_PROC_CHIP, - // (const_cast<TARGETING::Target*>(l_pTarget))); + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> + l_fapi_cpu_target(l_procChip); - //TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - // "Running proc_throttle_sync HWP on " - // "target HUID %.8X", TARGETING::get_huid(l_pTarget)); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running p9_throttle_sync HWP on " + "target HUID %.8X", TARGETING::get_huid(l_procChip)); +//@TODO RTC:152210 Enable Istep 13 HWPs that are waiting on mirrored files // Call proc_throttle_sync - //FAPI_INVOKE_HWP( l_err, proc_throttle_sync, l_fapiproc_target ); +// FAPI_INVOKE_HWP( l_err, p9_throttle_sync, l_fapi_cpu_target ); if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%.8X: proc_throttle_sync HWP returns error", + "ERROR 0x%.8X: p9_throttle_sync HWP returns error", l_err->reasonCode()); // Capture the target data in the elog - ErrlUserDetailsTarget(l_pTarget).addToLog(l_err); + ErrlUserDetailsTarget(l_procChip).addToLog(l_err); // Create IStep error log and cross reference // to error that occurred @@ -142,14 +139,13 @@ void* call_mss_scominit (void *io_pArgs) else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : proc_throttle_sync HWP( )" ); + "SUCCESS : p9_throttle_sync HWP( )" ); } } } while (0); TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_scominit exit" ); - return l_stepError.getErrorHandle(); } diff --git a/src/usr/isteps/istep13/call_proc_mcs_skewadjust.C b/src/usr/isteps/istep13/call_proc_mcs_skewadjust.C index 3f99ffbb8..5d105cc8e 100644 --- a/src/usr/isteps/istep13/call_proc_mcs_skewadjust.C +++ b/src/usr/isteps/istep13/call_proc_mcs_skewadjust.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -23,6 +23,21 @@ /* */ /* IBM_PROLOG_END_TAG */ #include <errl/errlentry.H> +#include <errl/errluserdetails.H> +#include <errl/errludtarget.H> +#include <errl/errlmanager.H> +#include <isteps/hwpisteperror.H> +#include <initservice/isteps_trace.H> + +//HWP Invoker +#include <fapi2/plat_hwp_invoker.H> + +//Targeting Support +#include <targeting/common/utilFilter.H> +#include <fapi2/target.H> + +//From Import Directory (EKB Repository) +#include <p9_mem_skewadjust.H> using namespace ERRORLOG; @@ -30,9 +45,47 @@ namespace ISTEP_13 { void* call_proc_mcs_skewadjust (void *io_pArgs) { - errlHndl_t l_err = NULL; - //@TODO RTC:133831 call p9_mem_skewadjust.C HWP - return l_err; + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_mcs_skewadjust entry" ); + ISTEP_ERROR::IStepError l_StepError; + errlHndl_t l_errl = NULL; + do { + //Use targeting code to get a list of all proc chiplets + TARGETING::TargetHandleList l_procChiplets; + getAllChiplets( l_procChiplets, TARGETING::TYPE_PROC ); + + for (const auto & l_procChiplet: l_procChiplets) + { + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> + l_fapi_proc_target(l_procChiplet); + + // Dump current run on target + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running p9_mem_skewadjust HWP on " + "target HUID %.8X", TARGETING::get_huid(l_procChiplet)); + + // call p9_mem_skewadjust.C HWP + FAPI_INVOKE_HWP( l_errl, + p9_mem_skewadjust, + l_fapi_proc_target); + + if(l_errl) + { + ErrlUserDetailsTarget(l_procChiplet).addToLog(l_errl); + l_StepError.addErrorDetails( l_errl ); + errlCommit( l_errl, HWPF_COMP_ID ); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "p9_mem_skewadjust:: failed on mcs with HUID : %d",TARGETING::get_huid(l_procChiplet) ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : p9_mem_skewadjust HWP( )" ); + } + } + }while(0); + + // end task, returning any errorlogs to IStepDisp + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_mcs_skewadjust exit" ); + return l_StepError.getErrorHandle(); } }; diff --git a/src/usr/isteps/istep13/makefile b/src/usr/isteps/istep13/makefile index 8752ac179..3893af978 100644 --- a/src/usr/isteps/istep13/makefile +++ b/src/usr/isteps/istep13/makefile @@ -5,7 +5,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2015 +# Contributors Listed Below - COPYRIGHT 2015,2016 # [+] International Business Machines Corp. # # @@ -25,6 +25,20 @@ ROOTPATH = ../../../.. MODULE = istep13 +PROCEDURES_PATH = ${ROOTPATH}/src/import/chips/p9/procedures + +#Add all the extra include paths +EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include +EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2 +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/ +EXTRAINCDIR += ${ROOTPATH}/obj/genfiles/ +EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/memory +EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/memory/lib +EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/memory/lib/utils/ +EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/perv +EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/nest +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/common/include/ + OBJS += call_host_disable_vddr.o OBJS += call_mem_pll_initf.o OBJS += call_mem_pll_setup.o @@ -40,4 +54,25 @@ OBJS += call_mss_draminit_mc.o OBJS += $(if $(CONFIG_PALMETTO_VDDR),palmetto_vddr.o,hbVddrMsg.o) + +include ${ROOTPATH}/procedure.rules.mk + +include ${PROCEDURES_PATH}/hwp/perv/p9_mem_pll_initf.mk +include ${PROCEDURES_PATH}/hwp/perv/p9_mem_skewadjust.mk + +#@TODO RTC:152210 Enable Istep 13 HWPs that are waiting on mirrored files +# include ${PROCEDURES_PATH}/hwp/memory/p9_mss_scominit.mk +# include ${PROCEDURES_PATH}/hwp/perv/p9_mem_pll_setup.mk +# include ${PROCEDURES_PATH}/hwp/perv/p9_mem_startclocks.mk +# include ${PROCEDURES_PATH}/hwp/nest/p9_throttle_sync.mk + + +#TODO RTC:152209 Implement std::enable_if in HB +# include ${PROCEDURES_PATH}/hwp/memory/p9_mss_draminit.mk +# include ${PROCEDURES_PATH}/hwp/memory/p9_mss_draminit_training.mk +# include ${PROCEDURES_PATH}/hwp/memory/p9_mss_draminit_mc.mk +# include ${PROCEDURES_PATH}/hwp/memory/p9_mss_ddr_phy_reset.mk + include ${ROOTPATH}/config.mk + +VPATH += ${PROCEDURES_PATH}/hwp/memory ${PROCEDURES_PATH}/hwp/nest ${PROCEDURES_PATH}/hwp/perv |