Skip to content

Commit 2fc4ac0

Browse files
sakethandcrowell77
authored andcommitted
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>
1 parent cd2a1b2 commit 2fc4ac0

15 files changed

+1042
-75
lines changed

src/build/citest/etc/workarounds.postsimsetup

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,4 @@ mk -a
5050

5151
echo "Copying centaur and p9c action files"
5252
sbex -t 1032952
53+
sbex -t 1033805

src/include/usr/fapi2/target.H

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,8 +755,10 @@ inline std::vector<Target<K_CHILD, V> >
755755
// Cumulus Memory
756756
// valid children for MC
757757
// MC -> MI
758+
// MC -> DMI
758759
static_assert(!((T_SELF == fapi2::TARGET_TYPE_MC) &&
759-
(K_CHILD != fapi2::TARGET_TYPE_MI)),
760+
(K_CHILD != fapi2::TARGET_TYPE_MI) &&
761+
(K_CHILD != fapi2::TARGET_TYPE_DMI)),
760762
"improper child of fapi2::TARGET_TYPE_MC");
761763

762764
// valid children for MI

src/usr/isteps/istep12/call_cen_dmi_scominit.C

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,30 @@
2222
/* permissions and limitations under the License. */
2323
/* */
2424
/* IBM_PROLOG_END_TAG */
25-
#include <errl/errlentry.H>
25+
#include <stdint.h>
2626

27-
#include <initservice/isteps_trace.H>
27+
#include <trace/interface.H>
28+
#include <initservice/taskargs.H>
29+
#include <errl/errlentry.H>
2830

2931
#include <isteps/hwpisteperror.H>
3032
#include <errl/errludtarget.H>
3133

34+
#include <initservice/isteps_trace.H>
35+
3236
// targeting support.
3337
#include <targeting/common/commontargeting.H>
3438
#include <targeting/common/utilFilter.H>
3539

40+
//Fapi Support
41+
#include <config.h>
42+
#include <fapi2.H>
43+
#include <fapi2/plat_hwp_invoker.H>
44+
#include <util/utilmbox_scratch.H>
45+
46+
// HWP
47+
#include <p9_io_cen_scominit.H>
48+
3649
using namespace ISTEP;
3750
using namespace ISTEP_ERROR;
3851
using namespace ERRORLOG;
@@ -44,6 +57,54 @@ namespace ISTEP_12
4457
void* call_cen_dmi_scominit (void *io_pArgs)
4558
{
4659
IStepError l_StepError;
60+
errlHndl_t l_err = NULL;
61+
62+
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_dmi_scominit entry" );
63+
64+
TARGETING::TargetHandleList l_membufTargetList;
65+
getAllChips(l_membufTargetList, TYPE_MEMBUF);
66+
67+
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_dmi_scominit: %d membufs found",
68+
l_membufTargetList.size());
69+
70+
for (const auto & l_membuf_target : l_membufTargetList)
71+
{
72+
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
73+
"p9_io_cen_scominit HWP target HUID %.8x",
74+
TARGETING::get_huid(l_membuf_target));
75+
76+
// call the HWP with each target
77+
fapi2::Target <fapi2::TARGET_TYPE_MEMBUF_CHIP> l_fapi_membuf_target
78+
(l_membuf_target);
79+
80+
FAPI_INVOKE_HWP(l_err, p9_io_cen_scominit, l_fapi_membuf_target);
81+
82+
// process return code.
83+
if ( l_err )
84+
{
85+
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
86+
"ERROR 0x%.8X: p9_io_cen_scominit HWP on target HUID %.8x",
87+
l_err->reasonCode(), TARGETING::get_huid(l_membuf_target) );
88+
89+
// capture the target data in the elog
90+
ErrlUserDetailsTarget(l_membuf_target).addToLog( l_err );
91+
92+
// Create IStep error log and cross reference to error that occurred
93+
l_StepError.addErrorDetails( l_err );
94+
95+
// Commit Error
96+
errlCommit( l_err, ISTEP_COMP_ID );
97+
}
98+
else
99+
{
100+
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
101+
"SUCCESS : p9_io_cen_scominit HWP");
102+
}
103+
104+
}
105+
106+
107+
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_dmi_scominit exit" );
47108

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

