summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp/dram_training
diff options
context:
space:
mode:
authorRichard J. Knight <rjknight@us.ibm.com>2013-08-14 22:28:32 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-08-21 16:27:47 -0500
commit308db00a89c9c18c1c5e346f171f36ec34705f31 (patch)
tree27e1e2402935294701b49a405ce651ebcd2e70de /src/usr/hwpf/hwp/dram_training
parenta0a28214eff925dae2a5e1081c6d600560fafdb5 (diff)
downloadtalos-hostboot-308db00a89c9c18c1c5e346f171f36ec34705f31.tar.gz
talos-hostboot-308db00a89c9c18c1c5e346f171f36ec34705f31.zip
Update IPL flow for clocks and memory(Hostboot)
Update hostboot code to match version 1.37 of the IPL flow document. - added proc_cen_ref_clk_enable support - added mss_dimm_power_test support - deferred step 12 updates Change-Id: Ief2d55fa9864ac64b847da21f14b897006965d57 RTC:80595 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5817 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_training')
-rw-r--r--src/usr/hwpf/hwp/dram_training/dram_training.C97
-rw-r--r--src/usr/hwpf/hwp/dram_training/dram_training.H55
-rw-r--r--src/usr/hwpf/hwp/dram_training/makefile5
-rw-r--r--src/usr/hwpf/hwp/dram_training/mss_dimm_power_test/mss_dimm_power_test.C82
-rw-r--r--src/usr/hwpf/hwp/dram_training/mss_dimm_power_test/mss_dimm_power_test.H86
5 files changed, 298 insertions, 27 deletions
diff --git a/src/usr/hwpf/hwp/dram_training/dram_training.C b/src/usr/hwpf/hwp/dram_training/dram_training.C
index c0f9f43f0..3d2e11639 100644
--- a/src/usr/hwpf/hwp/dram_training/dram_training.C
+++ b/src/usr/hwpf/hwp/dram_training/dram_training.C
@@ -65,18 +65,16 @@ const uint8_t VPO_NUM_OF_MEMBUF_TO_RUN = UNLIMITED_RUN;
// -- prototype includes --
#include "dram_training.H"
-// Un-comment these files as they become available:
-// #include "host_disable_vddr/host_disable_vddr.H"
#include "mem_pll_setup/cen_mem_pll_initf.H"
#include "mem_pll_setup/cen_mem_pll_setup.H"
#include "mem_startclocks/cen_mem_startclocks.H"
-// #include "host_enable_vddr/host_enable_vddr.H"
#include "mss_scominit/mss_scominit.H"
#include "mss_ddr_phy_reset/mss_ddr_phy_reset.H"
#include "mss_draminit/mss_draminit.H"
#include "mss_draminit_training/mss_draminit_training.H"
#include "mss_draminit_trainadv/mss_draminit_training_advanced.H"
#include "mss_draminit_mc/mss_draminit_mc.H"
+#include "mss_dimm_power_test/mss_dimm_power_test.H"
namespace DRAM_TRAINING
{
@@ -936,6 +934,99 @@ void* call_mss_draminit_mc( void *io_pArgs )
return l_stepError.getErrorHandle();
}
+//
+// Wrapper function to call mss_dimm_power_test
+//
+void* call_mss_dimm_power_test( void *io_pArgs )
+{
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "call_mss_dimm_power_test entry" );
+
+ errlHndl_t l_err = NULL;
+
+ // get a list of mba targets
+ IStepError l_stepError;
+
+ TARGETING::TargetHandleList l_mbaTargetList;
+ TARGETING::TargetHandleList::const_iterator pRangeLimitItr;
+ TARGETING::TargetHandleList::const_iterator pTargetItr;
+
+ // Get all MBA targets
+ getAllChiplets(l_mbaTargetList, TYPE_MBA, true);
+
+ // Limit the number of MBAs to run in VPO environment to save time.
+ uint8_t l_mbaLimit = l_mbaTargetList.size();
+ if (TARGETING::is_vpo() && (VPO_NUM_OF_MBAS_TO_RUN < l_mbaLimit))
+ {
+ // limit the range to VPO_NUM_OF_MBAS_TO_RUN
+ pRangeLimitItr = l_mbaTargetList.begin() + VPO_NUM_OF_MBAS_TO_RUN;
+ }
+ else
+ {
+ // process all targets
+ pRangeLimitItr = l_mbaTargetList.end();
+
+ }
+ // process each target till we reach the limit set above
+ for ( TARGETING::TargetHandleList::const_iterator pTargetItr
+ = l_mbaTargetList.begin();
+ pTargetItr != pRangeLimitItr; pTargetItr++)
+ {
+ // make a local copy of the target for ease of use
+ const TARGETING::Target* l_mba_target = *pTargetItr;
+
+ // Dump current run on target
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "Running mss_dimm_power_test HWP on "
+ "target HUID %.8X", TARGETING::get_huid(l_mba_target));
+
+ // Cast to a FAPI type of target.
+ const fapi::Target l_fapi_mba_target( TARGET_TYPE_MBA_CHIPLET,
+ (const_cast<TARGETING::Target*>(l_mba_target)) );
+
+ // call the HWP with each fapi::Target
+ FAPI_INVOKE_HWP(l_err, mss_dimm_power_test, l_fapi_mba_target);
+
+ if (l_err)
+ {
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR 0x%.8X: mss_dimm_power_test HWP returns error",
+ l_err->reasonCode());
+
+ // capture the target data in the elog
+ ErrlUserDetailsTarget(l_mba_target).addToLog( l_err );
+
+ /*@
+ * @errortype
+ * @reasoncode ISTEP_DRAM_TRAINING_FAILED
+ * @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE
+ * @moduleid ISTEP_MSS_DIMM_POWER_TEST
+ * @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 mss_dimm_power_test has failed
+ */
+ l_stepError.addErrorDetails(ISTEP_DRAM_TRAINING_FAILED,
+ ISTEP_MSS_DIMM_POWER_TEST,
+ l_err );
+
+ errlCommit( l_err, HWPF_COMP_ID );
+
+ }
+ else
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "SUCCESS : call_mss_dimm_power_test HWP( )" );
+ }
+ } // end l_mbaNum loop
+
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "call_mss_dimm_power_test exit" );
+
+ return l_stepError.getErrorHandle();
+}
+
}; // end namespace
diff --git a/src/usr/hwpf/hwp/dram_training/dram_training.H b/src/usr/hwpf/hwp/dram_training/dram_training.H
index 6092fb99d..40ca07990 100644
--- a/src/usr/hwpf/hwp/dram_training/dram_training.H
+++ b/src/usr/hwpf/hwp/dram_training/dram_training.H
@@ -1,26 +1,25 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/usr/hwpf/hwp/dram_training/dram_training.H $
- *
- * IBM CONFIDENTIAL
- *
- * COPYRIGHT International Business Machines Corp. 2012
- *
- * p1
- *
- * Object Code Only (OCO) source materials
- * Licensed Internal Code Source Materials
- * IBM HostBoot Licensed Internal Code
- *
- * The source code for this program is not published or other-
- * wise divested of its trade secrets, irrespective of what has
- * been deposited with the U.S. Copyright Office.
- *
- * Origin: 30
- *
- * IBM_PROLOG_END_TAG
- */
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwpf/hwp/dram_training/dram_training.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
#ifndef __DRAM_TRAINING_DRAM_TRAINING_H
#define __DRAM_TRAINING_DRAM_TRAINING_H
@@ -269,6 +268,16 @@ void* call_mss_draminit_trainadv( void * io_pArgs );
*
*/
void* call_mss_draminit_mc( void * io_pArgs );
+/**
+ * @brief mss_dimm_power_test
+ *
+ *
+ * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct,
+ * or NULL.
+ * return any errlogs to istep
+ *
+ */
+void* call_mss_dimm_power_test( void * io_pArgs );
}; // end namespace
diff --git a/src/usr/hwpf/hwp/dram_training/makefile b/src/usr/hwpf/hwp/dram_training/makefile
index 3fe9152b0..527265eec 100644
--- a/src/usr/hwpf/hwp/dram_training/makefile
+++ b/src/usr/hwpf/hwp/dram_training/makefile
@@ -49,6 +49,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/dram_training/mss_scominit
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/dram_training/mem_pll_setup
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/dram_training/mss_draminit_trainadv
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build
+EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/dram_training/mss_dimm_power_test
## NOTE: add new object files when you add a new HWP
OBJS = dram_training.o \
@@ -68,10 +69,12 @@ OBJS = dram_training.o \
mss_mcbist.o \
mss_mcbist_common.o\
hbVddrMsg.o \
- mss_mcbist_address.o
+ mss_mcbist_address.o \
+ mss_dimm_power_test.o
## NOTE: add a new directory onto the vpaths when you add a new HWP
##@ VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/???
+VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/dram_training/mss_dimm_power_test
VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/dram_training/mss_draminit_training
VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/dram_training/mss_draminit_mc
VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/dram_training/mss_draminit
diff --git a/src/usr/hwpf/hwp/dram_training/mss_dimm_power_test/mss_dimm_power_test.C b/src/usr/hwpf/hwp/dram_training/mss_dimm_power_test/mss_dimm_power_test.C
new file mode 100644
index 000000000..7343f2cca
--- /dev/null
+++ b/src/usr/hwpf/hwp/dram_training/mss_dimm_power_test/mss_dimm_power_test.C
@@ -0,0 +1,82 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwpf/hwp/dram_training/mss_dimm_power_test/mss_dimm_power_test.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+// $Id: mss_dimm_power_test.C,v 1.1 2013/04/18 14:14:10 joabhend Exp $
+// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/centaur/working/procedures/ipl/fapi/mss_dimm_power_test.C,v $
+//------------------------------------------------------------------------------
+// *! (C) Copyright International Business Machines Corp. 2011
+// *! All Rights Reserved -- Property of IBM
+// *! *** IBM Confidential ***
+//------------------------------------------------------------------------------
+// *! TITLE : mss_dimm_power_test
+// *! DESCRIPTION : see additional comments below
+// *! OWNER NAME : Joab Henderson Email: joabhend@us.ibm.com
+// *! BACKUP NAME : Michael Pardeik Email: pardeik@us.ibm.com
+// *! ADDITIONAL COMMENTS :
+//
+// DESCRIPTION:
+// The purpose of this procedure is to run an insitu power test on ISDIMMs to determine max power draw
+//
+// TODO:
+//
+//------------------------------------------------------------------------------
+// Don't forget to create CVS comments when you check in your changes!
+//------------------------------------------------------------------------------
+// CHANGE HISTORY:
+//------------------------------------------------------------------------------
+// Version:| Author: | Date: | Comment:
+//---------|----------|---------|-----------------------------------------------
+// 1.1 | joabhend |04-APR-13| Shell code - Only returns success
+
+
+
+//----------------------------------------------------------------------
+// Includes
+//----------------------------------------------------------------------
+#include <mss_dimm_power_test.H>
+#include <fapi.H>
+
+extern "C" {
+
+ using namespace fapi;
+
+
+ // Procedures in this file
+ fapi::ReturnCode mss_dimm_power_test(const fapi::Target & i_target);
+
+
+//******************************************************************************
+//
+//******************************************************************************
+
+fapi::ReturnCode mss_dimm_power_test(const fapi::Target & i_target)
+{
+ // Target is centaur.mba
+
+ fapi::ReturnCode l_rc = fapi::FAPI_RC_SUCCESS;
+
+ return l_rc;
+}
+
+
+} //end extern C
+
diff --git a/src/usr/hwpf/hwp/dram_training/mss_dimm_power_test/mss_dimm_power_test.H b/src/usr/hwpf/hwp/dram_training/mss_dimm_power_test/mss_dimm_power_test.H
new file mode 100644
index 000000000..e3501e534
--- /dev/null
+++ b/src/usr/hwpf/hwp/dram_training/mss_dimm_power_test/mss_dimm_power_test.H
@@ -0,0 +1,86 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwpf/hwp/dram_training/mss_dimm_power_test/mss_dimm_power_test.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+// $Id: mss_dimm_power_test.H,v 1.1 2013/04/18 14:14:50 joabhend Exp $
+// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/centaur/working/procedures/ipl/fapi/mss_dimm_power_test.H,v $
+//------------------------------------------------------------------------------
+// *! (C) Copyright International Business Machines Corp. 2011
+// *! All Rights Reserved -- Property of IBM
+// *! *** IBM Confidential ***
+//------------------------------------------------------------------------------
+// *! TITLE : mss_throttle_to_power.H
+// *! DESCRIPTION : see additional comments below
+// *! OWNER NAME : Joab Henderson Email: joabhend@us.ibm.com
+// *! BACKUP NAME : Michael Pardeik Email: pardeik@us.ibm.com
+// *! ADDITIONAL COMMENTS :
+//
+// Header file for mss_dimm_power_test.
+//
+//------------------------------------------------------------------------------
+// Don't forget to create CVS comments when you check in your changes!
+//------------------------------------------------------------------------------
+// CHANGE HISTORY:
+//------------------------------------------------------------------------------
+// Version:| Author: | Date: | Comment:
+//---------|----------|---------|-----------------------------------------------
+// 1.1 | joabhend |04-APR-13| First Draft.
+
+
+
+#ifndef MSS_DIMM_POWER_TEST_H_
+#define MSS_DIMM_POWER_TEST_H_
+
+//----------------------------------------------------------------------
+// Includes
+//----------------------------------------------------------------------
+#include <fapi.H>
+
+//----------------------------------------------------------------------
+// Defines
+//----------------------------------------------------------------------
+
+//----------------------------------------------------------------------
+// ENUMs
+//----------------------------------------------------------------------
+
+//----------------------------------------------------------------------
+// Data Types
+//----------------------------------------------------------------------
+
+typedef fapi::ReturnCode (*mss_dimm_power_test_FP_t)(const fapi::Target & i_target);
+
+extern "C"
+{
+
+/**
+ * @brief mss_dimm_power_test procedure. Run power test on ISDIMMs to determine max power draw
+ *
+ * @param[in] i_target Reference to centaur.mba target
+ *
+ * @return ReturnCode
+ */
+
+ fapi::ReturnCode mss_dimm_power_test(const fapi::Target & i_target);
+
+} // extern "C"
+
+#endif // MSS_DIMM_POWER_TEST_H_
OpenPOWER on IntegriCloud