summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Geddes <crgeddes@us.ibm.com>2019-03-05 15:29:32 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-04-24 16:47:00 -0500
commit07fbdf5d4f290f2ca1605b54dd172a90346c4960 (patch)
tree15b47b6008d8072ff4c0f92ccb47cc370b1dbdae /src
parentf619d06251d5c63b707fcae87aa1c9e396f4ff74 (diff)
downloadtalos-hostboot-07fbdf5d4f290f2ca1605b54dd172a90346c4960.tar.gz
talos-hostboot-07fbdf5d4f290f2ca1605b54dd172a90346c4960.zip
Compile and call p9a_io_omi_scominit
Add call to istep 12.6 to call p9a_io_omi_scominit as per P9A IPL Flow documentation. Change-Id: I2f274c6d09b41b0a2a5b2c18dd5365c6f830b27d Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/72879 Reviewed-by: Glenn Miles <milesg@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: Matt Derksen <mderkse1@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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/usr/isteps/istep12/call_dmi_io_dccal.C210
-rw-r--r--src/usr/isteps/istep12/makefile6
2 files changed, 152 insertions, 64 deletions
diff --git a/src/usr/isteps/istep12/call_dmi_io_dccal.C b/src/usr/isteps/istep12/call_dmi_io_dccal.C
index ca2d11aef..135065681 100644
--- a/src/usr/isteps/istep12/call_dmi_io_dccal.C
+++ b/src/usr/isteps/istep12/call_dmi_io_dccal.C
@@ -43,9 +43,14 @@
#include <fapi2/plat_hwp_invoker.H>
#include <util/utilmbox_scratch.H>
-// HWP
+// HWP (only bring in model-specific HWP headers to save space)
+#ifdef CONFIG_AXONE
+#include <p9a_io_omi_dccal.H>
+#include <p9a_io_omi_scominit.H>
+#else
#include <p9_io_dmi_dccal.H>
#include <p9_io_cen_dccal.H>
+#endif
using namespace ISTEP;
using namespace ISTEP_ERROR;
@@ -55,101 +60,180 @@ using namespace TARGETING;
namespace ISTEP_12
{
+
+// Declare local functions
+void cumulus_dccal_setup(IStepError & io_istepError);
+void axone_dccal_setup(IStepError & io_istepError);
+
void* call_dmi_io_dccal (void *io_pArgs)
{
IStepError l_StepError;
- errlHndl_t l_err = NULL;
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_io_dccal entry" );
do
{
+ auto l_procModel = TARGETING::targetService().getProcessorModel();
- TARGETING::TargetHandleList l_procTargetList;
- getAllChips(l_procTargetList, TYPE_PROC);
-
- if(l_procTargetList[0]->getAttr<TARGETING::ATTR_MODEL>() != TARGETING::MODEL_CUMULUS)
+ switch (l_procModel)
{
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "p9_io_dmi_dccal Proccessor model is not CUMULUS , skipping this step");
- break;
+ case TARGETING::MODEL_CUMULUS:
+ cumulus_dccal_setup(l_StepError);
+ break;
+ case TARGETING::MODEL_AXONE:
+ axone_dccal_setup(l_StepError);
+ break;
+ case TARGETING::MODEL_NIMBUS:
+ default:
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "skipping p9_io_dmi_dccal because not required for current processor model 0x%x", l_procModel);
+ break;
}
- for (const auto & l_proc_target : l_procTargetList)
- {
- // a. p9_io_dmi_dccal.C (DMI target)
+ }while(0);
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "p9_io_dmi_dccal 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);
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_io_dccal exit" );
- FAPI_INVOKE_HWP(l_err, p9_io_dmi_dccal, l_fapi_proc_target);
+ // end task, returning any errorlogs to IStepDisp
+ return l_StepError.getErrorHandle();
+}
- // process return code.
- if ( l_err )
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR 0x%.8X: p9_io_dmi_dccal HWP on target HUID %.8x",
- l_err->reasonCode(), TARGETING::get_huid(l_proc_target) );
+#ifndef CONFIG_AXONE
+void cumulus_dccal_setup(IStepError & io_istepError)
+{
+ errlHndl_t l_err = nullptr;
+ TARGETING::TargetHandleList l_procTargetList;
+ getAllChips(l_procTargetList, TYPE_PROC);
- // capture the target data in the elog
- ErrlUserDetailsTarget(l_proc_target).addToLog( l_err );
+ for (const auto & l_proc_target : l_procTargetList)
+ {
+ // a. p9_io_dmi_dccal.C (DMI target)
- // Create IStep error log and cross reference to error that occurred
- l_StepError.addErrorDetails( l_err );
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "p9_io_dmi_dccal HWP target HUID %.8x",
+ TARGETING::get_huid(l_proc_target));
- // Commit Error
- errlCommit( l_err, ISTEP_COMP_ID );
- }
- else
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : p9_io_dmi_dccal HWP");
- }
+ // call the HWP with each target
+ fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_fapi_proc_target
+ (l_proc_target);
- // b. p9_io_cen_dccal.C (Centaur target)
+ FAPI_INVOKE_HWP(l_err, p9_io_dmi_dccal, l_fapi_proc_target);
+ // process return code.
+ if ( l_err )
+ {
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "p9_io_cen_dccal HWP target HUID %.8x",
- TARGETING::get_huid(l_proc_target));
+ "ERROR 0x%.8X: p9_io_dmi_dccal HWP on target HUID %.8x",
+ l_err->reasonCode(), TARGETING::get_huid(l_proc_target) );
- FAPI_INVOKE_HWP(l_err, p9_io_cen_dccal, l_fapi_proc_target);
+ // capture the target data in the elog
+ ErrlUserDetailsTarget(l_proc_target).addToLog( l_err );
- // process return code.
- if ( l_err )
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR 0x%.8X: p9_io_cen_dccal HWP on target HUID %.8x",
- l_err->reasonCode(), TARGETING::get_huid(l_proc_target) );
+ // Create IStep error log and cross reference to error that occurred
+ io_istepError.addErrorDetails( l_err );
- // capture the target data in the elog
- ErrlUserDetailsTarget(l_proc_target).addToLog( l_err );
+ // Commit Error
+ errlCommit( l_err, ISTEP_COMP_ID );
+ }
+ else
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "SUCCESS : p9_io_dmi_dccal HWP on target HUID %.8x",
+ TARGETING::get_huid(l_proc_target) );
+ }
- // Create IStep error log and cross reference to error that occurred
- l_StepError.addErrorDetails( l_err );
+ // b. p9_io_cen_dccal.C (Centaur target)
- // Commit Error
- errlCommit( l_err, ISTEP_COMP_ID );
- }
- else
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : p9_io_cen_dccal HWP");
- }
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "p9_io_cen_dccal HWP target HUID %.8x",
+ TARGETING::get_huid(l_proc_target));
+
+ FAPI_INVOKE_HWP(l_err, p9_io_cen_dccal, l_fapi_proc_target);
+
+ // process return code.
+ if ( l_err )
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR 0x%.8X: p9_io_cen_dccal 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
+ io_istepError.addErrorDetails( l_err );
+
+ // Commit Error
+ errlCommit( l_err, ISTEP_COMP_ID );
+ }
+ else
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "SUCCESS : p9_io_cen_dccal HWP on target HUID %.8x",
+ TARGETING::get_huid(l_proc_target) );
}
- }while(0);
+ }
+}
+#else
+void cumulus_dccal_setup(IStepError & io_istepError)
+{
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "Error: Trying to call 'p9_io_dmi_dccal' and 'p9_io_cen_dccal' but Cumulus code is not compiled in");
+ assert(0, "Calling wrong Model's HWPs");
+}
+#endif
+#ifdef CONFIG_AXONE
+void axone_dccal_setup(IStepError & io_istepError)
+{
+ errlHndl_t l_err = nullptr;
+ TARGETING::TargetHandleList l_omicTargetList;
+ getAllChiplets(l_omicTargetList, TYPE_OMIC);
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_io_dccal exit" );
+ for (const auto & l_omic_target : l_omicTargetList)
+ {
+ // call the HWP with each target
+ fapi2::Target<fapi2::TARGET_TYPE_OMIC> l_fapi_omic_target
+ (l_omic_target);
- // end task, returning any errorlogs to IStepDisp
- return l_StepError.getErrorHandle();
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "p9a_io_omi_scominit HWP target HUID %.8x",
+ TARGETING::get_huid(l_omic_target));
+
+ FAPI_INVOKE_HWP(l_err, p9a_io_omi_scominit, l_fapi_omic_target);
+ // process return code.
+ if ( l_err )
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR 0x%.8X: p9a_io_omi_scominit HWP on target HUID %.8x",
+ l_err->reasonCode(), TARGETING::get_huid(l_omic_target) );
+
+ // capture the target data in the elog
+ ErrlUserDetailsTarget(l_omic_target).addToLog( l_err );
+
+ // Create IStep error log and cross reference to error that occurred
+ io_istepError.addErrorDetails( l_err );
+
+ // Commit Error
+ errlCommit( l_err, ISTEP_COMP_ID );
+ }
+ else
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "SUCCESS : p9a_io_omi_scominit HWP on target HUID %.8x",
+ TARGETING::get_huid(l_omic_target) );
+ }
+ }
+}
+#else
+void axone_dccal_setup(IStepError & io_istepError)
+{
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "Error: Trying to call 'p9a_io_omi_scominit' but Axone code is not compiled in");
+ assert(0, "Calling wrong Model's HWPs");
}
+#endif
};
diff --git a/src/usr/isteps/istep12/makefile b/src/usr/isteps/istep12/makefile
index 6e565529d..45b7f463d 100644
--- a/src/usr/isteps/istep12/makefile
+++ b/src/usr/isteps/istep12/makefile
@@ -121,11 +121,11 @@ include $(P9_IO_HWP_PATH)/p9_io_dmi_clear_firs.mk
include $(CENT_INITFILE_PATH)/centaur_dmi_scom.mk
include $(P9_IO_HWP_PATH)/p9_io_erepairAccessorHwpFuncs.mk
-
VPATH += $(if $(CONFIG_AXONE),${P9A_MSS_HWP_PATH},)
VPATH += $(if $(CONFIG_AXONE),${EXPLORER_HWP_PATH},)
VPATH += $(if $(CONFIG_AXONE),${EXPLORER_OMI_HWP_PATH},)
VPATH += $(if $(CONFIG_AXONE),${P9_MEMORY_HWP_PATH},)
+
OBJS += $(if $(CONFIG_AXONE),exp_omi_utils.o,)
OBJS += $(if $(CONFIG_AXONE),exp_omi_setup.o,)
OBJS += $(if $(CONFIG_AXONE),exp_omi_train.o,)
@@ -136,6 +136,10 @@ OBJS += $(if $(CONFIG_AXONE),p9a_addr_ext.o,)
OBJS += $(if $(CONFIG_AXONE),exp_omi_init.o,)
OBJS += $(if $(CONFIG_AXONE),p9a_omi_init.o,)
OBJS += $(if $(CONFIG_AXONE),p9a_omi_init_scom.o,)
+OBJS += $(if $(CONFIG_AXONE),p9a_omi_io_scom.o,)
+OBJS += $(if $(CONFIG_AXONE),p9a_omic_io_scom.o,)
+OBJS += $(if $(CONFIG_AXONE),p9a_io_omi_scominit.o,)
+OBJS += $(if $(CONFIG_AXONE),p9a_io_omi_dccal.o,)
include ${ROOTPATH}/config.mk
OpenPOWER on IntegriCloud