diff options
author | Sakethan R Kotta <sakkotta@in.ibm.com> | 2017-08-31 09:49:52 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-09-21 12:18:58 -0400 |
commit | 2fc4ac005e5f231de8ef685810487b3273cba44d (patch) | |
tree | 8d62fad2f4a184cd6f04562f158a622eb0d15822 /src/usr/isteps/istep12/call_dmi_pre_trainadv.C | |
parent | cd2a1b26917c798bb91038fbc6423b9c15d17ba9 (diff) | |
download | talos-hostboot-2fc4ac005e5f231de8ef685810487b3273cba44d.tar.gz talos-hostboot-2fc4ac005e5f231de8ef685810487b3273cba44d.zip |
HWPs for istep12
Change-Id: Ic51e6e69b5f900d4062ca8d4b5034ffab7e0d395
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45486
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com>
Reviewed-by: Thomas R. Sand <trsand@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/isteps/istep12/call_dmi_pre_trainadv.C')
-rw-r--r-- | src/usr/isteps/istep12/call_dmi_pre_trainadv.C | 90 |
1 files changed, 86 insertions, 4 deletions
diff --git a/src/usr/isteps/istep12/call_dmi_pre_trainadv.C b/src/usr/isteps/istep12/call_dmi_pre_trainadv.C index 7daa7e9be..a83fe46f5 100644 --- a/src/usr/isteps/istep12/call_dmi_pre_trainadv.C +++ b/src/usr/isteps/istep12/call_dmi_pre_trainadv.C @@ -22,17 +22,30 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ -#include <errl/errlentry.H> +#include <stdint.h> -#include <initservice/isteps_trace.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> + // targeting support. #include <targeting/common/commontargeting.H> #include <targeting/common/utilFilter.H> +//Fapi Support +#include <config.h> +#include <fapi2.H> +#include <fapi2/plat_hwp_invoker.H> +#include <util/utilmbox_scratch.H> + +//HWP +#include <p9_io_dmi_pre_trainadv.H> + using namespace ISTEP; using namespace ISTEP_ERROR; using namespace ERRORLOG; @@ -44,8 +57,77 @@ namespace ISTEP_12 void* call_dmi_pre_trainadv (void *io_pArgs) { IStepError l_StepError; - - // end task, returning any errorlogs to IStepDisp + errlHndl_t l_err = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_pre_trainadv entry" ); + + TARGETING::TargetHandleList l_dmiTargetList; + getAllChiplets(l_dmiTargetList, TYPE_DMI); + + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_pre_trainadv: %d DMIs found", + l_dmiTargetList.size()); + + for (const auto & l_dmi_target : l_dmiTargetList) + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "p9_io_dmi_pre_trainadv HWP target HUID %.8x", + TARGETING::get_huid(l_dmi_target)); + + //get the membuf associated with this DMI. + TARGETING::TargetHandleList l_pChildMembufList; + getChildAffinityTargetsByState(l_pChildMembufList, + l_dmi_target, + CLASS_CHIP, + TYPE_MEMBUF, + UTIL_FILTER_PRESENT); + // call the HWP p9_io_dmi_pre_trainadv only if membuf connected. + //we can't expect more than one membufs connected to a DMI + if (l_pChildMembufList.size() == 1) + { + // call the HWP with each DMI target + fapi2::Target<fapi2::TARGET_TYPE_DMI> l_fapi_dmi_target + (l_dmi_target); + + fapi2::Target<fapi2::TARGET_TYPE_MEMBUF_CHIP> l_fapi_membuf_target + (l_pChildMembufList[0]); + + FAPI_INVOKE_HWP(l_err, p9_io_dmi_pre_trainadv, l_fapi_dmi_target, l_fapi_membuf_target ); + + // process return code. + if ( l_err ) + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X: p9_io_dmi_pre_trainadv HWP on target HUID %.8x", + l_err->reasonCode(), TARGETING::get_huid(l_dmi_target) ); + + // capture the target data in the elog + ErrlUserDetailsTarget(l_dmi_target).addToLog( l_err ); + + // Create IStep error log and cross reference to error that occurred + l_StepError.addErrorDetails( l_err ); + + // Commit Error + errlCommit( l_err, ISTEP_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : p9_io_dmi_pre_trainadv HWP"); + } + } + else //No associated membuf + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "p9_io_dmi_pre_trainadv HWP skipped, no associated membufs %d" + ,l_pChildMembufList.size()); + } + + } + + + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_pre_trainadv exit" ); + + // end task, returning any errorlogs to IStepDisp return l_StepError.getErrorHandle(); } |