summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp/slave_sbe
diff options
context:
space:
mode:
authorThi Tran <thi@us.ibm.com>2014-02-26 11:30:50 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-02-27 10:49:54 -0600
commit66f9ea2003de6c4ddd9e359296243c5cc27f2279 (patch)
tree60f9768ca37b1b99c4e8bd66f7cb83aafccc0ecc /src/usr/hwpf/hwp/slave_sbe
parent0639086ea0d8449932033e9ee5eaceaf5773a3b8 (diff)
downloadtalos-hostboot-66f9ea2003de6c4ddd9e359296243c5cc27f2279.tar.gz
talos-hostboot-66f9ea2003de6c4ddd9e359296243c5cc27f2279.zip
INITPROC: Hostboot SW211645 SBE config update fix
Change-Id: Idb93f9efd9332cdf0cb62c7bfdf8c6289011c86a CQ:SW211645 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9180 Tested-by: Jenkins Server Reviewed-by: Donald E. Dahle <dedahle@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp/slave_sbe')
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/makefile5
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete.C33
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_extract_sbe_rc.C48
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_extract_sbe_rc_errors.xml156
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_reset_i2cm_bus_fence.C105
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_reset_i2cm_bus_fence.H75
6 files changed, 339 insertions, 83 deletions
diff --git a/src/usr/hwpf/hwp/slave_sbe/makefile b/src/usr/hwpf/hwp/slave_sbe/makefile
index c18022cac..4e6b29f53 100644
--- a/src/usr/hwpf/hwp/slave_sbe/makefile
+++ b/src/usr/hwpf/hwp/slave_sbe/makefile
@@ -5,7 +5,7 @@
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2012,2013
+# COPYRIGHT International Business Machines Corp. 2012,2014
#
# p1
#
@@ -52,7 +52,8 @@ OBJS = slave_sbe.o \
proc_read_seeprom.o \
proc_getecid.o \
proc_cen_ref_clk_enable.o \
- proc_spless_sbe_startWA.o
+ proc_spless_sbe_startWA.o \
+ proc_reset_i2cm_bus_fence.o
## NOTE: add a new directory onto the vpaths when you add a new HWP
VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/slave_sbe/proc_cen_ref_clk_enable
diff --git a/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete.C b/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete.C
index 5f5515264..9eddd5582 100644
--- a/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete.C
+++ b/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_check_slave_sbe_seeprom_complete.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2013 */
+/* COPYRIGHT International Business Machines Corp. 2012,2014 */
/* */
/* p1 */
/* */
@@ -21,7 +21,7 @@
/* */
/* IBM_PROLOG_END_TAG */
// -*- mode: C++; c-file-style: "linux"; -*-
-// $Id: proc_check_slave_sbe_seeprom_complete.C,v 1.11 2013/11/05 22:08:23 jeshua Exp $
+// $Id: proc_check_slave_sbe_seeprom_complete.C,v 1.13 2014/02/19 02:31:45 jmcgill Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_check_slave_sbe_seeprom_complete.C,v $
//------------------------------------------------------------------------------
// *|
@@ -32,7 +32,7 @@
// *! TITLE : proc_check_slave_sbe_seeprom_complete.C
// *! DESCRIPTION : Check if a slave has completed the seeprom code
// *!
-// *! OWNER NAME : Jeshua Smith Email: jeshua@us.ibm.com
+// *! OWNER NAME : Joe McGill Email: jmcgill@us.ibm.com
// *!
// *! Overview:
// *! Check if the SBE is still running
@@ -49,6 +49,7 @@
#include <proc_sbe_check_master.H>
#include <proc_sbe_enable_pnor.H>
#include <proc_extract_sbe_rc.H>
+#include <proc_reset_i2cm_bus_fence.H>
//------------------------------------------------------------------------------
// Constant definitions
@@ -227,6 +228,9 @@ extern "C"
uint32_t rc_ecmd = 0;
fapi::ReturnCode rc;
+ // track if procedure has cleared I2C master bus fence
+ bool i2cm_bus_fence_cleared = false;
+
// mark function entry
FAPI_INF("Entry");
@@ -238,7 +242,7 @@ extern "C"
i_target,
still_running );
if( rc )
- {
+ {
break;
}
@@ -271,6 +275,7 @@ extern "C"
"SBE still running after waiting (%lldns, %lld cycles)",
NS_TO_FINISH,
SIM_CYCLES_TO_FINISH );
+
const fapi::Target & CHIP_IN_ERROR = i_target;
FAPI_SET_HWP_ERROR(rc,
RC_PROC_CHECK_SLAVE_SBE_SEEPROM_COMPLETE_STILL_RUNNING);
@@ -279,11 +284,20 @@ extern "C"
} //end if(still_running)
//SBE is stopped. Let's see where
-
uint8_t halt_code = 0;
uint16_t istep_num = 0;
uint8_t substep_num = 0;
+ // before analysis proceeds, make sure that I2C master bus fence is cleared
+ FAPI_EXEC_HWP(rc, proc_reset_i2cm_bus_fence, i_target);
+ if (!rc.ok())
+ {
+ FAPI_ERR("Error from proc_reset_i2cm_bus_fence");
+ break;
+ }
+ // mark that fence has been cleared
+ i2cm_bus_fence_cleared = true;
+
//Get current location from SBE VITAL
rc = proc_check_slave_sbe_seeprom_complete_get_location(
i_target,
@@ -367,6 +381,15 @@ extern "C"
}
} while (0);
+ // if an error occurred prior to the I2C master bus fence
+ // being cleared, attempt to clear it prior to exit
+ if (!rc.ok() && !i2cm_bus_fence_cleared)
+ {
+ // discard rc, return that of original fail
+ fapi::ReturnCode rc_unused;
+ FAPI_EXEC_HWP(rc_unused, proc_reset_i2cm_bus_fence, i_target);
+ }
+
// mark function exit
FAPI_INF("Exit");
return rc;
diff --git a/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_extract_sbe_rc.C b/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_extract_sbe_rc.C
index bbf2b87ca..89dfd8d8f 100644
--- a/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_extract_sbe_rc.C
+++ b/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_extract_sbe_rc.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2013 */
+/* COPYRIGHT International Business Machines Corp. 2012,2014 */
/* */
/* p1 */
/* */
@@ -21,7 +21,7 @@
/* */
/* IBM_PROLOG_END_TAG */
// -*- mode: C++; c-file-style: "linux"; -*-
-// $Id: proc_extract_sbe_rc.C,v 1.9 2013/11/05 22:16:08 jeshua Exp $
+// $Id: proc_extract_sbe_rc.C,v 1.12 2014/02/19 02:31:45 jmcgill Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_extract_sbe_rc.C,v $
//------------------------------------------------------------------------------
// *|
@@ -32,7 +32,7 @@
// *! TITLE : proc_extract_sbe_rc.C
// *! DESCRIPTION : Create a return code for an SBE error
// *!
-// *! OWNER NAME : Jeshua Smith Email: jeshua@us.ibm.com
+// *! OWNER NAME : Johannes Koesters Email: koesters@de.ibm.com
// *!
// *! Overview:
// *! - Check that it was a halt at magic instruction
@@ -51,6 +51,7 @@
// Includes
//------------------------------------------------------------------------------
#include <proc_extract_sbe_rc.H>
+#include <proc_reset_i2cm_bus_fence.H>
#include <p8_scom_addresses.H>
@@ -108,19 +109,16 @@ extern "C"
const fapi::Target & CHIP_IN_ERROR = i_target;
const uint32_t & ADDRESS = i_address;
FAPI_SET_HWP_ERROR(rc, RC_PROC_EXTRACT_SBE_RC_IMAGE_POINTER_NULL);
+ break;
}
- else
- {
- uint8_t * p_errorCode = (uint8_t *)i_pSEEPROM + (i_address & ALIGN_FOUR_BYTE);
+ uint8_t * p_errorCode = (uint8_t *)i_pSEEPROM + (i_address & ALIGN_FOUR_BYTE);
- //Copy the data out of the image pointer
- o_data =
- (p_errorCode[0] << 3*8) |
- (p_errorCode[1] << 2*8) |
- (p_errorCode[2] << 1*8) |
- (p_errorCode[3]);
- rc = fapi::FAPI_RC_SUCCESS;
- }
+ //Copy the data out of the image pointer
+ o_data =
+ (p_errorCode[0] << 3*8) |
+ (p_errorCode[1] << 2*8) |
+ (p_errorCode[2] << 1*8) |
+ (p_errorCode[3]);
} while(0);
return rc;
}
@@ -203,7 +201,9 @@ extern "C"
{
rc = proc_extract_sbe_rc_get_pc(i_target,i_engine,address_64);
if (rc)
+ {
break;
+ }
uint32_t error_code = 0;
//Add 4 because address_64 is pointing at the halt instruction
@@ -263,7 +263,8 @@ extern "C"
//Look up that error code
//////////////////////////////////////////
FAPI_ERR("SBE got error code 0x%06X", error_code);
- const fapi::Target & CHIP_IN_ERROR = i_target;
+ const fapi::Target CHIP_IN_ERROR = i_target;
+ const fapi::Target CHIP = i_target;
FAPI_SET_SBE_ERROR(rc, error_code);
} while(0);
@@ -309,12 +310,25 @@ extern "C"
if ((i_engine != SBE) &&
(i_engine != SLW))
{
- FAPI_ERR("Unknow engine type %i", i_engine);
+ FAPI_ERR("Unknown engine type %i", i_engine);
const por_engine_t ENGINE = i_engine;
+ const fapi::Target & CHIP_IN_ERROR = i_target;
FAPI_SET_HWP_ERROR(rc, RC_PROC_EXTRACT_SBE_RC_UNKNOWN_ENGINE);
break;
}
+ // if analyzing SBE engine failure, make sure I2C master bus fence is
+ // released before proceeding
+ if (i_engine == SBE)
+ {
+ FAPI_EXEC_HWP(rc, proc_reset_i2cm_bus_fence, i_target);
+ if (!rc.ok())
+ {
+ FAPI_ERR("Error from proc_reset_i2cm_bus_fence");
+ break;
+ }
+ }
+
//JDS TODO - split out the generic error into more granular errors?
bool generic_hw_error = false;
//////////////////////////////////////////
@@ -479,7 +493,9 @@ extern "C"
uint64_t pc = 0;
rc = proc_extract_sbe_rc_get_pc(i_target, i_engine, pc);
if (rc)
+ {
break;
+ }
if ((pc & ADDR_TYPE_MASK) == OTPROM_ADDR_TYPE)
{
diff --git a/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_extract_sbe_rc_errors.xml b/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_extract_sbe_rc_errors.xml
index 1a2ad48a8..a754f87ad 100644
--- a/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_extract_sbe_rc_errors.xml
+++ b/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_extract_sbe_rc_errors.xml
@@ -5,7 +5,7 @@
<!-- -->
<!-- IBM CONFIDENTIAL -->
<!-- -->
-<!-- COPYRIGHT International Business Machines Corp. 2012,2013 -->
+<!-- COPYRIGHT International Business Machines Corp. 2012,2014 -->
<!-- -->
<!-- p1 -->
<!-- -->
@@ -20,7 +20,7 @@
<!-- Origin: 30 -->
<!-- -->
<!-- IBM_PROLOG_END_TAG -->
-<!-- $Id: proc_extract_sbe_rc_errors.xml,v 1.7 2013/09/19 19:29:07 jeshua Exp $ -->
+<!-- $Id: proc_extract_sbe_rc_errors.xml,v 1.8 2014/02/10 02:55:29 stillgs Exp $ -->
<!-- Error definitions for proc_extract_sbe_rc procedure -->
<hwpErrors>
<!-- *********************************************************************** -->
@@ -37,6 +37,12 @@
<id>REG_FFDC_PROC_SBE_REGISTERS</id>
<target>CHIP_IN_ERROR</target>
</collectRegisterFfdc>
+ <deconfigure>
+ <target>CHIP_IN_ERROR</target>
+ </deconfigure>
+ <gard>
+ <target>CHIP_IN_ERROR</target>
+ </gard>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
@@ -51,6 +57,9 @@
<id>REG_FFDC_PROC_SBE_REGISTERS</id>
<target>CHIP_IN_ERROR</target>
</collectRegisterFfdc>
+ <deconfigure>
+ <target>CHIP_IN_ERROR</target>
+ </deconfigure>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
@@ -65,6 +74,16 @@
<id>REG_FFDC_PROC_SBE_REGISTERS</id>
<target>CHIP_IN_ERROR</target>
</collectRegisterFfdc>
+ <callout>
+ <procedure>CODE</procedure>
+ <priority>LOW</priority>
+ </callout>
+ <deconfigure>
+ <target>CHIP_IN_ERROR</target>
+ </deconfigure>
+ <gard>
+ <target>CHIP_IN_ERROR</target>
+ </gard>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
@@ -79,6 +98,12 @@
<id>REG_FFDC_PROC_SBE_REGISTERS</id>
<target>CHIP_IN_ERROR</target>
</collectRegisterFfdc>
+ <deconfigure>
+ <target>CHIP_IN_ERROR</target>
+ </deconfigure>
+ <gard>
+ <target>CHIP_IN_ERROR</target>
+ </gard>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
@@ -93,50 +118,12 @@
<id>REG_FFDC_PROC_SBE_REGISTERS</id>
<target>CHIP_IN_ERROR</target>
</collectRegisterFfdc>
- </hwpError>
- <!-- *********************************************************************** -->
- <hwpError>
- <rc>RC_PROC_EXTRACT_SBE_RC_SCOM_ERROR</rc>
- <description>
- Procedure: proc_extract_sbe_rc
- Got a scom error when trying to extract the SBE error
- </description>
- <ffdc>ADDRESS</ffdc>
- <ffdc>ERROR</ffdc>
- <ffdc>CHIP_IN_ERROR</ffdc>
- </hwpError>
- <!-- *********************************************************************** -->
- <hwpError>
- <rc>RC_PROC_EXTRACT_SBE_RC_MODEL_ERROR_GETTING_SCOM</rc>
- <description>
- Procedure: proc_extract_sbe_rc
- Got a model error when trying to extract the SBE error
- </description>
- <ffdc>ADDRESS</ffdc>
- <ffdc>ERROR</ffdc>
- <ffdc>CHIP_IN_ERROR</ffdc>
- </hwpError>
- <!-- *********************************************************************** -->
- <hwpError>
- <rc>RC_PROC_EXTRACT_SBE_RC_MODEL_ERRROR_SETTING_SEEPROM_ADDR</rc>
- <description>
- Procedure: proc_extract_sbe_rc
- Got a model error when trying to set the SEEPROM address to extract
- </description>
- <ffdc>ADDRESS</ffdc>
- <ffdc>ERROR</ffdc>
- <ffdc>CHIP_IN_ERROR</ffdc>
- </hwpError>
- <!-- *********************************************************************** -->
- <hwpError>
- <rc>RC_PROC_EXTRACT_SBE_RC_MODEL_ERRROR_READING_SEEPROM</rc>
- <description>
- Procedure: proc_extract_sbe_rc
- Got a model error when trying to read the SEEPROM address containing the RC
- </description>
- <ffdc>ADDRESS</ffdc>
- <ffdc>ERROR</ffdc>
- <ffdc>CHIP_IN_ERROR</ffdc>
+ <deconfigure>
+ <target>CHIP_IN_ERROR</target>
+ </deconfigure>
+ <gard>
+ <target>CHIP_IN_ERROR</target>
+ </gard>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
@@ -146,6 +133,17 @@
Tried to extract error from unknown engine type
</description>
<ffdc>ENGINE</ffdc>
+ <callout>
+ <target>CHIP_IN_ERROR</target>
+ <priority>HIGH</priority>
+ </callout>
+ <callout>
+ <procedure>CODE</procedure>
+ <priority>LOW</priority>
+ </callout>
+ <deconfigure>
+ <target>CHIP_IN_ERROR</target>
+ </deconfigure>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
@@ -160,6 +158,12 @@
<id>REG_FFDC_PROC_SBE_REGISTERS</id>
<target>CHIP_IN_ERROR</target>
</collectRegisterFfdc>
+ <deconfigure>
+ <target>CHIP_IN_ERROR</target>
+ </deconfigure>
+ <gard>
+ <target>CHIP_IN_ERROR</target>
+ </gard>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
@@ -173,6 +177,9 @@
<id>REG_FFDC_PROC_SLW_REGISTERS</id>
<target>CHIP_IN_ERROR</target>
</collectRegisterFfdc>
+ <gard>
+ <target>CHIP_IN_ERROR</target>
+ </gard>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
@@ -187,6 +194,17 @@
<id>REG_FFDC_PROC_SBE_REGISTERS</id>
<target>CHIP_IN_ERROR</target>
</collectRegisterFfdc>
+ <callout>
+ <target>CHIP_IN_ERROR</target>
+ <priority>HIGH</priority>
+ </callout>
+ <callout>
+ <procedure>CODE</procedure>
+ <priority>LOW</priority>
+ </callout>
+ <deconfigure>
+ <target>CHIP_IN_ERROR</target>
+ </deconfigure>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
@@ -200,6 +218,14 @@
<id>REG_FFDC_PROC_SLW_REGISTERS</id>
<target>CHIP_IN_ERROR</target>
</collectRegisterFfdc>
+ <callout>
+ <target>CHIP_IN_ERROR</target>
+ <priority>HIGH</priority>
+ </callout>
+ <callout>
+ <procedure>CODE</procedure>
+ <priority>LOW</priority>
+ </callout>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
@@ -214,6 +240,17 @@
<id>REG_FFDC_PROC_SBE_REGISTERS</id>
<target>CHIP_IN_ERROR</target>
</collectRegisterFfdc>
+ <callout>
+ <target>CHIP_IN_ERROR</target>
+ <priority>HIGH</priority>
+ </callout>
+ <callout>
+ <procedure>CODE</procedure>
+ <priority>LOW</priority>
+ </callout>
+ <deconfigure>
+ <target>CHIP_IN_ERROR</target>
+ </deconfigure>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
@@ -227,6 +264,9 @@
<id>REG_FFDC_PROC_SBE_REGISTERS</id>
<target>CHIP_IN_ERROR</target>
</collectRegisterFfdc>
+ <deconfigure>
+ <target>CHIP_IN_ERROR</target>
+ </deconfigure>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
@@ -240,6 +280,9 @@
<id>REG_FFDC_PROC_SLW_REGISTERS</id>
<target>CHIP_IN_ERROR</target>
</collectRegisterFfdc>
+ <gard>
+ <target>CHIP_IN_ERROR</target>
+ </gard>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
@@ -253,6 +296,13 @@
<id>REG_FFDC_PROC_SBE_REGISTERS</id>
<target>CHIP_IN_ERROR</target>
</collectRegisterFfdc>
+ <callout>
+ <procedure>CODE</procedure>
+ <priority>LOW</priority>
+ </callout>
+ <deconfigure>
+ <target>CHIP_IN_ERROR</target>
+ </deconfigure>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
@@ -268,16 +318,9 @@
<id>REG_FFDC_PROC_FIRST_OTPROM_INSTRUCTIONS</id>
<target>CHIP_IN_ERROR</target>
</collectRegisterFfdc>
- <callout>
- <target>CHIP_IN_ERROR</target>
- <priority>HIGH</priority>
- </callout>
<deconfigure>
<target>CHIP_IN_ERROR</target>
</deconfigure>
- <gard>
- <target>CHIP_IN_ERROR</target>
- </gard>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
@@ -291,13 +334,6 @@
<id>REG_FFDC_PROC_SLW_REGISTERS</id>
<target>CHIP_IN_ERROR</target>
</collectRegisterFfdc>
- <callout>
- <target>CHIP_IN_ERROR</target>
- <priority>HIGH</priority>
- </callout>
- <deconfigure>
- <target>CHIP_IN_ERROR</target>
- </deconfigure>
<gard>
<target>CHIP_IN_ERROR</target>
</gard>
diff --git a/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_reset_i2cm_bus_fence.C b/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_reset_i2cm_bus_fence.C
new file mode 100644
index 000000000..5f97ee47a
--- /dev/null
+++ b/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_reset_i2cm_bus_fence.C
@@ -0,0 +1,105 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_reset_i2cm_bus_fence.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2014 */
+/* */
+/* 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_reset_i2cm_bus_fence.C,v 1.1 2014/02/18 19:53:44 jmcgill Exp $
+// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_reset_i2cm_bus_fence.C,v $
+//------------------------------------------------------------------------------
+// *! (C) Copyright International Business Machines Corp. 2012
+// *! All Rights Reserved -- Property of IBM
+// *! *** IBM Confidential ***
+//------------------------------------------------------------------------------
+// *! TITLE : proc_reset_i2cm_bus_fence.C
+// *! DESCRIPTION : Clear i2cm bus fence to restore FSP access (FAPI)
+// *!
+// *! OWNER NAME : Joe McGill Email: jmcgill@us.ibm.com
+// *!
+// *! ADDITIONAL COMMENTS :
+// *!
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+#include <proc_reset_i2cm_bus_fence.H>
+#include <p8_scom_addresses.H>
+
+
+//------------------------------------------------------------------------------
+// Constant definitions
+//------------------------------------------------------------------------------
+const uint32_t CFAM_FSI_GP4_I2CM_BUS_FENCE_BIT = 20;
+
+
+//------------------------------------------------------------------------------
+// Function definitions
+//------------------------------------------------------------------------------
+
+extern "C" {
+
+// HWP entry point, comments in header
+fapi::ReturnCode proc_reset_i2cm_bus_fence(const fapi::Target & i_target)
+{
+ fapi::ReturnCode rc;
+ uint32_t rc_ecmd = 0;
+
+ ecmdDataBufferBase cfam_data(32);
+
+ // mark HWP entry
+ FAPI_INF("proc_reset_i2cm_bus_fence: Start");
+
+ do
+ {
+ // read FSI GP4
+ rc = fapiGetCfamRegister(i_target, CFAM_FSI_GP4_0x00002813, cfam_data);
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_reset_i2cm_bus_fence: Error from fapiGetCfamRegister (CFAM_FSI_GP4_0x00002813)");
+ break;
+ }
+
+ // clear fence bit
+ rc_ecmd |= cfam_data.clearBit(CFAM_FSI_GP4_I2CM_BUS_FENCE_BIT);
+ if (rc_ecmd)
+ {
+ FAPI_ERR("proc_reset_i2cm_bus_fence: Error 0x%x forming FSI GP4 register write data buffer",
+ rc_ecmd);
+ rc.setEcmdError(rc_ecmd);
+ break;
+ }
+
+ // write back modified data
+ rc = fapiPutCfamRegister(i_target, CFAM_FSI_GP4_0x00002813, cfam_data);
+ if (!rc.ok())
+ {
+ FAPI_ERR("proc_reset_i2cm_bus_fence: Error from fapiGetCfamRegister (CFAM_FSI_GP4_0x00002813)");
+ break;
+ }
+
+ } while(0);
+
+ // mark HWP exit
+ FAPI_INF("proc_reset_i2cm_bus_fence: End");
+ return rc;
+}
+
+
+} // extern "C"
diff --git a/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_reset_i2cm_bus_fence.H b/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_reset_i2cm_bus_fence.H
new file mode 100644
index 000000000..3467ae08a
--- /dev/null
+++ b/src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_reset_i2cm_bus_fence.H
@@ -0,0 +1,75 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwpf/hwp/slave_sbe/proc_check_slave_sbe_seeprom_complete/proc_reset_i2cm_bus_fence.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2014 */
+/* */
+/* 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_reset_i2cm_bus_fence.H,v 1.1 2014/02/18 19:53:45 jmcgill Exp $
+// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_reset_i2cm_bus_fence.H,v $
+///------------------------------------------------------------------------------
+// *! (C) Copyright International Business Machines Corp. 2012
+// *! All Rights Reserved -- Property of IBM
+// *! *** IBM Confidential ***
+//------------------------------------------------------------------------------
+// *! TITLE : proc_reset_i2cm_bus_fence.C
+// *! DESCRIPTION : Clear i2cm bus fence to restore FSP access (FAPI)
+// *!
+// *! OWNER NAME : Joe McGill Email: jmcgill@us.ibm.com
+// *!
+// *! ADDITIONAL COMMENTS :
+// *!
+//------------------------------------------------------------------------------
+
+#ifndef PROC_RESET_I2CM_BUS_FENCE_H_
+#define PROC_RESET_I2CM_BUS_FENCE_H_
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+#include <fapi.H>
+
+
+//------------------------------------------------------------------------------
+// Structure definitions
+//------------------------------------------------------------------------------
+
+// function pointer typedef definition for HWP call support
+typedef fapi::ReturnCode
+(*proc_reset_i2cm_bus_fence_FP_t)(const fapi::Target & i_target);
+
+extern "C" {
+
+//------------------------------------------------------------------------------
+// Function prototypes
+//------------------------------------------------------------------------------
+
+/**
+ * @brief HWP which clears i2cm bus fence to restore FSP access in the case of
+ * an SBE engine failure
+ *
+ * @param[in] i_target Reference to processor chip target
+ *
+ * @return ReturnCode
+ */
+fapi::ReturnCode proc_reset_i2cm_bus_fence(const fapi::Target & i_target);
+
+
+} // extern "C"
+
+#endif // PROC_RESET_I2CM_BUS_FENCE_H_
OpenPOWER on IntegriCloud