diff options
author | Roland Veloz <rveloz@us.ibm.com> | 2018-03-29 13:34:55 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-05-07 11:50:36 -0400 |
commit | c0217d002a0a211551048766461f35d718ce1618 (patch) | |
tree | 88e82c2e14c9af1bc3ecc74202c14befb0562e49 /src | |
parent | 22b6130039608d9cb68cd023130b17706a31d1aa (diff) | |
download | talos-hostboot-c0217d002a0a211551048766461f35d718ce1618.tar.gz talos-hostboot-c0217d002a0a211551048766461f35d718ce1618.zip |
Added support, in Istep 08, to facilitate the testing of SMP wrap
Adding support, in Istep 08 to make HWP calls for many various
components. In the various istep 8 call_proc_* and istep 10
call_proc*, I was able to consolidate the HWP call into a single
single function. The consolidated code for these calls exists
in the file nest/nestHwpHelperFuncs. Also added a function to
capture errors in file isteps/istepHelperFuncs.
Change-Id: I64f73d64950a52d2923f1c3fe280c55dffd1d742
RTC:190096
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56518
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
19 files changed, 956 insertions, 543 deletions
diff --git a/src/include/usr/isteps/istep08list.H b/src/include/usr/isteps/istep08list.H index 4bb3e85a8..6ee38287c 100644 --- a/src/include/usr/isteps/istep08list.H +++ b/src/include/usr/isteps/istep08list.H @@ -264,6 +264,7 @@ namespace INITSERVICE const DepModInfo g_istep08Dependancies = { { DEP_LIB(libistep08.so), + DEP_LIB(libisteps_nest.so), DEP_LIB(libsbe.so), DEP_LIB(libimageprocs.so), NULL diff --git a/src/include/usr/isteps/istep10list.H b/src/include/usr/isteps/istep10list.H index 3b16cb1b6..68c0d479a 100644 --- a/src/include/usr/isteps/istep10list.H +++ b/src/include/usr/isteps/istep10list.H @@ -299,6 +299,7 @@ const TaskInfo g_istep10[] = { const DepModInfo g_istep10Dependancies = { { DEP_LIB(libistep10.so), + DEP_LIB(libisteps_nest.so), DEP_LIB(libsbe.so), DEP_LIB(libnestmemutils.so), DEP_LIB(libimageprocs.so), diff --git a/src/makefile b/src/makefile index 83fe2511c..5d5936625 100644 --- a/src/makefile +++ b/src/makefile @@ -206,6 +206,7 @@ EXTENDED_MODULES += $(if $(CONFIG_SECUREBOOT),secureboot_ext) EXTENDED_MODULES += tod EXTENDED_MODULES += nestmemutils EXTENDED_MODULES += fab_iovalid +EXTENDED_MODULES += isteps_nest #*************************************** # Working test modules diff --git a/src/usr/isteps/istep08/call_host_p9_fbc_eff_config_links.C b/src/usr/isteps/istep08/call_host_p9_fbc_eff_config_links.C index 9df8eb25b..885e8bdc2 100644 --- a/src/usr/isteps/istep08/call_host_p9_fbc_eff_config_links.C +++ b/src/usr/isteps/istep08/call_host_p9_fbc_eff_config_links.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -22,53 +22,53 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ -#include <stdint.h> -#include <trace/interface.H> -#include <errl/errlentry.H> -#include <errl/errlmanager.H> -#include <initservice/taskargs.H> -#include <initservice/isteps_trace.H> -#include <initservice/initserviceif.H> -#include <isteps/hwpisteperror.H> -#include <fapi2/plat_hwp_invoker.H> -#include <fapi2/target.H> -#include <p9_fbc_eff_config_links.H> + +/******************************************************************************/ +// Includes +/******************************************************************************/ + +// Component ID support +#include <hbotcompid.H> // HWPF_COMP_ID + +// TARGETING support +#include <attributeenums.H> // TYPE_PROC + +// Error handling support +#include <isteps/hwpisteperror.H> // ISTEP_ERROR::IStepError + +// Tracing support +#include <trace/interface.H> // TRACFCOMP +#include <initservice/isteps_trace.H> // g_trac_isteps_trace + +// HWP call support +#include <nest/nestHwpHelperFuncs.H> // fapiHWPCallWrapperForChip namespace ISTEP_08 { +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ISTEPS_TRACE; +using namespace TARGETING; +//***************************************************************************** +// Wrapper function to call host_p9_fbc_eff_config_links +//***************************************************************************** void* call_host_p9_fbc_eff_config_links( void *io_pArgs ) { - errlHndl_t l_errl = NULL; ISTEP_ERROR::IStepError l_stepError; - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_host_p9_fbc_eff_config_links entry" ); - - TARGETING::TargetHandleList l_procChips; - getAllChips( l_procChips, TARGETING::TYPE_PROC); - for (const auto & l_procChip: l_procChips) - { - fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>l_fapi2CpuTarget(l_procChip); - FAPI_INVOKE_HWP(l_errl,p9_fbc_eff_config_links,l_fapi2CpuTarget, - SMP_ACTIVATE_PHASE1, - true,false); - if(l_errl) - { - l_stepError.addErrorDetails(l_errl); - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR : call call_host_p9_fbc_eff_config_links, " - "PLID=0x%x", - l_errl->plid() ); - errlCommit(l_errl, HWPF_COMP_ID); - } - } + TRACFCOMP(g_trac_isteps_trace, + ENTER_MRK"call_host_p9_fbc_eff_config_links entry" ); + // Make the FAPI call to p9_fbc_eff_config_links + // process electrical = true and process optical = false + fapiHWPCallWrapperHandler(P9_FBC_EFF_CONFIG_LINKS_T_F, l_stepError, + HWPF_COMP_ID, TYPE_PROC); - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_host_p9_fbc_eff_config_links exit" ); + TRACFCOMP(g_trac_isteps_trace, + EXIT_MRK"call_host_p9_fbc_eff_config_links exit" ); return l_stepError.getErrorHandle(); } -}; +}; // end namespace ISTEP_08 diff --git a/src/usr/isteps/istep08/call_host_set_voltages.C b/src/usr/isteps/istep08/call_host_set_voltages.C index 951199f11..c940858cd 100644 --- a/src/usr/isteps/istep08/call_host_set_voltages.C +++ b/src/usr/isteps/istep08/call_host_set_voltages.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* Contributors Listed Below - COPYRIGHT 2016,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -26,45 +26,50 @@ /******************************************************************************/ // Includes /******************************************************************************/ -#include <stdint.h> -#include <trace/interface.H> -#include <errl/errlentry.H> -#include <initservice/isteps_trace.H> -#include <initservice/initserviceif.H> -#include <isteps/hwpisteperror.H> -// targeting support -#include <targeting/common/commontargeting.H> -#include <targeting/common/utilFilter.H> -#include <errl/errlmanager.H> -#include <fapi2/target.H> -#include <fapi2/plat_hwp_invoker.H> -#include <p9_setup_evid.H> +// Component ID support +#include <hbotcompid.H> // HWPF_COMP_ID + +// TARGETING support +#include <attributeenums.H> // TYPE_PROC +// Error handling support +#include <isteps/hwpisteperror.H> // ISTEP_ERROR::IStepError +#include <errl/errlentry.H> // errlHndl_t +#include <istepHelperFuncs.H> // captureError -#include <hbToHwsvVoltageMsg.H> +// Tracing support +#include <trace/interface.H> // TRACFCOMP +#include <initservice/isteps_trace.H> // g_trac_isteps_trace + +// HWP call support +#include <p9_setup_evid.H> +#include <nest/nestHwpHelperFuncs.H> // fapiHWPCallWrapperForChip +#include <hbToHwsvVoltageMsg.H> // platform_set_nest_voltages -using namespace TARGETING; -using namespace ERRORLOG; -using namespace ISTEP_ERROR; +// Init Service support +#include <initservice/initserviceif.H> // INITSERVICE::spBaseServicesEnabled namespace ISTEP_08 { +using namespace ISTEP; +using namespace ISTEP_ERROR; +using namespace ISTEPS_TRACE; +using namespace TARGETING; //***************************************************************************** -// call_host_set_voltages() +// Wrapper function to call host_set_voltages //***************************************************************************** void* call_host_set_voltages(void *io_pArgs) { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "call_host_set_voltages enter"); + TRACFCOMP(g_trac_isteps_trace, ENTER_MRK"call_host_set_voltages enter"); - errlHndl_t l_err = NULL; - TargetHandleList l_procList; + errlHndl_t l_err(nullptr); IStepError l_stepError; - bool l_noError = true; + do { + TargetHandleList l_procList; // Get the system's procs getAllChips( l_procList, TYPE_PROC, @@ -77,58 +82,76 @@ void* call_host_set_voltages(void *io_pArgs) const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_fapiProcTarget( l_procTarget ); - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running p9_setup_evid HWP on processor target %.8X", - get_huid( l_procTarget ) ); + TRACFCOMP(g_trac_isteps_trace, + "Running p9_setup_evid HWP on processor target %.8X", + get_huid( l_procTarget ) ); - FAPI_INVOKE_HWP( l_err, - p9_setup_evid, - l_fapiProcTarget, - APPLY_VOLTAGE_SETTINGS); + FAPI_INVOKE_HWP(l_err, + p9_setup_evid, + l_fapiProcTarget, + APPLY_VOLTAGE_SETTINGS); if( l_err ) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "Error running p9_setup_evid on processor target %.8X", get_huid( l_procTarget ) ); - l_stepError.addErrorDetails( l_err ); - errlCommit( l_err, HWPF_COMP_ID ); - l_noError = false; + // Capture error and continue + captureError(l_err, + l_stepError, + HWPF_COMP_ID, + l_procTarget); } - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Done with p9_setup_evid" ); + TRACFCOMP(g_trac_isteps_trace, "Done with p9_setup_evid" ); } // Processor Loop - if( l_noError ) + // Exit if FAPI call failed or returned an error + if (!l_stepError.isNull()) { - //If FSP is present, send voltage information to HWSV - if( INITSERVICE::spBaseServicesEnabled() ) - { - l_err = platform_set_nest_voltages(); - - if( l_err ) - { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Error in call_host_set_voltages::platform_set_nest_voltages()") + break; + } - // Create IStep error log and cross reference occurred error - l_stepError.addErrorDetails( l_err ); + // If no error occurred and FSP is present, + // send voltage information to HWSV + if (INITSERVICE::spBaseServicesEnabled()) + { + l_err = platform_set_nest_voltages(); - //Commit Error - errlCommit( l_err, ISTEP_COMP_ID ); + if( l_err ) + { + TRACFCOMP(g_trac_isteps_trace, + "Error in call_host_set_voltages::platform_set_nest_voltages()") - } + // Capture error and continue + captureError(l_err, + l_stepError, + ISTEP_COMP_ID); } } + + // Exit if setting voltage failed or returned an error + if (!l_stepError.isNull()) + { + break; + } + +#ifdef CONFIG_SMP_WRAP_TEST + // Make the FAPI call to p9_fbc_eff_config_links + // Make the FAPI call to p9_sys_chiplet_scominit, if previous call succeeded + fapiHWPCallWrapperHandler(P9_FBC_EFF_CONFIG_LINKS_F_T, l_stepError, + HWPF_COMP_ID, TYPE_PROC) && + fapiHWPCallWrapperHandler(P9_SYS_CHIPLET_SCOMINIT, l_stepError, + HWPF_COMP_ID, TYPE_PROC); +#endif }while( 0 ); - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "call_host_set_voltages exit"); + TRACFCOMP(g_trac_isteps_trace, EXIT_MRK"call_host_set_voltages exit"); // end task, returning any errorlogs to IStepDisp return l_stepError.getErrorHandle(); } -}; // end namespace +}; // end namespace ISTEP_08 diff --git a/src/usr/isteps/istep08/call_proc_chiplet_fabric_scominit.C b/src/usr/isteps/istep08/call_proc_chiplet_fabric_scominit.C index e27b31833..e54079d66 100644 --- a/src/usr/isteps/istep08/call_proc_chiplet_fabric_scominit.C +++ b/src/usr/isteps/istep08/call_proc_chiplet_fabric_scominit.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -22,6 +22,7 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ + /** @file call_proc_chiplet_fabric_scominit.C * @@ -31,98 +32,52 @@ * HWP_IGNORE_VERSION_CHECK * */ + /******************************************************************************/ // Includes /******************************************************************************/ -#include <stdint.h> - -#include <trace/interface.H> -#include <initservice/taskargs.H> -#include <errl/errlentry.H> -#include <isteps/hwpisteperror.H> -#include <errl/errludtarget.H> +// Component ID support +#include <hbotcompid.H> // HWPF_COMP_ID -#include <initservice/isteps_trace.H> -#include <initservice/initserviceif.H> +// TARGETING support +#include <attributeenums.H> // TYPE_PROC -// targeting support -#include <targeting/common/commontargeting.H> -#include <targeting/common/utilFilter.H> +// Error handling support +#include <isteps/hwpisteperror.H> // ISTEP_ERROR::IStepError -#include <fapi2/target.H> -#include <fapi2/plat_hwp_invoker.H> +// Tracing support +#include <trace/interface.H> // TRACFCOMP +#include <initservice/isteps_trace.H> // g_trac_isteps_trace -// MVPD -#include <devicefw/userif.H> -#include <vpd/mvpdenums.H> +// HWP call support +#include <nest/nestHwpHelperFuncs.H> // fapiHWPCallWrapperForChip -#include <config.h> - -// HWP -#include <p9_chiplet_fabric_scominit.H> - -namespace ISTEP_08 +namespace ISTEP_08 { - using namespace ISTEP; using namespace ISTEP_ERROR; -using namespace ERRORLOG; +using namespace ISTEPS_TRACE; using namespace TARGETING; //****************************************************************************** -// wrapper function to call proc_chiplet_fabric_scominit +// Wrapper function to call proc_chiplet_fabric_scominit //****************************************************************************** -void* call_proc_chiplet_fabric_scominit( void *io_pArgs ) +void* call_proc_chiplet_fabric_scominit( void *io_pArgs ) { - errlHndl_t l_err = NULL; - IStepError l_StepError; - - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_proc_chiplet_fabric_scominit entry" ); - - // - // get a list of all the procs in the system - // - TARGETING::TargetHandleList l_cpuTargetList; - getAllChips(l_cpuTargetList, TYPE_PROC); - - // Loop through all processors including master - for (const auto & l_cpu_target: l_cpuTargetList) - { - fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>l_fapi2_proc_target( - l_cpu_target); - - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running p9_chiplet_fabric_scominit HWP on " - "target HUID %.8X", TARGETING::get_huid(l_cpu_target)); - - FAPI_INVOKE_HWP(l_err, - p9_chiplet_fabric_scominit, - l_fapi2_proc_target); - if (l_err) - { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : " - "p9_chiplet_fabric_scominit HWP returns error. target HUID %.8X", - l_err->reasonCode(), TARGETING::get_huid(l_cpu_target)); - - ErrlUserDetailsTarget(l_cpu_target).addToLog( l_err ); + IStepError l_stepError; - // Create IStep error log and cross ref to error that occurred - l_StepError.addErrorDetails( l_err ); + TRACFCOMP(g_trac_isteps_trace, + ENTER_MRK"call_proc_chiplet_fabric_scominit entry"); - // We want to continue to the next target instead of exiting, - // Commit the error log and move on - // Note: Error log should already be deleted and set to NULL - // after committing - errlCommit(l_err, HWPF_COMP_ID); - } - } // end of going through all processors + // Make the FAPI call to p9_chiplet_fabric_scominit + fapiHWPCallWrapperHandler(P9_CHIPLET_FABRIC_SCOMINIT, l_stepError, + HWPF_COMP_ID, TYPE_PROC); - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_proc_chiplet_fabric_scominit exit" ); + TRACFCOMP(g_trac_isteps_trace, + EXIT_MRK"call_proc_chiplet_fabric_scominit exit"); - return l_StepError.getErrorHandle(); + return l_stepError.getErrorHandle(); } -}; // end namespace ISTEP_08 +}; // end namespace ISTEP_08 diff --git a/src/usr/isteps/istep08/call_proc_xbus_enable_ridi.C b/src/usr/isteps/istep08/call_proc_xbus_enable_ridi.C index 68117452f..5002f6642 100644 --- a/src/usr/isteps/istep08/call_proc_xbus_enable_ridi.C +++ b/src/usr/isteps/istep08/call_proc_xbus_enable_ridi.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -22,6 +22,7 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ + /** @file call_proc_xbus_enable_ridi.C * @@ -31,81 +32,73 @@ * HWP_IGNORE_VERSION_CHECK * */ + /******************************************************************************/ // Includes /******************************************************************************/ -#include <stdint.h> - -#include <trace/interface.H> -#include <initservice/taskargs.H> -#include <errl/errlentry.H> - -#include <isteps/hwpisteperror.H> -#include <errl/errludtarget.H> +// Component ID support +#include <hbotcompid.H> // HWPF_COMP_ID -#include <initservice/isteps_trace.H> -#include <initservice/initserviceif.H> +// TARGETING support +#include <attributeenums.H> // TYPE_PROC, TYPE_PROC -// targeting support -#include <targeting/common/commontargeting.H> -#include <targeting/common/utilFilter.H> -#include <fapi2/target.H> -#include <fapi2/plat_hwp_invoker.H> +// Error handling support +#include <isteps/hwpisteperror.H> // ISTEP_ERROR::IStepError -#include <p9_xbus_enable_ridi.H> +// Tracing support +#include <trace/interface.H> // TRACFCOMP +#include <initservice/isteps_trace.H> // g_trac_isteps_trace +// HWP call support +#include <nest/nestHwpHelperFuncs.H> // fapiHWPCallWrapper -namespace ISTEP_08 +namespace ISTEP_08 { - using namespace ISTEP; using namespace ISTEP_ERROR; -using namespace ERRORLOG; +using namespace ISTEPS_TRACE; using namespace TARGETING; + //****************************************************************************** -// wrapper function to call proc_xbus_enable_ridi +// Wrapper function to call proc_xbus_enable_ridi //****************************************************************************** void* call_proc_xbus_enable_ridi( void *io_pArgs ) { - errlHndl_t l_err = NULL; - IStepError l_StepError; - - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_proc_xbus_enable_ridi entry" ); - // - // get a list of all the procs in the system - // - TARGETING::TargetHandleList l_cpuTargetList; - getAllChips(l_cpuTargetList, TYPE_PROC); - - // Loop through all processors including master - for (const auto & l_cpu_target: l_cpuTargetList) - { - const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>l_fapi2_proc_target( - l_cpu_target); - - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running p9_xbus_enable_ridi HWP on processor target %.8X", - TARGETING::get_huid(l_cpu_target) ); - - FAPI_INVOKE_HWP(l_err, p9_xbus_enable_ridi, l_fapi2_proc_target); - if(l_err) - { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR: call p9_xbus_enable_ridi, PLID=0x%x", - l_err->plid()); - l_StepError.addErrorDetails(l_err); - errlCommit(l_err, HWPF_COMP_ID); - } - - } // end of going through all processors - - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_proc_xbus_enable_ridi exit"); - - return l_StepError.getErrorHandle(); + IStepError l_stepError; + + TRACFCOMP(g_trac_isteps_trace, ENTER_MRK"call_proc_xbus_enable_ridi entry"); + + do { + // Make the FAPI call to p9_xbus_enable_ridi + if (!fapiHWPCallWrapperHandler(P9_XBUS_ENABLE_RIDI, l_stepError, + HWPF_COMP_ID, TYPE_PROC)) + { + break; + } + +#ifdef CONFIG_SMP_WRAP_TEST + // Make the FAPI call to p9_chiplet_scominit + // Make the FAPI call to p9_psi_scominit, if previous call succeeded + // Make the FAPI call to p9_io_obus_scominit, if previous call succeeded + // Make the FAPI call to p9_npu_scominit, if previous call succeeded + // Make the FAPI call to p9_chiplet_enable_ridi, if previous call succeeded + fapiHWPCallWrapperHandler(P9_CHIPLET_SCOMINIT, l_stepError, + HWPF_COMP_ID, TYPE_PROC) && + fapiHWPCallWrapperHandler(P9_PSI_SCOMINIT, l_stepError, + HWPF_COMP_ID, TYPE_PROC) && + fapiHWPCallWrapperHandler(P9_IO_OBUS_SCOMINIT, l_stepError, + HWPF_COMP_ID, TYPE_OBUS) && + fapiHWPCallWrapperHandler(P9_NPU_SCOMINIT, l_stepError, + HWPF_COMP_ID, TYPE_PROC) && + fapiHWPCallWrapperHandler(P9_CHIPLET_ENABLE_RIDI, l_stepError, + HWPF_COMP_ID, TYPE_PROC); +#endif // end #ifdef CONFIG_SMP_WRAP_TEST + } while (0); + TRACFCOMP(g_trac_isteps_trace, EXIT_MRK"call_proc_xbus_enable_ridi exit"); + + return l_stepError.getErrorHandle(); } }; // end namespace ISTEP_08 diff --git a/src/usr/isteps/istep08/makefile b/src/usr/isteps/istep08/makefile index 347d8e2b9..24858aeaf 100644 --- a/src/usr/isteps/istep08/makefile +++ b/src/usr/isteps/istep08/makefile @@ -79,9 +79,6 @@ include ${PROCEDURES_PATH}/hwp/perv/p9_getecid.mk # host_p9_fbc_eff_config include ${PROCEDURES_PATH}/hwp/nest/p9_fbc_eff_config.mk -# host_p9_fbc_eff_config_links -include ${PROCEDURES_PATH}/hwp/nest/p9_fbc_eff_config_links.mk - # proc_attr_update: Proc ATTR Update include ${PROCEDURES_PATH}/hwp/nest/p9_attr_update.mk diff --git a/src/usr/isteps/istep10/call_proc_chiplet_enable_ridi.C b/src/usr/isteps/istep10/call_proc_chiplet_enable_ridi.C index 72422e56b..2c82e7f10 100644 --- a/src/usr/isteps/istep10/call_proc_chiplet_enable_ridi.C +++ b/src/usr/isteps/istep10/call_proc_chiplet_enable_ridi.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -22,6 +22,7 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ + /** @file call_proc_chiplet_enable_ridi.C * @@ -31,81 +32,55 @@ * HWP_IGNORE_VERSION_CHECK * */ + /******************************************************************************/ // Includes /******************************************************************************/ -#include <stdint.h> - -#include <trace/interface.H> -#include <initservice/taskargs.H> -#include <errl/errlentry.H> - -#include <isteps/hwpisteperror.H> -#include <errl/errludtarget.H> +// Component ID support +#include <hbotcompid.H> // HWPF_COMP_ID -#include <initservice/isteps_trace.H> -#include <initservice/initserviceif.H> +// TARGETING support +#include <attributeenums.H> // TYPE_PROC -// targeting support -#include <targeting/common/commontargeting.H> -#include <targeting/common/utilFilter.H> -#include <fapi2/target.H> -#include <fapi2/plat_hwp_invoker.H> +// Error handling support +#include <isteps/hwpisteperror.H> // ISTEP_ERROR::IStepError -#include <p9_chiplet_enable_ridi.H> +// Tracing support +#include <trace/interface.H> // TRACFCOMP +#include <initservice/isteps_trace.H> // g_trac_isteps_trace +// HWP call support +#include <nest/nestHwpHelperFuncs.H> // fapiHWPCallWrapperForChip -namespace ISTEP_10 +namespace ISTEP_10 { - using namespace ISTEP; using namespace ISTEP_ERROR; -using namespace ERRORLOG; +using namespace ISTEPS_TRACE; using namespace TARGETING; //****************************************************************************** -// wrapper function to call proc_chiplet_enable_ridi +// Wrapper function to call proc_chiplet_enable_ridi //****************************************************************************** void* call_proc_chiplet_enable_ridi( void *io_pArgs ) { - errlHndl_t l_err = NULL; - IStepError l_StepError; - - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_proc_chiplet_enable_ridi entry" ); - // - // get a list of all the procs in the system - // - TARGETING::TargetHandleList l_cpuTargetList; - getAllChips(l_cpuTargetList, TYPE_PROC); - - // Loop through all processors including master - for (const auto & l_cpu_target: l_cpuTargetList) - { - const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>l_fapi2_proc_target( - l_cpu_target); + IStepError l_stepError; - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running p9_chiplet_enable_ridi HWP on processor target %.8X", - TARGETING::get_huid(l_cpu_target) ); + TRACFCOMP(g_trac_isteps_trace, + ENTER_MRK"call_proc_chiplet_enable_ridi entry"); - FAPI_INVOKE_HWP(l_err, p9_chiplet_enable_ridi, l_fapi2_proc_target); - if(l_err) - { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR: call p9_chiplet_enable_ridi, PLID=0x%x", - l_err->plid()); - l_StepError.addErrorDetails(l_err); - errlCommit(l_err, HWPF_COMP_ID); - } - } // end of going through all processors +#ifndef CONFIG_SMP_WRAP_TEST + // Make the FAPI call to p9_chiplet_enable_ridi + fapiHWPCallWrapperHandler(P9_CHIPLET_ENABLE_RIDI, l_stepError, + HWPF_COMP_ID, TYPE_PROC); +#endif - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_proc_chiplet_enable_ridi exit"); + TRACFCOMP(g_trac_isteps_trace, + EXIT_MRK"call_proc_chiplet_enable_ridi exit"); - return l_StepError.getErrorHandle(); + return l_stepError.getErrorHandle(); } -}; // end namespace +}; // end namespace ISTEP_10 diff --git a/src/usr/isteps/istep10/call_proc_chiplet_scominit.C b/src/usr/isteps/istep10/call_proc_chiplet_scominit.C index 51fa4b75b..51fd78fa0 100644 --- a/src/usr/isteps/istep10/call_proc_chiplet_scominit.C +++ b/src/usr/isteps/istep10/call_proc_chiplet_scominit.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -22,6 +22,7 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ + /** @file call_proc_chiplet_scominit.C * @@ -31,118 +32,56 @@ * HWP_IGNORE_VERSION_CHECK * */ + /******************************************************************************/ // Includes /******************************************************************************/ -#include <stdint.h> - -#include <trace/interface.H> -#include <initservice/taskargs.H> -#include <errl/errlentry.H> -#include <isteps/hwpisteperror.H> -#include <errl/errludtarget.H> +// Component ID support +#include <hbotcompid.H> // HWPF_COMP_ID -#include <initservice/isteps_trace.H> -#include <initservice/initserviceif.H> +// TARGETING support +#include <attributeenums.H> // TYPE_PROC -// targeting support -#include <targeting/common/commontargeting.H> -#include <targeting/common/utilFilter.H> +// Error handling support +#include <isteps/hwpisteperror.H> // ISTEP_ERROR::IStepError +#include <istepHelperFuncs.H> // captureError -#include <fapi2/target.H> -#include <fapi2/plat_hwp_invoker.H> +// Tracing support +#include <trace/interface.H> // TRACFCOMP +#include <initservice/isteps_trace.H> // g_trac_isteps_trace -// MVPD -#include <devicefw/userif.H> -#include <vpd/mvpdenums.H> - -#include <config.h> - -// HWP -#include <p9_chiplet_scominit.H> -#include <p9_psi_scominit.H> +// HWP call support +#include <nest/nestHwpHelperFuncs.H> // fapiHWPCallWrapperForChip // Util TCE Support -#include <util/utiltce.H> +#include <util/utiltce.H> // TCE::utilUseTcesForDmas -namespace ISTEP_10 +namespace ISTEP_10 { - using namespace ISTEP; using namespace ISTEP_ERROR; -using namespace ERRORLOG; +using namespace ISTEPS_TRACE; using namespace TARGETING; //****************************************************************************** -// wrapper function to call proc_chiplet_scominit +// Wrapper function to call proc_chiplet_scominit //****************************************************************************** -void* call_proc_chiplet_scominit( void *io_pArgs ) +void* call_proc_chiplet_scominit( void *io_pArgs ) { - errlHndl_t l_err = NULL; - IStepError l_StepError; + errlHndl_t l_err(nullptr); + IStepError l_stepError; - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_proc_chiplet_scominit entry" ); + TRACFCOMP(g_trac_isteps_trace, ENTER_MRK"call_proc_chiplet_scominit entry" ); - // - // get a list of all the procs in the system - // - TARGETING::TargetHandleList l_cpuTargetList; - getAllChips(l_cpuTargetList, TYPE_PROC); - - // Loop through all processors including master - for (const auto & l_cpu_target: l_cpuTargetList) - { - fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>l_fapi2_proc_target( - l_cpu_target); - - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running p9_chiplet_scominit HWP on " - "target HUID %.8X", TARGETING::get_huid(l_cpu_target)); - - FAPI_INVOKE_HWP(l_err, p9_chiplet_scominit, l_fapi2_proc_target); - if (l_err) - { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : " - "p9_chiplet_scominit HWP returns error. target HUID %.8X", - l_err->reasonCode(), TARGETING::get_huid(l_cpu_target)); - - ErrlUserDetailsTarget(l_cpu_target).addToLog( l_err ); - - // Create IStep error log and cross ref to error that occurred - l_StepError.addErrorDetails( l_err ); - - // We want to continue to the next target instead of exiting, - // Commit the error log and move on - // Note: Error log should already be deleted and set to NULL - // after committing - errlCommit(l_err, HWPF_COMP_ID); - } - - //call p9_psi_scominit - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running p9_psi_scominit HWP on " - "target HUID %.8X", TARGETING::get_huid(l_cpu_target)); - FAPI_INVOKE_HWP(l_err,p9_psi_scominit, l_fapi2_proc_target); - if (l_err) - { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : " - "p9_psi_scominit HWP returns error. target HUID %.8X", - l_err->reasonCode(), TARGETING::get_huid(l_cpu_target)); - - ErrlUserDetailsTarget(l_cpu_target).addToLog( l_err ); - - // Create IStep error log and cross ref to error that occurred - l_StepError.addErrorDetails( l_err ); - - // We want to continue to the next target instead of exiting, - // Commit the error log and move on - // Note: Error log should already be deleted and set to NULL - // after committing - errlCommit(l_err, HWPF_COMP_ID); - } - } // end of going through all processors +#ifndef CONFIG_SMP_WRAP_TEST + // Make the FAPI call to p9_chiplet_scominit + // Make the FAPI call to p9_psi_scominit, if previous call succeeded + fapiHWPCallWrapperHandler(P9_CHIPLET_SCOMINIT, l_stepError, + HWPF_COMP_ID, TYPE_PROC) && + fapiHWPCallWrapperHandler(P9_PSI_SCOMINIT, l_stepError, + HWPF_COMP_ID, TYPE_PROC); +#endif // Enable TCEs with an empty TCE Table, if necessary // This will prevent the FSP from DMAing to system memory without @@ -153,24 +92,20 @@ void* call_proc_chiplet_scominit( void *io_pArgs ) if (l_err) { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "call_proc_chiplet_scominit: utilEnableTcesWithoutTceTable " - "returned ERROR 0x%.4X", - l_err->reasonCode()); - - // Create IStep error log and cross ref to error that occurred - l_StepError.addErrorDetails( l_err ); - - // Commit the error log and move on - // Note: Error log should already be deleted and set to NULL - // after committing - errlCommit(l_err, HWPF_COMP_ID); + TRACFCOMP(g_trac_isteps_trace, + "call_proc_chiplet_scominit: " + "utilEnableTcesWithoutTceTable, returned ERROR 0x%.4X", + l_err->reasonCode()); + + // Capture error + captureError(l_err, + l_stepError, + HWPF_COMP_ID); } } - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_proc_chiplet_scominit exit" ); + TRACFCOMP(g_trac_isteps_trace, EXIT_MRK"call_proc_chiplet_scominit exit" ); - return l_StepError.getErrorHandle(); + return l_stepError.getErrorHandle(); } -}; +}; // end namespace ISTEP_10 diff --git a/src/usr/isteps/istep10/call_proc_npu_scominit.C b/src/usr/isteps/istep10/call_proc_npu_scominit.C index 622fc883d..35f29d30a 100644 --- a/src/usr/isteps/istep10/call_proc_npu_scominit.C +++ b/src/usr/isteps/istep10/call_proc_npu_scominit.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -31,87 +31,51 @@ * HWP_IGNORE_VERSION_CHECK * */ + /******************************************************************************/ // Includes /******************************************************************************/ -#include <stdint.h> - -#include <trace/interface.H> -#include <initservice/taskargs.H> -#include <errl/errlentry.H> - -#include <isteps/hwpisteperror.H> - -#include <errl/errludtarget.H> -#include <initservice/isteps_trace.H> -#include <initservice/initserviceif.H> +// Component ID support +#include <hbotcompid.H> // HWPF_COMP_ID -// targeting support -#include <targeting/common/commontargeting.H> -#include <targeting/common/utilFilter.H> +// TARGETING support +#include <attributeenums.H> // TYPE_PROC -#include <fapi2/target.H> -#include <fapi2/plat_hwp_invoker.H> +// Error handling support +#include <isteps/hwpisteperror.H> // ISTEP_ERROR::IStepError -// MVPD -#include <devicefw/userif.H> -#include <vpd/mvpdenums.H> +// Tracing support +#include <trace/interface.H> // TRACFCOMP +#include <initservice/isteps_trace.H> // g_trac_isteps_trace -#include <config.h> +// HWP call support +#include <nest/nestHwpHelperFuncs.H> // fapiHWPCallWrapperForChip -#include <p9_npu_scominit.H> - -namespace ISTEP_10 +namespace ISTEP_10 { - using namespace ISTEP; using namespace ISTEP_ERROR; -using namespace ERRORLOG; +using namespace ISTEPS_TRACE; using namespace TARGETING; //****************************************************************************** -// wrapper function to call proc_npu_scominit +// Wrapper function to call proc_npu_scominit //****************************************************************************** void* call_proc_npu_scominit( void *io_pArgs ) { + IStepError l_stepError; - errlHndl_t l_err = NULL; - IStepError l_StepError; - - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_proc_npu_scominit entry" ); - - // - // get a list of all the procs in the system - // - TARGETING::TargetHandleList l_cpuTargetList; - getAllChips(l_cpuTargetList, TYPE_PROC); + TRACFCOMP(g_trac_isteps_trace, ENTER_MRK"call_proc_npu_scominit entry"); - // Loop through all processors, including master - for (const auto & l_cpu_target: l_cpuTargetList) - { - const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>l_fapi2_proc_target( - l_cpu_target); +#ifndef CONFIG_SMP_WRAP_TEST + // Make the FAPI call to p9_npu_scominit + fapiHWPCallWrapperHandler(P9_NPU_SCOMINIT, l_stepError, + HWPF_COMP_ID, TYPE_PROC); +#endif - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running p9_npu_scominit HWP on " - "target HUID %.8X", TARGETING::get_huid(l_cpu_target) ); - FAPI_INVOKE_HWP(l_err, p9_npu_scominit, l_fapi2_proc_target); - if(l_err) - { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%.8X : p9_npu_scominit " - "HWP returns error for HUID %.8X", - l_err->reasonCode(), - TARGETING::get_huid(l_cpu_target) ); - l_StepError.addErrorDetails(l_err); - errlCommit(l_err, HWPF_COMP_ID); - } - } - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_proc_npu_scominit exit" ); + TRACFCOMP(g_trac_isteps_trace, EXIT_MRK"call_proc_npu_scominit exit"); - return l_StepError.getErrorHandle(); + return l_stepError.getErrorHandle(); } -}; +}; // end namespace ISTEP_10 diff --git a/src/usr/isteps/istep10/call_proc_obus_scominit.C b/src/usr/isteps/istep10/call_proc_obus_scominit.C index f08d896c6..b9be6a74d 100644 --- a/src/usr/isteps/istep10/call_proc_obus_scominit.C +++ b/src/usr/isteps/istep10/call_proc_obus_scominit.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -22,6 +22,7 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ + /** @file call_proc_obus_scominit.C * @@ -31,93 +32,51 @@ * HWP_IGNORE_VERSION_CHECK * */ + /******************************************************************************/ // Includes /******************************************************************************/ -#include <stdint.h> - -#include <trace/interface.H> -#include <initservice/taskargs.H> -#include <errl/errlentry.H> -#include <isteps/hwpisteperror.H> +// Component ID support +#include <hbotcompid.H> // HWPF_COMP_ID -#include <errl/errludtarget.H> +// TARGETING support +#include <attributeenums.H> // TYPE_PROC -#include <initservice/isteps_trace.H> -#include <initservice/initserviceif.H> +// Error handling support +#include <isteps/hwpisteperror.H> // ISTEP_ERROR::IStepError -// targeting support -#include <targeting/common/commontargeting.H> -#include <targeting/common/utilFilter.H> +// Tracing support +#include <trace/interface.H> // TRACFCOMP +#include <initservice/isteps_trace.H> // g_trac_isteps_trace -#include <pbusLinkSvc.H> -#include <fapi2/target.H> -#include <fapi2/plat_hwp_invoker.H> +// HWP call support +#include <nest/nestHwpHelperFuncs.H> // fapiHWPCallWrapperForChip -// MVPD -#include <devicefw/userif.H> -#include <vpd/mvpdenums.H> - -#include <config.h> -#include <p9_io_obus_scominit.H> - -namespace ISTEP_10 +namespace ISTEP_10 { - using namespace ISTEP; using namespace ISTEP_ERROR; -using namespace ERRORLOG; +using namespace ISTEPS_TRACE; using namespace TARGETING; //****************************************************************************** -// wrapper function to call proc_obus_scominit +// Wrapper function to call proc_obus_scominit //****************************************************************************** void* call_proc_obus_scominit( void *io_pArgs ) { - errlHndl_t l_err = NULL; - IStepError l_StepError; - - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_proc_obus_scominit entry" ); - - do { - - // Get all OBUS targets - TARGETING::TargetHandleList l_obusTargetList; - getAllChiplets(l_obusTargetList, TYPE_OBUS); - - for (const auto & l_obusTarget: l_obusTargetList) - { - - const fapi2::Target<fapi2::TARGET_TYPE_OBUS> - l_obusFapi2Target( - (const_cast<TARGETING::Target*>(l_obusTarget))); - + IStepError l_stepError; - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running p9_io_obus_scominit HWP on " - "This OBUS target %.8X", - TARGETING::get_huid(l_obusTarget)); + TRACFCOMP(g_trac_isteps_trace, ENTER_MRK"call_proc_obus_scominit entry"); - FAPI_INVOKE_HWP(l_err, p9_io_obus_scominit, - l_obusFapi2Target); +#ifndef CONFIG_SMP_WRAP_TEST + // Make the FAPI call to p9_io_obus_scominit + fapiHWPCallWrapperHandler(P9_IO_OBUS_SCOMINIT, l_stepError, + HWPF_COMP_ID, TYPE_OBUS); +#endif - if(l_err) - { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%x: returned from p9_io_obus_scominit on " - "OBUS target %.8X, PLID=0x%x", - TARGETING::get_huid(l_obusTarget), - l_err->plid()); - l_StepError.addErrorDetails(l_err); - errlCommit(l_err, HWPF_COMP_ID); - } - } // end of looping through Obus pairs - } while (0); - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_proc_obus_scominit exit" ); + TRACFCOMP(g_trac_isteps_trace, EXIT_MRK"call_proc_obus_scominit exit"); - return l_StepError.getErrorHandle(); + return l_stepError.getErrorHandle(); } -}; +}; // end namespace ISTEP_10 diff --git a/src/usr/isteps/istep10/makefile b/src/usr/isteps/istep10/makefile index 78bbf578c..6ea05a63e 100644 --- a/src/usr/isteps/istep10/makefile +++ b/src/usr/isteps/istep10/makefile @@ -94,31 +94,9 @@ include ${INITFILES_HWP_PATH}/p9_fbc_cd_hp2_scom.mk include ${INITFILES_HWP_PATH}/p9_fbc_cd_hp3_scom.mk include ${PERV_HWP_PATH}/p9_update_security_ctrl.mk -# proc_chiplet_scominit : Scom inits to all chiplets (sans Quad) -include ${PROCEDURES_PATH}/hwp/nest/p9_chiplet_scominit.mk -include ${PROCEDURES_PATH}/hwp/nest/p9_psi_scominit.mk -include ${PROCEDURES_PATH}/hwp/initfiles/p9_psi_scom.mk -include ${PROCEDURES_PATH}/hwp/initfiles/p9_fbc_ioo_tl_scom.mk -include ${PROCEDURES_PATH}/hwp/initfiles/p9_fbc_ioo_dl_scom.mk -include ${PROCEDURES_PATH}/hwp/initfiles/p9_nx_scom.mk -include ${PROCEDURES_PATH}/hwp/initfiles/p9_cxa_scom.mk -include ${PROCEDURES_PATH}/hwp/initfiles/p9_mmu_scom.mk -include ${PROCEDURES_PATH}/hwp/initfiles/p9_vas_scom.mk -include ${PROCEDURES_PATH}/hwp/initfiles/p9c_dmi_scom.mk -include ${PROCEDURES_PATH}/hwp/initfiles/p9c_mi_scom.mk -include ${PROCEDURES_PATH}/hwp/initfiles/p9c_mc_scom.mk # Note that p9_int_scom.mk is included in fapi2.mk for # workaround reasons so we are not including it here -# proc_obus_scominit : Apply scom inits to Obus -include ${PROCEDURES_PATH}/hwp/io/p9_io_obus_scominit.mk -include ${PROCEDURES_PATH}/hwp/initfiles/p9_obus_scom.mk - -# proc_npu_scominit : Apply scom inits to NPU bus -include ${PROCEDURES_PATH}/hwp/initfiles/p9_npu_scom.mk -include ${PROCEDURES_PATH}/hwp/nest/p9_npu_scominit.mk -include ${PROCEDURES_PATH}/hwp/perv/p9_nv_ref_clk_enable.mk - # proc_pcie_scominit : Apply scom inits to PCIe chiplets include ${PROCEDURES_PATH}/hwp/nest/p9_pcie_scominit.mk @@ -128,9 +106,6 @@ include ${PROCEDURES_PATH}/hwp/initfiles/p9n_mcs_scom.mk # proc_scomoverride_chiplets : Apply sequenced scom inits include ${PROCEDURES_PATH}/hwp/nest/p9_scomoverride_chiplets.mk -# proc_chiplet_enable_ridi : Apply RI/DI chip wide -include ${PROCEDURES_PATH}/hwp/perv/p9_chiplet_enable_ridi.mk - # host_rng_bist : Trigger Built In Self Test # HWP not ready - p9_trigger_rng_bist.mk include ${PROCEDURES_PATH}/hwp/nest/p9_rng_init_phase1.mk diff --git a/src/usr/isteps/istepHelperFuncs.C b/src/usr/isteps/istepHelperFuncs.C index 76cb56ddd..b7ba22e88 100644 --- a/src/usr/isteps/istepHelperFuncs.C +++ b/src/usr/isteps/istepHelperFuncs.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -30,6 +30,7 @@ #include <isteps/hwpisteperror.H> #include <errl/errludtarget.H> +#include <errl/errlmanager.H> #include <initservice/isteps_trace.H> @@ -265,3 +266,58 @@ void set_eff_config_attrs_helper( const EFF_CONFIG_ATTRIBUTES_BASE i_base, } +// +// Helper functions to capture and log errors +// @note I have no idea how to succinctly create a single function for a +// null target, a valid target and target list. I could have shoved +// a single target into a target list and then call the target list +// over loaded function but that seem heavy handed and I did not want +// all that overhead for one target, so I settled for two functions with +// practically duplicated code ... sigh ... head hung low. +// +void captureError(errlHndl_t &io_err, + ISTEP_ERROR::IStepError &io_stepError, + compId_t i_componentId, + const TARGETING::Target *i_target) +{ + if ( io_err ) + { + if ( i_target ) + { + // Capture the target data in the error log + ERRORLOG::ErrlUserDetailsTarget(i_target).addToLog(io_err); + } + + // Create IStep error log and cross reference error that occurred + io_stepError.addErrorDetails(io_err); + + // Commit error. Log should be deleted and set to NULL in errlCommit. + errlCommit( io_err, i_componentId ); + } // end if ( i_err ) +} + +void captureError(errlHndl_t &io_err, + ISTEP_ERROR::IStepError &io_stepError, + compId_t i_componentId, + const TARGETING::TargetHandleList &i_targetList) +{ + if ( io_err ) + { + // iterate thru the input targets, if any, and capture user details of the target + for (const auto & l_target: i_targetList) + { + // Capture the target data in the error log + ERRORLOG::ErrlUserDetailsTarget(l_target).addToLog(io_err); + } + + // Create IStep error log and cross reference error that occurred + io_stepError.addErrorDetails(io_err); + + // Commit error. Log should be deleted and set to NULL in errlCommit. + errlCommit( io_err, i_componentId ); + } // end if ( i_err ) +} + + + + diff --git a/src/usr/isteps/istepHelperFuncs.H b/src/usr/isteps/istepHelperFuncs.H index e924a9dd5..51d72cd8b 100644 --- a/src/usr/isteps/istepHelperFuncs.H +++ b/src/usr/isteps/istepHelperFuncs.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -37,6 +37,9 @@ // fapi2 HWP invoker #include <fapi2/plat_hwp_invoker.H> +// IStep Error support +#include <isteps/hwpisteperror.H> + /** * @brief Enum specifying what attributes should be used to set the * memory _EFF_CONFIG attributes @@ -354,4 +357,45 @@ errlHndl_t computeDynamicMemoryVoltage() } +/** + * @brief + * This functions captures the user details of the given targets, + * if given any, and is added to the error log handle. Once the error + * log has the user data, for the given targets, the details of error + * log or added to the io_stepError. The error log is then committed + * with the given component ID, leaving the error log handle NULL. + * + * If no valid targets are given, everything is the same as above - + * io_stepError will contain the io_err info and the io_err will be + * committed - except the io_stepError will not contain any info + * collected from targets. + * + * @param[in/out] io_err + * An error log handle, that contains the error log info. Can be NULL. If + * NULL then this function becomes a no-op. BEWARE: Upon exit of + * this function, the handle will be NULL. + * + * @param[out] io_stepError + * The details from the error handle, io_err, which will be added to this. + * + * @param[in] i_componentId + * The component ID that will be associated with the error handler, io_err, + * when the error is committed. + * + * @param[in] i_target, i_targetList + * The list of target(s) that will be assimilated and have their knowledge + * added to the collective and when I say collective, I mean the error log + * handle, io_err ... resistance is futile. If not target is given, then + * target data will not be collected. + */ +void captureError(errlHndl_t &io_err, + ISTEP_ERROR::IStepError &io_stepError, + compId_t i_componentId, + const TARGETING::Target* i_target = nullptr); + +void captureError(errlHndl_t &io_err, + ISTEP_ERROR::IStepError &io_stepError, + compId_t i_componentId, + const TARGETING::TargetHandleList &i_targetList); + #endif diff --git a/src/usr/isteps/makefile b/src/usr/isteps/makefile index 4b92f00b7..c247775e6 100644 --- a/src/usr/isteps/makefile +++ b/src/usr/isteps/makefile @@ -47,6 +47,7 @@ SUBDIRS+=cpuWkup.d SUBDIRS+=p9_phbPerst.d SUBDIRS+=tod.d SUBDIRS+=fab_iovalid.d +SUBDIRS+=nest.d OBJS += hwpisteperror.o OBJS += hwpistepud.o diff --git a/src/usr/isteps/nest/makefile b/src/usr/isteps/nest/makefile new file mode 100644 index 000000000..6a0a35625 --- /dev/null +++ b/src/usr/isteps/nest/makefile @@ -0,0 +1,85 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/isteps/nest/makefile $ +# +# OpenPOWER HostBoot Project +# +# Contributors Listed Below - COPYRIGHT 2016,2018 +# [+] 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 +ROOTPATH = ../../../.. +MODULE = isteps_nest + +PROCEDURES_PATH += ${ROOTPATH}/src/import/chips/p9/procedures + +EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/initfiles +EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/io +EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/perv +EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/nest +EXTRAINCDIR += ${ROOTPATH}/src/usr/isteps/ +EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/ +EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include/ +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/common/utils/imageProcs/ + +EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/initfiles + +OBJS += nestHwpHelperFuncs.o + +VPATH += ${PROCEDURES_PATH}/hwp/initfiles +VPATH += ${PROCEDURES_PATH}/hwp/io +VPATH += ${PROCEDURES_PATH}/hwp/nest +VPATH += ${PROCEDURES_PATH}/hwp/perv + +# Required include before all the procedure.mk are included +include ${ROOTPATH}/procedure.rules.mk + +# proc_chiplet_scominit : Scom inits to all chiplets (sans Quad) +include ${PROCEDURES_PATH}/hwp/initfiles/p9_psi_scom.mk +include ${PROCEDURES_PATH}/hwp/initfiles/p9_fbc_ioo_tl_scom.mk +include ${PROCEDURES_PATH}/hwp/initfiles/p9_fbc_ioo_dl_scom.mk +include ${PROCEDURES_PATH}/hwp/initfiles/p9_nx_scom.mk +include ${PROCEDURES_PATH}/hwp/initfiles/p9_cxa_scom.mk +include ${PROCEDURES_PATH}/hwp/initfiles/p9_mmu_scom.mk +include ${PROCEDURES_PATH}/hwp/initfiles/p9_vas_scom.mk +include ${PROCEDURES_PATH}/hwp/initfiles/p9c_dmi_scom.mk +include ${PROCEDURES_PATH}/hwp/initfiles/p9c_mi_scom.mk +include ${PROCEDURES_PATH}/hwp/initfiles/p9c_mc_scom.mk +include ${PROCEDURES_PATH}/hwp/nest/p9_chiplet_scominit.mk +include ${PROCEDURES_PATH}/hwp/nest/p9_psi_scominit.mk +include ${PROCEDURES_PATH}/hwp/initfiles/p9n_mcs_scom.mk +include ${PROCEDURES_PATH}/hwp/initfiles/p9_int_scom.mk + +# call_host_p9_fbc_eff_config_links: Determine powerbus config +include ${PROCEDURES_PATH}/hwp/nest/p9_fbc_eff_config_links.mk + +# call_host_set_voltages: Set correct chip voltages +include ${PROCEDURES_PATH}/hwp/nest/p9_sys_chiplet_scominit.mk + +# proc_chiplet_enable_ridi : Apply RI/DI chip wide +include ${PROCEDURES_PATH}/hwp/perv/p9_chiplet_enable_ridi.mk + +# proc_obus_scominit : Apply scom inits to Obus +include ${PROCEDURES_PATH}/hwp/io/p9_io_obus_scominit.mk +include ${PROCEDURES_PATH}/hwp/initfiles/p9_obus_scom.mk + +# proc_npu_scominit : Apply scom inits to NPU bus +include ${PROCEDURES_PATH}/hwp/initfiles/p9_npu_scom.mk +include ${PROCEDURES_PATH}/hwp/nest/p9_npu_scominit.mk +include ${PROCEDURES_PATH}/hwp/perv/p9_nv_ref_clk_enable.mk + +include ${ROOTPATH}/config.mk diff --git a/src/usr/isteps/nest/nestHwpHelperFuncs.C b/src/usr/isteps/nest/nestHwpHelperFuncs.C new file mode 100644 index 000000000..451caf79f --- /dev/null +++ b/src/usr/isteps/nest/nestHwpHelperFuncs.C @@ -0,0 +1,293 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/nest/nestHwpHelperFuncs.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ +/* [+] 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 */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include "nestHwpHelperFuncs.H" + +// STD support +#include <map> + +// Tracing support +#include <trace/interface.H> // TRACFCOMP +#include <initservice/isteps_trace.H> // g_trac_isteps_trace + +// Targeting support +#include <fapi2_target.H> // fapi2::Target +#include <target.H> // TARGETING::Target + +// Error handling support +#include <istepHelperFuncs.H> // captureError +#include <errl/errlentry.H> // errlHndl_t + +// HWP call support +#include <fapi2/plat_hwp_invoker.H> // FAPI_INVOKE_HWP +#include <p9_chiplet_enable_ridi.H> +#include <p9_chiplet_scominit.H> +#include <p9_psi_scominit.H> +#include <p9_npu_scominit.H> +#include <p9_io_obus_scominit.H> +#include <p9_xbus_enable_ridi.H> +#include <p9_fbc_eff_config_links.H> +#include <p9_sys_chiplet_scominit.H> +#include <p9_chiplet_fabric_scominit.H> + +namespace ISTEP +{ +using namespace ISTEP_ERROR; +using namespace ISTEPS_TRACE; + +// Size of string that contains "ERROR" or "SUCCESS" message +constexpr const int l_errorSuccesStrSize = 40; + + /** + * + * hwpCallToString + */ +const char * hwpCallToString( HWP_CALL_TYPE i_hwpCall ) +{ + const static std::map<HWP_CALL_TYPE, const char*> hwpCallToStringMap = + { + { P9_CHIPLET_ENABLE_RIDI, "p9_chiplet_enable_ridi"}, + { P9_CHIPLET_FABRIC_SCOMINIT, "p9_chiplet_fabric_scominit" }, + { P9_CHIPLET_SCOMINIT, "p9_chiplet_scominit" }, + { P9_FBC_EFF_CONFIG_LINKS_T_F, "p9_fbc_eff_config_links" }, + { P9_FBC_EFF_CONFIG_LINKS_F_T, "p9_fbc_eff_config_links" }, + { P9_IO_OBUS_SCOMINIT, "p9_io_obus_scominit" }, + { P9_NPU_SCOMINIT, "p9_npu_scominit" }, + { P9_PSI_SCOMINIT, "p9_psi_scominit" }, + { P9_SYS_CHIPLET_SCOMINIT, "p9_sys_chiplet_scominit" }, + { P9_XBUS_ENABLE_RIDI, "p9_xbus_enable_ridi" }, + }; + + if (hwpCallToStringMap.count(i_hwpCall) > 0) + { + return hwpCallToStringMap.at(i_hwpCall); + } + else + { + return ""; + } +} + +/** + * fapiHWPCallWrapper + */ +void fapiHWPCallWrapper(HWP_CALL_TYPE i_hwpCall, + IStepError &o_stepError, + compId_t i_componentId, + TARGETING::TYPE i_targetType) +{ + // Cache the HWP call in string form + const char* l_hwpCallStr = hwpCallToString(i_hwpCall); + + TRACFCOMP(g_trac_isteps_trace, + ENTER_MRK"fapiHWPCallWrapper (%s) entry", l_hwpCallStr); + + // An error handler + errlHndl_t l_err(nullptr); + + // Get a list of all the processors in the system + TARGETING::TargetHandleList l_targetList; + if (TARGETING::TYPE_PROC == i_targetType) + { + getAllChips(l_targetList, i_targetType); + } + else if (TARGETING::TYPE_OBUS == i_targetType) + { + getAllChiplets(l_targetList, i_targetType); + } + else + { + assert(0, "ERROR: Invalid target type %d", i_targetType); + } + + if (l_targetList.empty()) + { + TRACFCOMP(g_trac_isteps_trace, "Target list empty, no targets " + "found. HWP call %s will not be called", l_hwpCallStr); + } + + // Loop through all processors including master + for (const auto & l_target: l_targetList) + { + // A string to contain an error or success message, defaulted to success + char l_errorSuccesStr[l_errorSuccesStrSize] = "SUCCESS"; + + TRACFCOMP(g_trac_isteps_trace, + "Running %s HWP on target HUID %.8X", + l_hwpCallStr, + TARGETING::get_huid(l_target)); + + // Call HWP calls for chips (target type: TYPE_PROC) + if (TARGETING::TYPE_PROC == i_targetType) + { + // Get a FAPI2 target of type PROC + const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>l_fapi2Target(l_target); + + if (P9_XBUS_ENABLE_RIDI == i_hwpCall) + { + FAPI_INVOKE_HWP(l_err, + p9_xbus_enable_ridi, + l_fapi2Target); + } + else if (P9_CHIPLET_ENABLE_RIDI == i_hwpCall) + { + FAPI_INVOKE_HWP(l_err, + p9_chiplet_enable_ridi, + l_fapi2Target); + } + else if (P9_CHIPLET_SCOMINIT == i_hwpCall) + { + FAPI_INVOKE_HWP(l_err, + p9_chiplet_scominit, + l_fapi2Target); + } + else if (P9_PSI_SCOMINIT == i_hwpCall) + { + FAPI_INVOKE_HWP(l_err, + p9_psi_scominit, + l_fapi2Target); + } + else if (P9_NPU_SCOMINIT == i_hwpCall) + { + FAPI_INVOKE_HWP(l_err, + p9_npu_scominit, + l_fapi2Target); + } + else if (P9_FBC_EFF_CONFIG_LINKS_F_T == i_hwpCall) + { + FAPI_INVOKE_HWP(l_err, + p9_fbc_eff_config_links, + l_fapi2Target, + SMP_ACTIVATE_PHASE2, // P9 build SMP operation + false, // process electrical + true); // process optical + } + else if (P9_FBC_EFF_CONFIG_LINKS_T_F == i_hwpCall) + { + FAPI_INVOKE_HWP(l_err, + p9_fbc_eff_config_links, + l_fapi2Target, + SMP_ACTIVATE_PHASE1, // P9 build SMP operation + true, // process electrical + false); // process optical + } + else if (P9_SYS_CHIPLET_SCOMINIT == i_hwpCall) + { + FAPI_INVOKE_HWP(l_err, + p9_sys_chiplet_scominit, + l_fapi2Target); + } + else if (P9_CHIPLET_FABRIC_SCOMINIT == i_hwpCall) + { + FAPI_INVOKE_HWP(l_err, + p9_chiplet_fabric_scominit, + l_fapi2Target); + } + else + { + TRACFCOMP(g_trac_isteps_trace, "ERROR: Invalid/Uknown HWP call"); + break; + } + } // end if (TARGETING::TYPE_PROC == i_targetType) + // Call HWP calls for chiplets (target type: TYPE_OBUS) + else if (TARGETING::TYPE_OBUS == i_targetType) + { + // Get a FAPI2 target of type OBUS + const fapi2::Target<fapi2::TARGET_TYPE_OBUS>l_fapi2Target(l_target); + + if (P9_IO_OBUS_SCOMINIT == i_hwpCall) + { + FAPI_INVOKE_HWP(l_err, + p9_io_obus_scominit, + l_fapi2Target); + } + else + { + TRACFCOMP(g_trac_isteps_trace,"ERROR: Invalid/Uknown HWP call"); + break; + } + } // end else if (TARGETING::TYPE_OBUS == i_targetType) + else + { + assert(0, "ERROR: Invalid target type %d", i_targetType); + } + + + // If an error ocurred with HWP call, setup error message + if (l_err) + { + snprintf(l_errorSuccesStr, l_errorSuccesStrSize, + "ERROR 0x%.8X", l_err->plid()); + } + + TRACFCOMP(g_trac_isteps_trace, + "%s: %s HWP returned %s with target HUID 0x%.8X", + l_errorSuccesStr, + l_hwpCallStr, + (l_err ? "an error" : "success"), + TARGETING::get_huid(l_target)); + + if (l_err) + { + // Capture error and continue + captureError(l_err, + o_stepError, + i_componentId, + l_target); + } + } // end for (const auto & l_target: l_targetList) + + TRACFCOMP(g_trac_isteps_trace, + EXIT_MRK"fapiHWPCallWrapper (%s) exit", l_hwpCallStr); +} + +/** + * fapiHWPCallWrapperHandler + */ +bool fapiHWPCallWrapperHandler(HWP_CALL_TYPE i_hwpCall, + IStepError &o_stepError, + compId_t i_componentId, + TARGETING::TYPE i_targetType) +{ + bool l_retSuccess = true; + + fapiHWPCallWrapper(i_hwpCall, o_stepError, i_componentId, i_targetType); + + if (!o_stepError.isNull()) + { + TRACFCOMP(g_trac_isteps_trace, + "ERROR from %s", hwpCallToString(i_hwpCall)); + + l_retSuccess = false; + } + + return l_retSuccess; +} + +}; // end namespace ISTEP + diff --git a/src/usr/isteps/nest/nestHwpHelperFuncs.H b/src/usr/isteps/nest/nestHwpHelperFuncs.H new file mode 100644 index 000000000..fb35700b7 --- /dev/null +++ b/src/usr/isteps/nest/nestHwpHelperFuncs.H @@ -0,0 +1,155 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/isteps/nest/nestHwpHelperFuncs.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ +/* [+] 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 */ + +#ifndef _NEST_HWP_HELPER_FUNCS_H +#define _NEST_HWP_HELPER_FUNCS_H + +/******************************************************************************/ +// Includes +/******************************************************************************/ +// Integral and component ID support +#include <stdint.h> // uint32_t +#include <hbotcompid.H> // compId_t + +// Error handling support +#include <isteps/hwpisteperror.H> // ISTEP_ERROR::IStepError + +namespace ISTEP +{ + +/** + * @brief There seemed to be a lot of duplicated code (cut and paste) in + * different files. I provide an interface to this duplicated code and + * consolidated it here, so if the protocol ever changes there is only + * one place to make changes. + * + * @note To take advantage of this consolidation, follow these guidelines + * 1) Make sure that one of these methods will suffice for your needs + * 2) Add an enum to HWP_CALL_TYPE that is specific to your needs (in + * this .H file). This enum is the key to calling the correct HWP + * call you wish to perform (in this .H file). + * 3) Add a string representation of the HWP call to + * hwpCallToStringMap (in .C file). + * 4) Update method fapiHWPCallWrapper to accommodate and actually + * make the new HWP call (in .C file). + * NOTE: Don't forget to update include directives as well + * 5) Finally call the method with the correct parameters in the file + * that you wish to make the HWP call + */ + +/** + * @brief Enum specifying which HWP to call + */ +enum HWP_CALL_TYPE +{ + P9_CHIPLET_ENABLE_RIDI = 0, // Although it says chiplet, this uses proc chip + P9_CHIPLET_FABRIC_SCOMINIT, // Although it says chiplet, this uses proc chip + P9_CHIPLET_SCOMINIT, // Although it says chiplet, this uses proc chip + P9_FBC_EFF_CONFIG_LINKS_T_F, // process electrical(T), process optical(F) + P9_FBC_EFF_CONFIG_LINKS_F_T, // process electrical(F), process optical(T) + P9_IO_OBUS_SCOMINIT, + P9_NPU_SCOMINIT, + P9_PSI_SCOMINIT, + P9_SYS_CHIPLET_SCOMINIT, // Although it says chiplet, this uses proc chip + P9_XBUS_ENABLE_RIDI, +}; + +/** + * @brief + * Handy utility to convert an enumeration to its equivalent string. + * This is a mapping of the HWP enumeration to its string representation + * + * @param[in] i_hwpCall + * @see fapiHWPCallWrapper + * + * @return + * Returned is the string equivalent of the enumeration supplied. If the + * enumeration supplied is not valid, then an empty string is returned + * + * @note + * Do not attempt to delete the returned string, it is immutable + */ +const char * hwpCallToString( HWP_CALL_TYPE i_hwpCall ); + +/** + * @brief + * This function is the function where the actual HWP calls are made. + * Currently this function iterates over chips and chiplets and calls + * the appropriate HWP call for that particular type. + * + * @param[in] i_hwpCall + * An enumeration that specifies which HWP will be called + * + * @param[out] o_stepError + * @param[in] i_componentId + * @see hostboot/src/usr/isteps/istepHelperFuncs.H:captureError + * + * @param[in] i_targetType + * The targe type that determines to whether iterate over chips or chiplets + * + * @pre + * i_hwpCall is a valid HWP_CALL_TYPE. See enum HWP_CALL_TYPE above + * to determine which types are valid + * + * @post + * The HWP call, for the given i_hwpCall, is executed. If any error + * occurs, the details of the error will be contained in o_stepError. + * + * @note + * If i_hwpCall is not a valid value the code will be halted via an assert. + */ +void fapiHWPCallWrapper(HWP_CALL_TYPE i_hwpCall, + ISTEP_ERROR::IStepError &o_stepError, + compId_t i_componentId, + TARGETING::TYPE i_targetType); + +/** + * @brief + * This functions "handles" the call to fapiHWPCallWrapper. If that call + * succeeds then true is returned else false is returned. If + * fapiHWPCallWrapper fails this function will print an error message + * stating so. + * + * This is mainly a pass-thru function call to method fapiHWPCallWrapper. + * It's main purpose is to return whether method fapiHWPCallWrapper + * succeded or failed and print an error message upon failure. + * + * @param[in] i_hwpCall + * @param[out] o_stepError + * @param[in] i_componentId + * @param[in] i_targetType + * @see fapiHWPCallWrapper + * + * @return true if call succeeds, false otherwise + */ +bool fapiHWPCallWrapperHandler(HWP_CALL_TYPE i_hwpCall, + ISTEP_ERROR::IStepError &o_stepError, + compId_t i_componentId, + TARGETING::TYPE i_targetType); + +}; // end namespace ISTEP + +#endif + |