src/usr/isteps/istep12/call_cen_set_inband_addr.C

Lines changed: 65 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,30 @@
2222
/* permissions and limitations under the License. */
2323
/* */
2424
/* IBM_PROLOG_END_TAG */
25-
#include <errl/errlentry.H>
25+
#include <stdint.h>
2626

27-
#include <initservice/isteps_trace.H>
27+
#include <trace/interface.H>
28+
#include <initservice/taskargs.H>
29+
#include <errl/errlentry.H>
2830

2931
#include <isteps/hwpisteperror.H>
3032
#include <errl/errludtarget.H>
3133

34+
#include <initservice/isteps_trace.H>
35+
3236
// targeting support.
3337
#include <targeting/common/commontargeting.H>
3438
#include <targeting/common/utilFilter.H>
3539

40+
//Fapi Support
41+
#include <config.h>
42+
#include <fapi2.H>
43+
#include <fapi2/plat_hwp_invoker.H>
44+
#include <util/utilmbox_scratch.H>
45+
46+
//HWP
47+
#include <p9c_set_inband_addr.H>
48+
3649
using namespace ISTEP;
3750
using namespace ISTEP_ERROR;
3851
using namespace ERRORLOG;
@@ -44,9 +57,58 @@ namespace ISTEP_12
4457
void* call_cen_set_inband_addr (void *io_pArgs)
4558
{
4659
IStepError l_StepError;
47-
60+
errlHndl_t l_err = NULL;
61+
62+
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_set_inband_addr entry" );
63+
64+
TARGETING::TargetHandleList l_procTargetList;
65+
getAllChips(l_procTargetList, TYPE_PROC);
66+
67+
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_set_inband_addr: %d proc chips found",
68+
l_procTargetList.size());
69+
70+
for (const auto & l_proc_target : l_procTargetList)
71+
{
72+
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
73+
"p9c_set_inband_addr HWP target HUID %.8x",
74+
TARGETING::get_huid(l_proc_target));
75+
76+
// call the HWP with each target
77+
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_fapi_proc_target
78+
(l_proc_target);
79+
80+
FAPI_INVOKE_HWP(l_err, p9c_set_inband_addr, l_fapi_proc_target);
81+
82+
// process return code.
83+
if ( l_err )
84+
{
85+
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
86+
"ERROR 0x%.8X: p9c_set_inband_addr HWP on target HUID %.8x",
87+
l_err->reasonCode(), TARGETING::get_huid(l_proc_target) );
88+
89+
// capture the target data in the elog
90+
ErrlUserDetailsTarget(l_proc_target).addToLog( l_err );
91+
92+
// Create IStep error log and cross reference to error that occurred
93+
l_StepError.addErrorDetails( l_err );
94+
95+
// Commit Error
96+
errlCommit( l_err, ISTEP_COMP_ID );
97+
}
98+
else
99+
{
100+
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
101+
"SUCCESS : p9c_set_inband_addr HWP");
102+
}
103+
104+
}
105+
106+
107+
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_set_inband_addr exit" );
108+
48109
// end task, returning any errorlogs to IStepDisp
49110
return l_StepError.getErrorHandle();
111+
50112
}
51113

52114
};

src/usr/isteps/istep12/call_dmi_attr_update.C

Lines changed: 85 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,30 @@
2222
/* permissions and limitations under the License. */
2323
/* */
2424
/* IBM_PROLOG_END_TAG */
25-
#include <errl/errlentry.H>
25+
#include <stdint.h>
2626

