summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/include/usr/hwpf/istepreasoncodes.H1
-rw-r--r--src/usr/hwpf/hwp/core_activate/core_activate.C85
-rw-r--r--src/usr/hwpf/hwp/core_activate/makefile6
-rw-r--r--src/usr/hwpf/hwp/core_activate/proc_post_winkle/proc_post_winkle.C170
-rw-r--r--src/usr/hwpf/hwp/core_activate/proc_post_winkle/proc_post_winkle.H77
5 files changed, 335 insertions, 4 deletions
diff --git a/src/include/usr/hwpf/istepreasoncodes.H b/src/include/usr/hwpf/istepreasoncodes.H
index bc8e11af8..01dab7c93 100644
--- a/src/include/usr/hwpf/istepreasoncodes.H
+++ b/src/include/usr/hwpf/istepreasoncodes.H
@@ -180,6 +180,7 @@ enum istepReasonCode
ISTEP_DECONFIGURE_MBA_FAILED = ISTEP_COMP_ID | 0x31,
ISTEP_DECONFIGURE_L4_FAILED = ISTEP_COMP_ID | 0x32,
ISTEP_REPAIR_LOADER_RETRY_OCCURED = ISTEP_COMP_ID | 0x33,
+ ISTEP_PROC_POST_WINKLE_FAILED = ISTEP_COMP_ID | 0x34,
}; // end ISTEP
}
diff --git a/src/usr/hwpf/hwp/core_activate/core_activate.C b/src/usr/hwpf/hwp/core_activate/core_activate.C
index e9bdd5a0b..9524e0069 100644
--- a/src/usr/hwpf/hwp/core_activate/core_activate.C
+++ b/src/usr/hwpf/hwp/core_activate/core_activate.C
@@ -64,10 +64,10 @@
#include "proc_prep_master_winkle.H"
#include "proc_stop_deadman_timer.H"
#include "p8_set_pore_bar.H"
-// #include "host_activate_slave_cores/host_activate_slave_cores.H"
#include "proc_switch_cfsim.H"
#include "proc_switch_rec_attn.H"
#include "cen_switch_rec_attn.H"
+#include "proc_post_winkle.H"
namespace CORE_ACTIVATE
{
@@ -322,7 +322,14 @@ void* call_host_activate_slave_cores( void *io_pArgs )
}
}
- if ( ! l_errl )
+ if (l_errl)
+ {
+ l_stepError.addErrorDetails(ISTEP_BAD_RC,
+ ISTEP_HOST_ACTIVATE_SLAVE_CORES,
+ l_errl);
+ errlCommit(l_errl, HWPF_COMP_ID);
+ }
+ else
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"set PORE bars back to 0" );
@@ -398,6 +405,80 @@ void* call_host_activate_slave_cores( void *io_pArgs )
}
} // end for
+
+
+ // Call proc_post_winkle
+
+ // Done activate all master/slave cores.
+ // Run post winkle check on all EX targets, one proc at a time.
+ for (TargetHandleList::const_iterator l_procIter =
+ l_procTargetList.begin();
+ l_procIter != l_procTargetList.end();
+ ++l_procIter)
+ {
+ const TARGETING::Target* l_pChipTarget = *l_procIter;
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "Running proc_post_winkle on chip HUID %.8X",
+ TARGETING::get_huid(l_pChipTarget));
+
+ // Get EX list under this proc
+ TARGETING::TargetHandleList l_exList;
+ getChildChiplets( l_exList, l_pChipTarget, TYPE_EX );
+
+ for (TargetHandleList::const_iterator
+ l_exIter = l_exList.begin();
+ l_exIter != l_exList.end();
+ ++l_exIter)
+ {
+ const TARGETING::Target * l_exTarget = *l_exIter;
+
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "Running proc_post_winkle on EX target HUID %.8X",
+ TARGETING::get_huid(l_exTarget));
+
+ // cast OUR type of target to a FAPI type of target.
+ fapi::Target l_fapi_ex_target( TARGET_TYPE_EX_CHIPLET,
+ (const_cast<TARGETING::Target*>(l_exTarget)) );
+
+ // call the HWP with each fapi::Target
+ FAPI_INVOKE_HWP( l_errl,
+ proc_post_winkle,
+ l_fapi_ex_target);
+
+ if ( l_errl )
+ {
+ // capture the target data in the elog
+ ErrlUserDetailsTarget(l_pChipTarget).addToLog( l_errl );
+ /*@
+ * @errortype
+ * @reasoncode ISTEP_PROC_POST_WINKLE_FAILED
+ * @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE
+ * @moduleid ISTEP_HOST_ACTIVATE_SLAVE_CORES
+ * @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 host_activate_master failed see
+ * error identified by the plid in user data
+ * field.
+ */
+ l_stepError.addErrorDetails(ISTEP_PROC_POST_WINKLE_FAILED,
+ ISTEP_HOST_ACTIVATE_SLAVE_CORES,
+ l_errl );
+ errlCommit( l_errl, HWPF_COMP_ID );
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR : proc_post_winkle, PLID=0x%x",
+ l_errl->plid() );
+ }
+ else
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "SUCCESS : proc_post_winkle" );
+ }
+ }
+
+ } // end for
+
} // end if
// @@@@@ END CUSTOM BLOCK: @@@@@
diff --git a/src/usr/hwpf/hwp/core_activate/makefile b/src/usr/hwpf/hwp/core_activate/makefile
index e1bf2cd5e..64a877d52 100644
--- a/src/usr/hwpf/hwp/core_activate/makefile
+++ b/src/usr/hwpf/hwp/core_activate/makefile
@@ -43,6 +43,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/proc_switch_cfsim
+EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/proc_post_winkle
## @todo RTC Story 51709 and Story 51711 : revisit this later -
## proc_set_pore_bar is used by multiple isteps, so it should be in its own
## "utility" library
@@ -55,7 +56,8 @@ OBJS = core_activate.o \
proc_stop_deadman_timer.o \
proc_switch_cfsim.o \
proc_switch_rec_attn.o \
- cen_switch_rec_attn.o
+ cen_switch_rec_attn.o \
+ proc_post_winkle.o
## NOTE: add a new directory onto the vpaths when you add a new HWP
@@ -65,7 +67,7 @@ VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle
VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer
VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/proc_switch_cfsim
VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/switch_rec_attn
-
+VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/proc_post_winkle
include ${ROOTPATH}/config.mk
diff --git a/src/usr/hwpf/hwp/core_activate/proc_post_winkle/proc_post_winkle.C b/src/usr/hwpf/hwp/core_activate/proc_post_winkle/proc_post_winkle.C
new file mode 100644
index 000000000..988060483
--- /dev/null
+++ b/src/usr/hwpf/hwp/core_activate/proc_post_winkle/proc_post_winkle.C
@@ -0,0 +1,170 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwpf/hwp/core_activate/proc_post_winkle/proc_post_winkle.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: proc_post_winkle.C,v 1.2 2013/07/18 00:45:00 stillgs Exp $
+// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_post_winkle.C,v $
+//------------------------------------------------------------------------------
+// *! (C) Copyright International Business Machines Corp. 2011
+// *! All Rights Reserved -- Property of IBM
+// *! *** IBM Confidential ***
+//------------------------------------------------------------------------------
+// *! OWNER NAME : Greg Still Email: stillgs@us.ibm.com
+// *! BACKUP NAME : Michael Olsen Email: cmolsen@us.ibm.com
+/// \file proc_post_winkle.C
+/// \brief Re-enables the standard product idle mode configuration after
+/// an IPL Winkle action
+///
+/// \verbatim
+///
+/// For the passed EX target,
+/// - Remove disable of DISABLE_FORCE_DEEP_TO_FAST_WINKLE that was
+/// set on the master core. Removing on the non_master cores
+/// is not harmful
+///
+/// Procedure Prereq:
+/// - System clocks are running
+/// \endverbatim
+///
+//------------------------------------------------------------------------------
+
+
+// ----------------------------------------------------------------------
+// Includes
+// ----------------------------------------------------------------------
+#include "proc_post_winkle.H"
+
+extern "C" {
+
+using namespace fapi;
+
+// ----------------------------------------------------------------------
+// Constant definitions
+// ----------------------------------------------------------------------
+
+// ----------------------------------------------------------------------
+// Global variables
+// ----------------------------------------------------------------------
+
+// ----------------------------------------------------------------------
+// Function prototypes
+// ----------------------------------------------------------------------
+
+
+// ----------------------------------------------------------------------
+// Function definitions
+// ----------------------------------------------------------------------
+
+
+/**
+ * proc_post_winkle
+ *
+ * @param[in] i_target EX target
+ *
+ * @retval ECMD_SUCCESS
+ * @retval ERROR only those from called functions or MACROs
+ */
+fapi::ReturnCode
+proc_post_winkle(const Target& i_ex_target)
+{
+ fapi::ReturnCode l_rc;
+ uint32_t rc = 0;
+
+ ecmdDataBufferBase data(64);
+ uint64_t address = 0;
+ uint64_t ex_offset = 0;
+
+ uint8_t l_ex_number = 0;
+ fapi::Target l_parentTarget;
+
+ do
+ {
+
+ FAPI_INF("Beginnning proc_post_winkle...");
+
+ // Get the parent chip to target the PCBS registers
+ l_rc = fapiGetParentChip(i_ex_target, l_parentTarget);
+ if (l_rc)
+ {
+ FAPI_ERR("fapiGetParentChip access");
+ break;
+ }
+
+ // Get the core number
+ l_rc = FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS, &i_ex_target, l_ex_number);
+ if (l_rc)
+ {
+ FAPI_ERR("fapiGetAttribute of ATTR_CHIP_UNIT_POS with rc = 0x%x", (uint32_t)l_rc);
+ break;
+ }
+
+ FAPI_INF("Processing core %d on %s", l_ex_number, l_parentTarget.toEcmdString());
+
+ ex_offset = l_ex_number * 0x01000000;
+
+ // Debug
+ address = EX_PMGP1_0x100F0103 + ex_offset;
+ l_rc = fapiGetScom(l_parentTarget, address, data);
+ if(!l_rc.ok())
+ {
+ FAPI_ERR("Scom error reading PMGP1\n");
+ break;
+ }
+ FAPI_DBG("\tBefore PMGP1: 0x%016llX", data.getDoubleWord(0));
+
+ // Enable movement to Fast Winkle if errors are present. This is
+ // turned off in the during the IPL process
+ rc |= data.flushTo1();
+ rc |= data.clearBit(20);
+ if(rc)
+ {
+ FAPI_ERR("Error (0x%x) setting up ecmdDataBufferBase", rc);
+ l_rc.setEcmdError(rc);
+ break;
+ }
+
+ address = EX_PMGP1_AND_0x100F0104 + ex_offset;
+ l_rc = fapiPutScom(l_parentTarget, address, data);
+ if(!l_rc.ok())
+ {
+ FAPI_ERR("Scom error updating PMGP1\n");
+ break;
+ }
+ FAPI_INF("Enabled the conversion of Deep Winkle operations to Fast Winkle if errors are present upon Winkle entry");
+
+ // Debug
+ address = EX_PMGP1_0x100F0103 + ex_offset;
+ l_rc = fapiGetScom(l_parentTarget, address, data);
+ if(!l_rc.ok())
+ {
+ FAPI_ERR("Scom error reading PMGP1\n");
+ break;
+ }
+ FAPI_DBG("\tAfter PMGP1: 0x%016llX", data.getDoubleWord(0));
+
+ } while(0);
+
+ FAPI_INF("Exiting proc_post_winkle...");
+ return l_rc;
+}
+
+
+} //end extern C
diff --git a/src/usr/hwpf/hwp/core_activate/proc_post_winkle/proc_post_winkle.H b/src/usr/hwpf/hwp/core_activate/proc_post_winkle/proc_post_winkle.H
new file mode 100644
index 000000000..f76b5421a
--- /dev/null
+++ b/src/usr/hwpf/hwp/core_activate/proc_post_winkle/proc_post_winkle.H
@@ -0,0 +1,77 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwpf/hwp/core_activate/proc_post_winkle/proc_post_winkle.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: proc_post_winkle.H,v 1.1 2013/06/28 19:47:32 stillgs Exp $
+// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_post_winkle.H,v $
+//------------------------------------------------------------------------------
+// *|
+// *! (C) Copyright International Business Machines Corp. 2011
+// *! All Rights Reserved -- Property of IBM
+// *! *** IBM Confidential ***
+// *|
+// *! TITLE : proc_post_winkle.H
+// *! DESCRIPTION : Re-enables the standard product idle mode configuration after
+// *! an IPL Winkle action
+// *!
+// *! OWNER NAME : Greg Still Email: stillgs@us.ibm.com
+// *! BACKUP NAME : Michael Olsen Email: cmolsen@us.ibm.coms
+// *!
+//------------------------------------------------------------------------------
+
+#ifndef _PROC_POSTWINKLE_H_
+#define _PROC_POSTWINKLE_H_
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+#include "p8_pm.H"
+
+// function pointer typedef definition for HWP call support
+typedef fapi::ReturnCode (*proc_post_winkle_FP_t) (const fapi::Target&);
+
+extern "C" {
+
+
+//------------------------------------------------------------------------------
+// Constant definitions
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+// Parameter structure definitions
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+// Function prototype
+//------------------------------------------------------------------------------
+/// \param[in] i_target EX target
+
+/// \retval ECMD_SUCCESS if something good happens,
+/// \retval BAD_RETURN_CODE otherwise
+fapi::ReturnCode
+proc_post_winkle(const fapi::Target& i_ex_target);
+
+
+} // extern "C"
+
+#endif // _PROC_POSTWINKLE_H_
OpenPOWER on IntegriCloud