Skip to content

Commit

Permalink
HWPs for istep12
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sakethan authored and dcrowell77 committed Sep 21, 2017
1 parent cd2a1b2 commit 2fc4ac0
Show file tree
Hide file tree
Showing 15 changed files with 1,042 additions and 75 deletions.
1 change: 1 addition & 0 deletions src/build/citest/etc/workarounds.postsimsetup
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ mk -a

echo "Copying centaur and p9c action files"
sbex -t 1032952
sbex -t 1033805
4 changes: 3 additions & 1 deletion src/include/usr/fapi2/target.H
Original file line number Diff line number Diff line change
Expand Up @@ -755,8 +755,10 @@ inline std::vector<Target<K_CHILD, V> >
// Cumulus Memory
// valid children for MC
// MC -> MI
// MC -> DMI
static_assert(!((T_SELF == fapi2::TARGET_TYPE_MC) &&
(K_CHILD != fapi2::TARGET_TYPE_MI)),
(K_CHILD != fapi2::TARGET_TYPE_MI) &&
(K_CHILD != fapi2::TARGET_TYPE_DMI)),
"improper child of fapi2::TARGET_TYPE_MC");

// valid children for MI
Expand Down
65 changes: 63 additions & 2 deletions src/usr/isteps/istep12/call_cen_dmi_scominit.C
Original file line number Diff line number Diff line change
Expand Up @@ -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_cen_scominit.H>

using namespace ISTEP;
using namespace ISTEP_ERROR;
using namespace ERRORLOG;
Expand All @@ -44,6 +57,54 @@ namespace ISTEP_12
void* call_cen_dmi_scominit (void *io_pArgs)
{
IStepError l_StepError;
errlHndl_t l_err = NULL;

TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_dmi_scominit entry" );

TARGETING::TargetHandleList l_membufTargetList;
getAllChips(l_membufTargetList, TYPE_MEMBUF);

TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_dmi_scominit: %d membufs found",
l_membufTargetList.size());

for (const auto & l_membuf_target : l_membufTargetList)
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"p9_io_cen_scominit HWP target HUID %.8x",
TARGETING::get_huid(l_membuf_target));

// call the HWP with each target
fapi2::Target <fapi2::TARGET_TYPE_MEMBUF_CHIP> l_fapi_membuf_target
(l_membuf_target);

FAPI_INVOKE_HWP(l_err, p9_io_cen_scominit, l_fapi_membuf_target);

// process return code.
if ( l_err )
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"ERROR 0x%.8X: p9_io_cen_scominit HWP on target HUID %.8x",
l_err->reasonCode(), TARGETING::get_huid(l_membuf_target) );

// capture the target data in the elog
ErrlUserDetailsTarget(l_membuf_target).addToLog( l_err );

// Create IStep error log and cross reference to error that occurred
l_StepError.addErrorDetails( l_err );

// Commit Error
errlCommit( l_err, ISTEP_COMP_ID );
}
else
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"SUCCESS : p9_io_cen_scominit HWP");
}

}


TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_dmi_scominit exit" );

// end task, returning any errorlogs to IStepDisp
return l_StepError.getErrorHandle();
Expand Down
68 changes: 65 additions & 3 deletions src/usr/isteps/istep12/call_cen_set_inband_addr.C
Original file line number Diff line number Diff line change
Expand Up @@ -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 <p9c_set_inband_addr.H>

using namespace ISTEP;
using namespace ISTEP_ERROR;
using namespace ERRORLOG;
Expand All @@ -44,9 +57,58 @@ namespace ISTEP_12
void* call_cen_set_inband_addr (void *io_pArgs)
{
IStepError l_StepError;

errlHndl_t l_err = NULL;

TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_set_inband_addr entry" );

TARGETING::TargetHandleList l_procTargetList;
getAllChips(l_procTargetList, TYPE_PROC);

TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_set_inband_addr: %d proc chips found",
l_procTargetList.size());

for (const auto & l_proc_target : l_procTargetList)
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"p9c_set_inband_addr HWP target HUID %.8x",
TARGETING::get_huid(l_proc_target));

// call the HWP with each target
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_fapi_proc_target
(l_proc_target);

FAPI_INVOKE_HWP(l_err, p9c_set_inband_addr, l_fapi_proc_target);

// process return code.
if ( l_err )
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"ERROR 0x%.8X: p9c_set_inband_addr HWP on target HUID %.8x",
l_err->reasonCode(), TARGETING::get_huid(l_proc_target) );

// capture the target data in the elog
ErrlUserDetailsTarget(l_proc_target).addToLog( l_err );

// Create IStep error log and cross reference to error that occurred
l_StepError.addErrorDetails( l_err );

// Commit Error
errlCommit( l_err, ISTEP_COMP_ID );
}
else
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"SUCCESS : p9c_set_inband_addr HWP");
}

}


TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_set_inband_addr exit" );

// end task, returning any errorlogs to IStepDisp
return l_StepError.getErrorHandle();

}

};
88 changes: 85 additions & 3 deletions src/usr/isteps/istep12/call_dmi_attr_update.C
Original file line number Diff line number Diff line change
Expand Up @@ -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_attr_update.H>

using namespace ISTEP;
using namespace ISTEP_ERROR;
using namespace ERRORLOG;
Expand All @@ -44,7 +57,76 @@ namespace ISTEP_12
void* call_dmi_attr_update (void *io_pArgs)
{
IStepError l_StepError;

errlHndl_t l_err = NULL;

TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_attr_update entry" );

TARGETING::TargetHandleList l_dmiTargetList;
getAllChiplets(l_dmiTargetList, TYPE_DMI);

TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_attr_update: %d DMIs found",
l_dmiTargetList.size());

for (const auto & l_dmi_target : l_dmiTargetList)
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"p9_io_dmi_attr_update 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_attr_update 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_attr_update, 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_attr_update 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_attr_update HWP");
}
}
else //No associated membuf
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"p9_io_dmi_attr_update HWP skipped, no associated membufs %d"
,l_pChildMembufList.size());
}

}


TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_attr_update exit" );

// end task, returning any errorlogs to IStepDisp
return l_StepError.getErrorHandle();
}
Expand Down

0 comments on commit 2fc4ac0

Please sign in to comment.