27-
#include <initservice/isteps_trace.H>
27+
#include <trace/interface.H>
28+
#include <initservice/taskargs.H>
29+
#include <errl/errlentry.H>
2830

2931
#include <isteps/hwpisteperror.H>
3032
#include <errl/errludtarget.H>
3133

34+
#include <initservice/isteps_trace.H>
35+
3236
// targeting support.
3337
#include <targeting/common/commontargeting.H>
3438
#include <targeting/common/utilFilter.H>
3539

40+
//Fapi Support
41+
#include <config.h>
42+
#include <fapi2.H>
43+
#include <fapi2/plat_hwp_invoker.H>
44+
#include <util/utilmbox_scratch.H>
45+
46+
//HWP
47+
#include <p9_io_dmi_attr_update.H>
48+
3649
using namespace ISTEP;
3750
using namespace ISTEP_ERROR;
3851
using namespace ERRORLOG;
@@ -44,7 +57,76 @@ namespace ISTEP_12
4457
void* call_dmi_attr_update (void *io_pArgs)
4558
{
4659
IStepError l_StepError;
47-
60+
errlHndl_t l_err = NULL;
61+
62+
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_attr_update entry" );
63+
64+
TARGETING::TargetHandleList l_dmiTargetList;
65+
getAllChiplets(l_dmiTargetList, TYPE_DMI);
66+
67+
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_attr_update: %d DMIs found",
68+
l_dmiTargetList.size());
69+
70+
for (const auto & l_dmi_target : l_dmiTargetList)
71+
{
72+
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
73+
"p9_io_dmi_attr_update HWP target HUID %.8x",
74+
TARGETING::get_huid(l_dmi_target));
75+
76+
//get the membuf associated with this DMI.
77+
TARGETING::TargetHandleList l_pChildMembufList;
78+
getChildAffinityTargetsByState(l_pChildMembufList,
79+
l_dmi_target,
80+
CLASS_CHIP,
81+
TYPE_MEMBUF,
82+
UTIL_FILTER_PRESENT);
83+
// call the HWP p9_io_dmi_attr_update only if membuf connected.
84+
//we can't expect more than one membufs connected to a DMI
85+
if (l_pChildMembufList.size() == 1)
86+
{
87+
// call the HWP with each DMI target
88+
fapi2::Target<fapi2::TARGET_TYPE_DMI> l_fapi_dmi_target
89+
(l_dmi_target);
90+
91+
fapi2::Target<fapi2::TARGET_TYPE_MEMBUF_CHIP> l_fapi_membuf_target
92+
(l_pChildMembufList[0]);
93+
94+
FAPI_INVOKE_HWP(l_err, p9_io_dmi_attr_update, l_fapi_dmi_target, l_fapi_membuf_target );
95+
96+
// process return code.
97+
if ( l_err )
98+
{
99+
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
100+
"ERROR 0x%.8X: p9_io_dmi_attr_update HWP on target HUID %.8x",
101+
l_err->reasonCode(), TARGETING::get_huid(l_dmi_target) );
102+
103+
// capture the target data in the elog
104+
ErrlUserDetailsTarget(l_dmi_target).addToLog( l_err );
105+
106+
// Create IStep error log and cross reference to error that occurred
107+
l_StepError.addErrorDetails( l_err );
108+
109+
// Commit Error
110+
errlCommit( l_err, ISTEP_COMP_ID );
111+
}
112+
else
113+
{
114+
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
115+
"SUCCESS : p9_io_dmi_attr_update HWP");
116+
}
117+
}
118+
else //No associated membuf
119+
{
120+
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
121+
"p9_io_dmi_attr_update HWP skipped, no associated membufs %d"
122+
,l_pChildMembufList.size());
123+
}
124+
125+
}
126+
127+
128+
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_attr_update exit" );
129+
48130
// end task, returning any errorlogs to IStepDisp
49131
return l_StepError.getErrorHandle();
50132
}

0 commit comments

Comments
 (0)