summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp/core_activate
diff options
context:
space:
mode:
authorMark Wenning <wenning@us.ibm.com>2012-08-01 08:44:18 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-08-30 13:32:41 -0500
commit4a2f7b1d5010d9ac8c179ec34f038264ae393a5a (patch)
treede7958178acbc580ddc8c78f82637be3e16a79c9 /src/usr/hwpf/hwp/core_activate
parent37e3944aa7e811d12028eddc1a790c8a5726d857 (diff)
downloadtalos-hostboot-4a2f7b1d5010d9ac8c179ec34f038264ae393a5a.tar.gz
talos-hostboot-4a2f7b1d5010d9ac8c179ec34f038264ae393a5a.zip
proc_prep_master_winkle
Change-Id: I7e0ea508c75e0e368e3bfde9dcaef1788169dcf3 RTC: 44818 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1517 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp/core_activate')
-rw-r--r--src/usr/hwpf/hwp/core_activate/core_activate.C45
-rw-r--r--src/usr/hwpf/hwp/core_activate/makefile19
-rw-r--r--src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/p8_istep_num.H78
-rw-r--r--src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.C201
-rw-r--r--src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.H84
-rw-r--r--src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle_errors.xml46
-rw-r--r--src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_sbe_ffdc.C162
-rw-r--r--src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_sbe_ffdc.H96
-rw-r--r--src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_sbe_trigger_winkle.H46
-rw-r--r--src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer/proc_stop_deadman_timer.C197
-rw-r--r--src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer/proc_stop_deadman_timer.H78
-rw-r--r--src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer/proc_stop_deadman_timer_errors.xml39
12 files changed, 1059 insertions, 32 deletions
diff --git a/src/usr/hwpf/hwp/core_activate/core_activate.C b/src/usr/hwpf/hwp/core_activate/core_activate.C
index 0cecf46d3..7aac36637 100644
--- a/src/usr/hwpf/hwp/core_activate/core_activate.C
+++ b/src/usr/hwpf/hwp/core_activate/core_activate.C
@@ -61,7 +61,8 @@
#include <sys/misc.h>
// Uncomment these files as they become available:
-// #include "host_activate_master/host_activate_master.H"
+#include "proc_prep_master_winkle.H"
+#include "proc_stop_deadman_timer.H"
// #include "host_activate_slave_cores/host_activate_slave_cores.H"
// #include "host_ipl_complete/host_ipl_complete.H"
@@ -82,7 +83,7 @@ using namespace ISTEP;
{
errlHndl_t l_errl = NULL;
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_activate_master entry" );
// @@@@@ CUSTOM BLOCK: @@@@@
@@ -108,26 +109,24 @@ using namespace ISTEP;
// cast OUR type of target to a FAPI type of target.
const fapi::Target l_fapi_cpu_target(
- TARGET_TYPE_PROC_CHIP,
- reinterpret_cast<void *>
- (const_cast<TARGETING::Target*>(l_cpu_target))
- );
-
+ TARGET_TYPE_PROC_CHIP,
+ reinterpret_cast<void *>
+ (const_cast<TARGETING::Target*>
+ (l_cpu_target)) );
-#if 1
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "Call proc_prep_master_winkle when integrated..." );
-#else
+ "call_host_activate_master: call proc_prep_master_winkle." );
+
// call the HWP with each fapi::Target
FAPI_INVOKE_HWP( l_errl,
proc_prep_master_winkle,
- l_fapi_cpu_target );
-#endif
+ l_fapi_cpu_target,
+ true );
if ( l_errl )
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "proc_prep_master_winkle ERROR : Returning errorlog, PLID=0x%x",
- l_errl->plid() );
+ "proc_prep_master_winkle ERROR : Returning errorlog, PLID=0x%x",
+ l_errl->plid() );
break;
}
else
@@ -136,14 +135,12 @@ using namespace ISTEP;
"proc_prep_master_winkle SUCCESS" );
}
- if (is_vpo()) // TODO: RTC 46651 - Simics doesn't support winkle.
- {
// put the master into winkle.
+ // Simics should work after build b0815a_1233.810 .
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_activate_master: put master into winkle..." );
- // @todo 2012-07-30 currently this is just a stub...
int l_rc = cpu_master_winkle( );
if ( l_rc )
{
@@ -168,23 +165,19 @@ using namespace ISTEP;
break;
}
- } // TODO: Remove with RTC 46651
-
-
// --------------------------------------------------------
// should return from Winkle at this point
// --------------------------------------------------------
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "Returned from Winkle." );
-
-#if 1
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "Call proc_stop_deadman_timer when integrated..." );
-#else
+ "Call proc_stop_deadman_timer..." );
+
// call the HWP with each fapi::Target
FAPI_INVOKE_HWP( l_errl,
proc_stop_deadman_timer,
l_fapi_cpu_target );
-#endif
if ( l_errl )
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
@@ -203,7 +196,7 @@ using namespace ISTEP;
// @@@@@ END CUSTOM BLOCK: @@@@@
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_activate_master exit" );
// end task, returning any errorlogs to IStepDisp
diff --git a/src/usr/hwpf/hwp/core_activate/makefile b/src/usr/hwpf/hwp/core_activate/makefile
index e76695c3b..c296d3b44 100644
--- a/src/usr/hwpf/hwp/core_activate/makefile
+++ b/src/usr/hwpf/hwp/core_activate/makefile
@@ -1,4 +1,4 @@
-# IBM_PROLOG_BEGIN_TAG
+# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/usr/hwpf/hwp/core_activate/makefile $
@@ -19,8 +19,7 @@
#
# Origin: 30
#
-# IBM_PROLOG_END
-
+# IBM_PROLOG_END_TAG
ROOTPATH = ../../../../..
MODULE = core_activate
@@ -34,22 +33,30 @@ EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp
## pointer to common HWP files
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include
-## NOTE: add the base istep dir here.
+## NOTE: add the base istep dir here.
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate
## Include sub dirs
## NOTE: add a new EXTRAINCDIR when you add a new HWP
## EXAMPLE:
## EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/<HWP_dir>
+EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle
+EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer
+
## NOTE: add new object files when you add a new HWP
-OBJS = core_activate.o
+OBJS = core_activate.o \
+ proc_prep_master_winkle.o \
+ proc_sbe_ffdc.o \
+ proc_stop_deadman_timer.o
+
-
## NOTE: add a new directory onto the vpaths when you add a new HWP
## EXAMPLE:
# VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/<HWP_dir>
+VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle
+VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer
include ${ROOTPATH}/config.mk
diff --git a/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/p8_istep_num.H b/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/p8_istep_num.H
new file mode 100644
index 000000000..58791a89a
--- /dev/null
+++ b/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/p8_istep_num.H
@@ -0,0 +1,78 @@
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/p8_istep_num.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
+ */
+#ifndef __P8_ISTEP_NUM_H
+#define __P8_ISTEP_NUM_H
+
+// $Id: p8_istep_num.H,v 1.11 2012/08/01 02:50:49 venton Exp $
+
+/// Istep number encoding for all SEEPROM and PNOR procedures. Used to update
+/// the SBEVITAL register to record procedure progress and to create unique
+/// hooki bind points on procedure completion.
+
+CONST_UINT64_T(proc_sbe_enable_seeprom_istep_num, ULL(0x0101));
+
+CONST_UINT64_T(proc_sbe_tp_chiplet_init1_istep_num, ULL(0x0201));
+CONST_UINT64_T(proc_sbe_tp_ld_image_istep_num, ULL(0x0202));
+CONST_UINT64_T(proc_sbe_npll_initf_istep_num, ULL(0x0203));
+CONST_UINT64_T(proc_sbe_npll_setup_istep_num, ULL(0x0204));
+CONST_UINT64_T(proc_sbe_tp_switch_gears_istep_num, ULL(0x0205));
+CONST_UINT64_T(proc_sbe_tp_chiplet_init2_istep_num, ULL(0x0206));
+CONST_UINT64_T(proc_sbe_tp_arrayinit_istep_num, ULL(0x0207));
+CONST_UINT64_T(proc_sbe_tp_chiplet_init3_istep_num, ULL(0x0208));
+CONST_UINT64_T(proc_sbe_chiplet_init_istep_num, ULL(0x0209));
+CONST_UINT64_T(proc_sbe_arrayinit_istep_num, ULL(0x020A));
+CONST_UINT64_T(proc_sbe_setup_evid_istep_num, ULL(0x020B));
+CONST_UINT64_T(proc_sbe_initf_istep_num, ULL(0x020C));
+CONST_UINT64_T(proc_sbe_pb_startclocks_istep_num, ULL(0x020D));
+CONST_UINT64_T(proc_sbe_scominit_istep_num, ULL(0x020E));
+CONST_UINT64_T(proc_sbe_fabricinit_istep_num, ULL(0x020F));
+CONST_UINT64_T(proc_sbe_check_master_istep_num, ULL(0x0210));
+CONST_UINT64_T(proc_sbe_select_ex_istep_num, ULL(0x0211));
+CONST_UINT64_T(proc_sbe_run_exinit_istep_num, ULL(0x0212));
+
+CONST_UINT64_T(proc_sbe_pnor_setup_istep_num, ULL(0x0301));
+
+CONST_UINT64_T(proc_sbe_ex_chiplet_reset_istep_num, ULL(0x0401));
+CONST_UINT64_T(proc_sbe_ex_gptr_time_initf_istep_num, ULL(0x0402));
+CONST_UINT64_T(proc_sbe_ex_core_gptr_time_initf_istep_num, ULL(0x0403));
+CONST_UINT64_T(proc_sbe_ex_dpll_initf_istep_num, ULL(0x0404));
+CONST_UINT64_T(proc_sbe_ex_chiplet_init_istep_num, ULL(0x0405));
+CONST_UINT64_T(proc_sbe_ex_repair_initf_istep_num, ULL(0x0406));
+CONST_UINT64_T(proc_sbe_ex_core_repair_initf_istep_num, ULL(0x0407));
+CONST_UINT64_T(proc_sbe_ex_arrayinit_istep_num, ULL(0x0408));
+CONST_UINT64_T(proc_sbe_ex_initf_istep_num, ULL(0x0409));
+CONST_UINT64_T(proc_sbe_ex_core_initf_istep_num, ULL(0x040A));
+CONST_UINT64_T(proc_sbe_ex_do_manual_inits_istep_num, ULL(0x040B));
+CONST_UINT64_T(proc_sbe_ex_startclocks_istep_num, ULL(0x040C));
+CONST_UINT64_T(proc_sbe_ex_init_escape_istep_num, ULL(0x040D));
+CONST_UINT64_T(proc_sbe_ex_sp_runtime_scom_istep_num, ULL(0x040E));
+CONST_UINT64_T(proc_sbe_ex_occ_runtime_scom_istep_num, ULL(0x040F));
+CONST_UINT64_T(proc_sbe_ex_host_runtime_scom_istep_num, ULL(0x0410));
+
+CONST_UINT64_T(proc_sbe_lco_loader_istep_num, ULL(0x0500));
+CONST_UINT64_T(proc_sbe_instruct_start_istep_num, ULL(0x0501));
+
+CONST_UINT64_T(proc_sbe_trigger_winkle_istep_num, ULL(0x0F01));
+
+#endif // __P8_ISTEP_NUM_H
diff --git a/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.C b/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.C
new file mode 100644
index 000000000..bfcd48b93
--- /dev/null
+++ b/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.C
@@ -0,0 +1,201 @@
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.C $
+ *
+ * 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
+ */
+// -*- mode: C++; c-file-style: "linux"; -*-
+// $Id: proc_prep_master_winkle.C,v 1.7 2012/08/01 18:58:38 jeshua Exp $
+// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_prep_master_winkle.C,v $
+//------------------------------------------------------------------------------
+// *|
+// *! (C) Copyright International Business Machines Corp. 2012
+// *! All Rights Reserved -- Property of IBM
+// *! *** IBM Confidential ***
+// *|
+// *! TITLE : proc_prep_master_winkle.C
+// *! DESCRIPTION : Prepares for the master core to winkle
+// *!
+// *! OWNER NAME : Jeshua Smith Email: jeshua@us.ibm.com
+// *!
+// *! Overview:
+// *! Wait for SBE ready
+// *! Start SBE deadman timer
+// *! *Enter winkle*
+// *!
+// *! Note: Hostboot should always run with useRealSBE = true
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+#include "proc_prep_master_winkle.H"
+
+//------------------------------------------------------------------------------
+// Function definitions
+//------------------------------------------------------------------------------
+
+extern "C"
+{
+
+
+
+//------------------------------------------------------------------------------
+// function: proc_prep_master_winkle
+// Wait for SBE ready
+// Start SBE deadman timer
+// *Enter winkle*
+//
+// parameters: i_target => chip target
+// returns: FAPI_RC_SUCCESS if operation was successful, else error
+//------------------------------------------------------------------------------
+ fapi::ReturnCode proc_prep_master_winkle(const fapi::Target & i_target,
+ bool useRealSBE = true)
+ {
+ // data buffer to hold register values
+ ecmdDataBufferBase data(64);
+
+ // return codes
+ uint32_t rc_ecmd = 0;
+ fapi::ReturnCode rc;
+
+ // mark function entry
+ FAPI_INF("Entry\n");
+
+ do
+ {
+
+ // Wait for SBE ready
+ // ie. SBE running, and istep num and substep num correct
+ if( useRealSBE )
+ {
+
+// $$$$$
+// $$$$$ mww need to set up action file to fill in the SBE regs
+// $$$$$ These scoms are not set to the right value.
+// $$$$$ In simics, we need an action file to set them up.
+// $$$$$
+ FAPI_INF("mww read PORE_SBE_CONTROL_0x000E0001");
+ rc = fapiGetScom(i_target, PORE_SBE_CONTROL_0x000E0001, data);
+ if(!rc.ok())
+ {
+ FAPI_ERR("Scom error reading SBE STATUS\n");
+ break;
+ }
+
+ // $$$$$ @todo HACK
+ data.clearBit( 0 ) ;
+
+ if( data.isBitSet( 0 ) )
+ {
+ FAPI_ERR("SBE isn't running when it should be\n");
+ const fapi::Target & CHIP_IN_ERROR = i_target;
+ ecmdDataBufferBase & SBE_STATUS = data;
+ FAPI_SET_HWP_ERROR(rc, RC_PROC_PREP_MASTER_WINKLE_SBE_NOT_RUNNING);
+ break;
+ }
+ }
+
+ FAPI_INF("mww read MBOX_SBEVITAL_0x0005001C");
+
+ rc = fapiGetScom(i_target, MBOX_SBEVITAL_0x0005001C, data);
+ if(!rc.ok())
+ {
+ FAPI_ERR("Scom error reading SBE VITAL\n");
+ break;
+ }
+
+
+ uint32_t istep_num = 0;
+ uint8_t substep_num = 0;
+ rc_ecmd |= data.extractToRight(&istep_num,
+ istep_num_bit_position,
+ istep_num_bit_length);
+ rc_ecmd |= data.extractToRight(&substep_num,
+ substep_num_bit_position,
+ substep_num_bit_length);
+ if(rc_ecmd)
+ {
+ FAPI_ERR("Error (0x%x) setting up ecmdDataBufferBase", rc_ecmd);
+ rc.setEcmdError(rc_ecmd);
+ break;
+ }
+
+ // $$ @todo HACK
+ istep_num = 0x0f01;
+ substep_num = 0x01;
+
+ if( istep_num != proc_sbe_trigger_winkle_istep_num )
+ {
+ FAPI_ERR("Expected istep num %llX but found %X\n",
+ proc_sbe_trigger_winkle_istep_num,
+ istep_num );
+ const fapi::Target & CHIP_IN_ERROR = i_target;
+ ecmdDataBufferBase & SBE_VITAL = data;
+ FAPI_SET_HWP_ERROR(rc, RC_PROC_PREP_MASTER_WINKLE_BAD_ISTEP_NUM);
+ break;
+ }
+ if( substep_num != substep_sbe_ready )
+ {
+ FAPI_ERR("Expected substep num %X but found %X\n",
+ substep_sbe_ready,
+ substep_num );
+ const fapi::Target & CHIP_IN_ERROR = i_target;
+ ecmdDataBufferBase & SBE_VITAL = data;
+ FAPI_SET_HWP_ERROR(rc, RC_PROC_PREP_MASTER_WINKLE_BAD_SUBSTEP_NUM);
+ break;
+ }
+
+ FAPI_INF("SBE is ready for master to enter winkle\n");
+
+ //Start the deadman timer
+ substep_num = substep_deadman_start;
+ rc_ecmd |= data.insertFromRight(&substep_num,
+ substep_num_bit_position,
+ substep_num_bit_length);
+ if(rc_ecmd)
+ {
+ FAPI_ERR("Error (0x%x) setting up ecmdDataBufferBase", rc_ecmd);
+ rc.setEcmdError(rc_ecmd);
+ break;
+ }
+ FAPI_INF("mww write MBOX_SBEVITAL_0x0005001C");
+ rc = fapiPutScom(i_target, MBOX_SBEVITAL_0x0005001C, data);
+ if(!rc.ok())
+ {
+ FAPI_ERR("Scom error updating SBE VITAL\n");
+ break;
+ }
+
+ //Enter winlke
+ FAPI_INF("HB should enter winkle now, FSP should execute proc_force_winkle now\n");
+
+ } while (0);
+
+ // mark function exit
+ FAPI_INF("Exit");
+ return rc;
+ }
+
+} // extern "C"
+/* Local Variables: */
+/* c-basic-offset: 4 */
+/* End: */
diff --git a/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.H b/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.H
new file mode 100644
index 000000000..fd4048c7e
--- /dev/null
+++ b/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.H
@@ -0,0 +1,84 @@
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle.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
+ */
+// $Id: proc_prep_master_winkle.H,v 1.3 2012/08/01 18:37:38 jeshua Exp $
+// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_prep_master_winkle.H,v $
+//------------------------------------------------------------------------------
+// *|
+// *! (C) Copyright International Business Machines Corp. 2012
+// *! All Rights Reserved -- Property of IBM
+// *! *** IBM Confidential ***
+// *|
+// *! TITLE : proc_prep_master_winkle.H
+// *! DESCRIPTION : Prepares for the master core to winkle
+// *!
+// *! OWNER NAME : Jeshua Smith Email: jeshua@us.ibm.com
+// *!
+//------------------------------------------------------------------------------
+
+#ifndef _PROC_PREP_MASTER_WINKLE_H_
+#define _PROC_PREP_MASTER_WINKLE_H_
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+
+#include <fapi.H>
+#include "p8_scom_addresses.H"
+#include "proc_sbe_ffdc.H"
+#include "p8_istep_num.H"
+#include "proc_sbe_trigger_winkle.H"
+
+//------------------------------------------------------------------------------
+// Structure definitions
+//------------------------------------------------------------------------------
+
+// function pointer typedef definition for HWP call support
+typedef fapi::ReturnCode (*proc_prep_master_winkle_FP_t)(const fapi::Target &,
+ const bool &);
+
+//------------------------------------------------------------------------------
+// Constant definitions
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// Function prototypes
+//------------------------------------------------------------------------------
+
+
+extern "C"
+{
+
+/**
+ * @brief Start the auto-POR engine and the SBE
+ *
+ * @param[in] i_target Reference to chip target
+ *
+ * @return ReturnCode
+ */
+ fapi::ReturnCode proc_prep_master_winkle(const fapi::Target & i_target,
+ const bool useRealSBE);
+
+} // extern "C"
+
+#endif // _PROC_PREP_MASTER_WINKLE_H_
diff --git a/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle_errors.xml b/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle_errors.xml
new file mode 100644
index 000000000..400d9e700
--- /dev/null
+++ b/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle_errors.xml
@@ -0,0 +1,46 @@
+<!-- IBM_PROLOG_BEGIN_TAG
+ This is an automatically generated prolog.
+
+ $Source: src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_prep_master_winkle_errors.xml $
+
+ 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 -->
+<!-- Error definitions for proc_prep_master_winkle procedure -->
+<hwpErrors>
+ <!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_PROC_PREP_MASTER_WINKLE_SBE_NOT_RUNNING</rc>
+ <description>The SBE is stopped and so will never wake up the master core</description>
+ <collectFfdc>proc_sbe_ffdc, CHIP_IN_ERROR</collectFfdc>
+ <ffdc>SBE_STATUS</ffdc>
+ </hwpError>
+ <!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_PROC_PREP_MASTER_WINKLE_BAD_ISTEP_NUM</rc>
+ <description>The SBE is not at the correct istep number</description>
+ <collectFfdc>proc_sbe_ffdc, CHIP_IN_ERROR</collectFfdc>
+ <ffdc>SBE_VITAL</ffdc>
+ </hwpError>
+ <!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_PROC_PREP_MASTER_WINKLE_BAD_SUBSTEP_NUM</rc>
+ <description>The SBE is not at the correct substep number</description>
+ <collectFfdc>proc_sbe_ffdc, CHIP_IN_ERROR</collectFfdc>
+ <ffdc>SBE_VITAL</ffdc>
+ </hwpError>
+</hwpErrors>
diff --git a/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_sbe_ffdc.C b/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_sbe_ffdc.C
new file mode 100644
index 000000000..f5f1bb2b8
--- /dev/null
+++ b/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_sbe_ffdc.C
@@ -0,0 +1,162 @@
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_sbe_ffdc.C $
+ *
+ * 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
+ */
+// -*- mode: C++; c-file-style: "linux"; -*-
+// $Id: proc_sbe_ffdc.C,v 1.4 2012/05/23 18:48:50 jeshua Exp $
+// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_sbe_ffdc.C,v $
+//------------------------------------------------------------------------------
+// *|
+// *! (C) Copyright International Business Machines Corp. 2011
+// *! All Rights Reserved -- Property of IBM
+// *! *** IBM Confidential ***
+// *|
+// *! TITLE : proc_sbe_ffdc.C
+// *! DESCRIPTION : Log data for SBE fails (FAPI)
+// *!
+// *! OWNER NAME : Jeshua Smith Email: jeshua@us.ibm.com
+// *! BACKUP NAME : Andreas Koenig Email: koenig@de.ibm.com
+// *!
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+
+#include "proc_sbe_ffdc.H"
+
+extern "C" {
+
+//------------------------------------------------------------------------------
+// Function definitions
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// function: proc_sbe_ffdc
+// parameters: i_target => proc chip target
+// returns: FAPI_RC_SUCCESS if operation was successful, else error
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+// FFDC Procedure
+//------------------------------------------------------------------------------
+ fapi::ReturnCode proc_sbe_ffdc(const fapi::Target& i_target,
+ fapi::ReturnCode & o_rc)
+{
+ fapi::ReturnCode rc;
+ ecmdDataBufferBase dataBuff(32);
+ uint32_t data_32 = 0;
+ uint64_t data_64 = 0;
+ const uint16_t END_CFAMS = 0xFFFFull;
+ const uint64_t END_SCOMS = 0xFFFFFFFFFFFFFFFFull;
+
+ // mark HWP entry
+ FAPI_IMP("proc_sbe_ffdc: Entering ...");
+
+ uint16_t cfams [] =
+ {
+ FSI_STATUS_0x1007,
+ FSI_GP3_0x2812 ,
+ FSI_GP4_0x2813 ,
+ FSI_GP5_0x2814 ,
+ FSI_GP6_0x2815 ,
+ FSI_GP7_0x2816 ,
+ FSI_GP8_0x2817 ,
+ FSI_GP3MIR_0x281B,
+ END_CFAMS
+ };
+
+ int cfam_index = 0;
+ do
+ {
+ //Collect SBE Cfams
+ rc = fapiGetCfamRegister( i_target, cfams[cfam_index], dataBuff );
+ if( rc )
+ {
+ break;
+ }
+ data_32 = dataBuff.getWord( 0 );
+ fapi::ReturnCodeFfdc::addEIFfdc(o_rc, data_32);
+ cfam_index++;
+ } while (cfams[cfam_index] != END_CFAMS);
+
+ if( !rc )
+ {
+ uint64_t scoms [] =
+ {
+ PORE_SBE_STATUS_0x000E0000 ,
+ PORE_SBE_CONTROL_0x000E0001 ,
+ PORE_SBE_RESET_0x000E0002 ,
+ PORE_SBE_ERROR_MASK_0x000E0003 ,
+ PORE_SBE_PRV_BASE_ADDRESS0_0x000E0004 ,
+ PORE_SBE_PRV_BASE_ADDRESS1_0x000E0005 ,
+ PORE_SBE_OCI_BASE_ADDRESS0_0x000E0006 ,
+ PORE_SBE_OCI_BASE_ADDRESS1_0x000E0007 ,
+ PORE_SBE_TABLE_BASE_ADDR_0x000E0008 ,
+ PORE_SBE_EXE_TRIGGER_0x000E0009 ,
+ PORE_SBE_SCRATCH0_0x000E000A ,
+ PORE_SBE_SCRATCH1_0x000E000B ,
+ PORE_SBE_SCRATCH2_0x000E000C ,
+ PORE_SBE_IBUF_01_0x000E000D ,
+ PORE_SBE_IBUF_2_0x000E000E ,
+ PORE_SBE_DBG0_0x000E000F ,
+ PORE_SBE_DBG1_0x000E0010 ,
+ PORE_SBE_PC_STACK0_0x000E0011 ,
+ PORE_SBE_PC_STACK1_0x000E0012 ,
+ PORE_SBE_PC_STACK2_0x000E0013 ,
+ PORE_SBE_ID_FLAGS_0x000E0014 ,
+ PORE_SBE_DATA0_0x000E0015 ,
+ PORE_SBE_MEMORY_RELOC_0x000E0016 ,
+ PORE_SBE_I2C_E0_PARAM_0x000E0017 ,
+ PORE_SBE_I2C_E1_PARAM_0x000E0018 ,
+ PORE_SBE_I2C_E2_PARAM_0x000E0019 ,
+ PIBMEM_STATUS_0x00088005 ,
+ TP_CLK_STATUS_0x01030008 ,
+ END_SCOMS
+ };
+
+ int scom_index = 0;
+ do
+ {
+ //Collect SBE Scoms
+ rc = fapiGetScom( i_target, scoms[scom_index], dataBuff );
+ if( rc )
+ {
+ break;
+ }
+ data_64 = dataBuff.getDoubleWord( 0 );
+ fapi::ReturnCodeFfdc::addEIFfdc(o_rc, data_64);
+
+ scom_index++;
+ } while (scoms[scom_index] != END_SCOMS);
+ }
+
+ FAPI_IMP("proc_sbe_ffdc: Exiting ...");
+ return rc;
+}
+
+} //end extern C
+/* Local Variables: */
+/* c-basic-offset: 4 */
+/* End: */
diff --git a/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_sbe_ffdc.H b/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_sbe_ffdc.H
new file mode 100644
index 000000000..20739aeb3
--- /dev/null
+++ b/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_sbe_ffdc.H
@@ -0,0 +1,96 @@
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_sbe_ffdc.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
+ */
+// $Id: proc_sbe_ffdc.H,v 1.2 2012/04/25 19:56:34 jeshua Exp $
+// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_sbe_ffdc.H,v $
+//------------------------------------------------------------------------------
+// *|
+// *! (C) Copyright International Business Machines Corp. 2011
+// *! All Rights Reserved -- Property of IBM
+// *! *** IBM Confidential ***
+// *|
+// *! TITLE : proc_sbe_ffdc.H
+// *! DESCRIPTION : Log data for SBE fails (FAPI)
+// *!
+// *! OWNER NAME : Jeshua Smith Email: jeshua@us.ibm.com
+// *! BACKUP NAME : Andreas Koenig Email: koenig@de.ibm.com
+// *!
+// *! ADDITIONAL COMMENTS :
+// *!
+// *! Collects:
+// *! o
+// *!
+// *! Successful operations assumes that:
+// *! o System clocks are running
+// *!
+//------------------------------------------------------------------------------
+
+#ifndef _PROC_SBE_FFDC_H_
+#define _PROC_SBE_FFDC_H_
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+
+#include <fapi.H>
+#include "p8_scom_addresses.H"
+
+//------------------------------------------------------------------------------
+// Structure definitions
+//------------------------------------------------------------------------------
+
+// function pointer typedef definition for HWP call support
+typedef fapi::ReturnCode
+(*proc_sbe_ffdc_FP_t) (const fapi::Target&, fapi::ReturnCode&);
+
+extern "C" {
+
+//------------------------------------------------------------------------------
+// Constant definitions
+//------------------------------------------------------------------------------
+const uint16_t FSI_STATUS_0x1007 = 0x1007;
+const uint16_t FSI_GP3_0x2812 = 0x2812;
+const uint16_t FSI_GP4_0x2813 = 0x2813;
+const uint16_t FSI_GP5_0x2814 = 0x2814;
+const uint16_t FSI_GP6_0x2815 = 0x2815;
+const uint16_t FSI_GP7_0x2816 = 0x2816;
+const uint16_t FSI_GP8_0x2817 = 0x2817;
+const uint16_t FSI_GP3MIR_0x281B = 0x281B;
+
+
+//------------------------------------------------------------------------------
+// Function prototypes
+//------------------------------------------------------------------------------
+
+// function: FAPI proc_sbe_ffdc HWP entry point
+// ffdc collection for SBE cache errors
+// parameters: i_target => proc chip target
+// o_rc => return code to add ffdc data to
+// returns: FAPI_RC_SUCCESS if no errors
+// else FAPI putscom return code for failing operation
+fapi::ReturnCode proc_sbe_ffdc(const fapi::Target& i_target,
+ fapi::ReturnCode & o_rc);
+
+} // extern "C"
+
+#endif // _PROC_SBE_FFDC_H_
diff --git a/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_sbe_trigger_winkle.H b/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_sbe_trigger_winkle.H
new file mode 100644
index 000000000..4614bd682
--- /dev/null
+++ b/src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_sbe_trigger_winkle.H
@@ -0,0 +1,46 @@
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/hwpf/hwp/core_activate/proc_prep_master_winkle/proc_sbe_trigger_winkle.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
+ */
+// $Id: proc_sbe_trigger_winkle.H,v 1.3 2012/05/11 21:16:15 jeshua Exp $
+
+/// Istep number encoding for all SEEPROM and PNOR procedures. Used to update
+/// the SBEVITAL register to record procedure progress
+
+#ifndef __PROC_SBE_TRIGGER_WINKLE_H
+#define __PROC_SBE_TRIGGER_WINKLE_H
+
+#include "fapi_sbe_common.H"
+
+CONST_UINT8_T(substep_proc_entry, ULL(0x0));
+CONST_UINT8_T(substep_sbe_ready, ULL(0x1));
+CONST_UINT8_T(substep_deadman_start, ULL(0x2));
+CONST_UINT8_T(substep_deadman_waiting_for_winlke, ULL(0x3));
+CONST_UINT8_T(substep_deadman_waiting_for_wakeup, ULL(0x4));
+CONST_UINT8_T(substep_hostboot_alive_again, ULL(0x5));
+
+CONST_UINT8_T(istep_num_bit_position, ULL(16));
+CONST_UINT8_T(istep_num_bit_length, ULL(12));
+CONST_UINT8_T(substep_num_bit_position, ULL(28));
+CONST_UINT8_T(substep_num_bit_length, ULL(4));
+
+#endif // __PROC_SBE_TRIGGER_WINKLE_H
diff --git a/src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer/proc_stop_deadman_timer.C b/src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer/proc_stop_deadman_timer.C
new file mode 100644
index 000000000..94edaac0d
--- /dev/null
+++ b/src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer/proc_stop_deadman_timer.C
@@ -0,0 +1,197 @@
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer/proc_stop_deadman_timer.C $
+ *
+ * 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
+ */
+// -*- mode: C++; c-file-style: "linux"; -*-
+// $Id: proc_stop_deadman_timer.C,v 1.4 2012/08/10 14:19:16 jeshua Exp $
+// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_stop_deadman_timer.C,v $
+//------------------------------------------------------------------------------
+// *|
+// *! (C) Copyright International Business Machines Corp. 2012
+// *! All Rights Reserved -- Property of IBM
+// *! *** IBM Confidential ***
+// *|
+// *! TITLE : proc_stop_deadman_timer.C
+// *! DESCRIPTION : Stops deadman timer and SBE
+// *!
+// *! OWNER NAME : Jeshua Smith Email: jeshua@us.ibm.com
+// *!
+// *! Overview:
+// *! Notify SBE that HB is alive again
+// *! Make sure SBE stopped
+// *!
+// *! Here's the flow of SBE_VITAL substeps:
+// *! SBE (automatic on procedure entry): substep_proc_entry
+// *! SBE : substep_sbe_ready
+// *! HB (proc_prep_master_winkle) : substep_deadman_start
+// *! SBE : substep_deadman_waiting_for_winkle
+// *! SBE : substep_deadman_waiting_for_wakeup
+// *! HB (proc_stop_deadman_timer) : substep_hostboot_alive_again
+// *! SBE : (stops with error code 0xF to indicate success)
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+#include "proc_stop_deadman_timer.H"
+#include "p8_scom_addresses.H"
+#include "proc_sbe_ffdc.H"
+#include "p8_istep_num.H"
+#include "proc_sbe_trigger_winkle.H"
+
+//------------------------------------------------------------------------------
+// Function definitions
+//------------------------------------------------------------------------------
+
+extern "C"
+{
+
+
+//------------------------------------------------------------------------------
+// function: proc_stop_deadman_timer
+// Notify SBE that HB is alive again
+// Force the SBE to stop running
+//
+// parameters: i_target => chip target
+// returns: FAPI_RC_SUCCESS if operation was successful, else error
+//------------------------------------------------------------------------------
+ fapi::ReturnCode proc_stop_deadman_timer(const fapi::Target & i_target)
+ {
+ // data buffer to hold register values
+ ecmdDataBufferBase data(64);
+
+ // return codes
+ uint32_t rc_ecmd = 0;
+ fapi::ReturnCode rc;
+
+ // mark function entry
+ FAPI_INF("Entry\n");
+
+ do
+ {
+ //Check that SBE is running the deadman timer
+ rc = fapiGetScom(i_target, MBOX_SBEVITAL_0x0005001C, data);
+ if(!rc.ok())
+ {
+ FAPI_ERR("Scom error reading SBE VITAL\n");
+ break;
+ }
+
+ uint32_t istep_num = 0;
+ uint8_t substep_num = 0;
+ rc_ecmd |= data.extractToRight(&istep_num,
+ istep_num_bit_position,
+ istep_num_bit_length);
+ rc_ecmd |= data.extractToRight(&substep_num,
+ substep_num_bit_position,
+ substep_num_bit_length);
+ if(rc_ecmd)
+ {
+ FAPI_ERR("Error (0x%x) setting up ecmdDataBufferBase", rc_ecmd);
+ rc.setEcmdError(rc_ecmd);
+ break;
+ }
+
+ // $$ @todo HACK
+ istep_num = 0x0f01;
+ substep_num = 0x04;
+
+ if( istep_num != proc_sbe_trigger_winkle_istep_num )
+ {
+ FAPI_ERR("Expected istep num %llX but found %X\n",
+ proc_sbe_trigger_winkle_istep_num,
+ istep_num );
+ const fapi::Target & CHIP_IN_ERROR = i_target;
+ ecmdDataBufferBase & SBE_VITAL = data;
+ FAPI_SET_HWP_ERROR(rc, RC_PROC_STOP_DEADMAN_TIMER_BAD_ISTEP_NUM);
+ break;
+ }
+ if( substep_num != substep_deadman_waiting_for_wakeup )
+ {
+ FAPI_ERR("Expected substep num %X but found %X\n",
+ substep_deadman_waiting_for_wakeup,
+ substep_num );
+ const fapi::Target & CHIP_IN_ERROR = i_target;
+ ecmdDataBufferBase & SBE_VITAL = data;
+ FAPI_SET_HWP_ERROR(rc, RC_PROC_STOP_DEADMAN_TIMER_BAD_SUBSTEP_NUM);
+ break;
+ }
+
+ //Notify SBE that HB is alive again
+ substep_num = substep_hostboot_alive_again;
+ rc_ecmd |= data.insertFromRight(&substep_num,
+ substep_num_bit_position,
+ substep_num_bit_length);
+ if(rc_ecmd)
+ {
+ FAPI_ERR("Error (0x%x) setting up ecmdDataBufferBase", rc_ecmd);
+ rc.setEcmdError(rc_ecmd);
+ break;
+ }
+ rc = fapiPutScom(i_target, MBOX_SBEVITAL_0x0005001C, data);
+ if(!rc.ok())
+ {
+ FAPI_ERR("Scom error updating SBE VITAL\n");
+ break;
+ }
+
+ // Stop SBE if needed
+ rc = fapiGetScom(i_target, PORE_SBE_CONTROL_0x000E0001, data);
+ if(!rc.ok())
+ {
+ FAPI_ERR("Scom error reading SBE STATUS\n");
+ break;
+ }
+ if( data.isBitSet( 0 ) )
+ {
+ FAPI_INF("SBE/Deadman timer successfully stopped\n");
+ break;
+ }
+ else
+ {
+ rc_ecmd |= data.setBit( 0 );
+ if(rc_ecmd)
+ {
+ FAPI_ERR("Error (0x%x) setting up ecmdDataBufferBase", rc_ecmd);
+ rc.setEcmdError(rc_ecmd);
+ break;
+ }
+ rc = fapiPutScom(i_target, PORE_SBE_CONTROL_0x000E0001, data);
+ if(!rc.ok())
+ {
+ FAPI_ERR("Scom error stopping SBE\n");
+ break;
+ }
+ }
+
+ } while (0);
+
+ // mark function exit
+ FAPI_INF("Exit");
+ return rc;
+ }
+
+} // extern "C"
+/* Local Variables: */
+/* c-basic-offset: 4 */
+/* End: */
diff --git a/src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer/proc_stop_deadman_timer.H b/src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer/proc_stop_deadman_timer.H
new file mode 100644
index 000000000..5a016790b
--- /dev/null
+++ b/src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer/proc_stop_deadman_timer.H
@@ -0,0 +1,78 @@
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer/proc_stop_deadman_timer.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
+ */
+// $Id: proc_stop_deadman_timer.H,v 1.2 2012/08/10 14:17:49 jeshua Exp $
+// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_stop_deadman_timer.H,v $
+//------------------------------------------------------------------------------
+// *|
+// *! (C) Copyright International Business Machines Corp. 2012
+// *! All Rights Reserved -- Property of IBM
+// *! *** IBM Confidential ***
+// *|
+// *! TITLE : proc_stop_deadman_timer.H
+// *! DESCRIPTION : Stops deadman timer and SBE
+// *!
+// *! OWNER NAME : Jeshua Smith Email: jeshua@us.ibm.com
+// *!
+//------------------------------------------------------------------------------
+
+#ifndef _PROC_STOP_DEADMAN_TIMER_H_
+#define _PROC_STOP_DEADMAN_TIMER_H_
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+
+#include <fapi.H>
+
+//------------------------------------------------------------------------------
+// Structure definitions
+//------------------------------------------------------------------------------
+
+// function pointer typedef definition for HWP call support
+typedef fapi::ReturnCode (*proc_stop_deadman_timer_FP_t)(const fapi::Target &);
+
+//------------------------------------------------------------------------------
+// Constant definitions
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// Function prototypes
+//------------------------------------------------------------------------------
+
+
+extern "C"
+{
+
+/**
+ * @brief Stop the deadman timer and the SBE
+ *
+ * @param[in] i_target Reference to chip target
+ *
+ * @return ReturnCode
+ */
+ fapi::ReturnCode proc_stop_deadman_timer(const fapi::Target & i_target);
+
+} // extern "C"
+
+#endif // _PROC_STOP_DEADMAN_TIMER_H_
diff --git a/src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer/proc_stop_deadman_timer_errors.xml b/src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer/proc_stop_deadman_timer_errors.xml
new file mode 100644
index 000000000..b54043d2f
--- /dev/null
+++ b/src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer/proc_stop_deadman_timer_errors.xml
@@ -0,0 +1,39 @@
+<!-- IBM_PROLOG_BEGIN_TAG
+ This is an automatically generated prolog.
+
+ $Source: src/usr/hwpf/hwp/core_activate/proc_stop_deadman_timer/proc_stop_deadman_timer_errors.xml $
+
+ 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 -->
+<!-- Error definitions for proc_stop_deadman_timer procedure -->
+<hwpErrors>
+ <!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_PROC_STOP_DEADMAN_TIMER_BAD_ISTEP_NUM</rc>
+ <description>The SBE is not at the correct istep number</description>
+ <collectFfdc>proc_sbe_ffdc, CHIP_IN_ERROR</collectFfdc>
+ <ffdc>SBE_VITAL</ffdc>
+ </hwpError>
+ <!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_PROC_STOP_DEADMAN_TIMER_BAD_SUBSTEP_NUM</rc>
+ <description>The SBE is not at the correct substep number</description>
+ <collectFfdc>proc_sbe_ffdc, CHIP_IN_ERROR</collectFfdc>
+ <ffdc>SBE_VITAL</ffdc>
+ </hwpError>
+</hwpErrors>
OpenPOWER on IntegriCloud