summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C
diff options
context:
space:
mode:
authorRichard J. Knight <rjknight@us.ibm.com>2012-11-27 06:48:35 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-12-04 14:31:18 -0600
commit07e1c50a631d79121228354e94e2158336c843c5 (patch)
tree46db21f7281769e8f6c616f6704432ab187c6387 /src/usr/hwpf/hwp/dram_initialization/dram_initialization.C
parent311a4d5cdf3d615356d7580a94fd4f783fa45fbd (diff)
downloadtalos-hostboot-07e1c50a631d79121228354e94e2158336c843c5.tar.gz
talos-hostboot-07e1c50a631d79121228354e94e2158336c843c5.zip
Add proc_mpipl_ex_cleanup and proc_mpipl_chip_cleanup to hostboot
This commit inclues code for RTC stories 41407 and 41408, both procedures are run in the same istep. Change-Id: If1d446061fb12a3331e090908f85fbf38f694ac2 Depends-on: I185ab08b59ca0b76bf72246de82b5b8d32b60b14 RTC:41407 RTC:41408 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2464 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp/dram_initialization/dram_initialization.C')
-rw-r--r--src/usr/hwpf/hwp/dram_initialization/dram_initialization.C103
1 files changed, 97 insertions, 6 deletions
diff --git a/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C b/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C
index 8e8579829..45170890b 100644
--- a/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C
+++ b/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C
@@ -63,6 +63,8 @@
// Uncomment these files as they become available:
// #include "host_startPRD_dram/host_startPRD_dram.H"
+#include "host_mpipl_service/proc_mpipl_ex_cleanup.H"
+#include "host_mpipl_service/proc_mpipl_chip_cleanup.H"
#include "mss_extent_setup/mss_extent_setup.H"
// #include "mss_memdiag/mss_memdiag.H"
// #include "mss_scrub/mss_scrub.H"
@@ -391,7 +393,6 @@ void* call_proc_setup_bars( void *io_pArgs )
TARGETING::TargetHandleList l_cpuTargetList;
getAllChips(l_cpuTargetList, TYPE_PROC );
-
// -----------------------------------------------------------------------
// run mss_setup_bars on all CPUs.
// -----------------------------------------------------------------------
@@ -777,16 +778,106 @@ void* call_proc_exit_cache_contained( void *io_pArgs )
//
void* call_host_mpipl_service( void *io_pArgs )
{
- errlHndl_t l_errl = NULL;
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ IStepError l_StepError;
+
+ errlHndl_t l_err = NULL;
+
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_mpipl_service entry" );
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "call_host_mpipl_service exit" );
+ // call proc_mpipl_chip_cleanup.C
+ TARGETING::TargetHandleList l_procTargetList;
+ getAllChips(l_procTargetList, TYPE_PROC );
- return l_errl;
+ // ---------------------------------------------------------------
+ // run proc_mpipl_chip_cleanup.C on all proc chips
+ // ---------------------------------------------------------------
+ for (TargetHandleList::iterator l_iter = l_procTargetList.begin();
+ l_iter != l_procTargetList.end(); ++l_iter)
+ {
+ // make a local copy of the target for ease of use
+ const TARGETING::Target* l_pProcTarget = *l_iter;
+
+ // dump physical path to targets
+ EntityPath l_path;
+ l_path = l_pProcTarget->getAttr<ATTR_PHYS_PATH>();
+ l_path.dump();
+
+ // cast OUR type of target to a FAPI type of target.
+ const fapi::Target l_fapi_pProcTarget(
+ TARGET_TYPE_PROC_CHIP,
+ reinterpret_cast<void *>
+ (const_cast<TARGETING::Target*>
+ (l_pProcTarget)) );
+
+ // call the HWP with each fapi::Target
+ FAPI_INVOKE_HWP(l_err, proc_mpipl_chip_cleanup,
+ l_fapi_pProcTarget );
+
+ if ( l_err )
+ {
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR : returned from proc_mpipl_chip_cleanup" );
+
+ // capture the target data in the elog
+ ERRORLOG::ErrlUserDetailsTarget(l_pProcTarget).addToLog( l_err );
+
+ // since we are doing an mpipl break out, the mpipl has failed
+ break;
+ }
+
+ // ---------------------------------------------------------------
+ // run proc_mpipl_ex_cleanup.C on all proc chips
+ // ---------------------------------------------------------------
+ // call the HWP with each fapi::Target
+ FAPI_INVOKE_HWP(l_err,
+ proc_mpipl_ex_cleanup,
+ l_fapi_pProcTarget );
+
+ if ( l_err )
+ {
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR : returned from proc_mpipl_ex_cleanup" );
+
+ // capture the target data in the elog
+ ERRORLOG::ErrlUserDetailsTarget(l_pProcTarget).addToLog( l_err );
+
+ // since we are doing an mpipl break out, the mpipl has failed
+ break;
+ }
+ }
+
+ if( l_err )
+ {
+
+ /*@
+ * @errortype
+ * @reasoncode ISTEP_DRAM_INITIALIZATION_FAILED
+ * @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE
+ * @moduleid TARGETING::ISTEP_HOST_MPIPL_SERVICE
+ * @userdata1 bytes 0-1: plid identifying first error
+ * bytes 2-3: reason code of first error
+ * @userdata2 bytes 0-1: total number of elogs
+ * included
+ * bytes 2-3: N/A
+ * @devdesc call to proc_mpipl_ex_cleanup or
+ * proc_mpipl_chip_cleanup has failed
+ * see error log identified by the plid
+ * in user data 1
+ */
+ l_StepError.addErrorDetails(
+ ISTEP_DRAM_INITIALIZATION_FAILED,
+ ISTEP_HOST_MPIPL_SERVICE,
+ l_err );
+
+ errlCommit( l_err, HWPF_COMP_ID );
+ }
+
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "call_host_mpipl_service exit" );
+ return l_StepError.getErrorHandle();
}
}; // end namespace
OpenPOWER on IntegriCloud