summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorThi Tran <thi@us.ibm.com>2014-04-30 19:09:56 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-05-04 13:47:16 -0500
commitebe311eab95449b8e69466ac4d9e14e4b91ab74e (patch)
tree8b1bd6a57b9d745b52459a47f686a31a75b31ec7 /src/usr
parent81dcacf4968042095a16571056cd336f4251c932 (diff)
downloadtalos-hostboot-ebe311eab95449b8e69466ac4d9e14e4b91ab74e.tar.gz
talos-hostboot-ebe311eab95449b8e69466ac4d9e14e4b91ab74e.zip
SW259646: INITPROC: Hostboot - Missed with SW250563
Change-Id: I1b20a6154dc258a1dbbd6088bd3b505d9064353c CQ:SW259646 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/10862 Reviewed-by: Thi N. Tran <thi@us.ibm.com> Tested-by: Thi N. Tran <thi@us.ibm.com> Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/10867 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/hwpf/hwp/build_winkle_images/p8_set_pore_bar/p8_set_pore_bar.C142
-rw-r--r--src/usr/hwpf/hwp/build_winkle_images/p8_set_pore_bar/p8_set_pore_bar_errors.xml12
2 files changed, 107 insertions, 47 deletions
diff --git a/src/usr/hwpf/hwp/build_winkle_images/p8_set_pore_bar/p8_set_pore_bar.C b/src/usr/hwpf/hwp/build_winkle_images/p8_set_pore_bar/p8_set_pore_bar.C
index 38f1a6d02..821a8c4ba 100644
--- a/src/usr/hwpf/hwp/build_winkle_images/p8_set_pore_bar/p8_set_pore_bar.C
+++ b/src/usr/hwpf/hwp/build_winkle_images/p8_set_pore_bar/p8_set_pore_bar.C
@@ -20,7 +20,7 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: p8_set_pore_bar.C,v 1.8 2014/01/24 19:24:37 stillgs Exp $
+// $Id: p8_set_pore_bar.C,v 1.9 2014/03/07 14:38:52 stillgs Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/p8_set_pore_bar.C,v $
//-------------------------------------------------------------------------------
// *! (C) Copyright International Business Machines Corp. 2011
@@ -644,67 +644,119 @@ fapi::ReturnCode
bar_pba_slave_reset(const fapi::Target& i_target, uint32_t id)
{
- uint32_t poll_count = 0;
pba_slvrst_t psr;
fapi::ReturnCode rc;
- uint32_t l_ecmdRc = 0;
+ uint32_t e_rc = 0;
ecmdDataBufferBase data(64);
+
+ bool poll_failure = false;
+ uint32_t p;
+
+ uint8_t ec_has_pba_slvrest_bug = 0;
+ uint8_t attr_mpipl = 0;
// Tell PBA to reset the slave, then poll for completion with timeout.
// The PBA is always polled at least twice to guarantee that we always
// poll once after a timeout.
+
+ do
+ {
+ rc = FAPI_ATTR_GET(ATTR_CHIP_EC_FEATURE_HW_BUG_PBASLVRESET,
+ &i_target,
+ ec_has_pba_slvrest_bug);
+ if(rc)
+ {
+ FAPI_ERR("Error querying Chip EC feature: "
+ "ATTR_CHIP_EC_FEATURE_HW_BUG_PBASLVRESET");
+ break;
+ }
+
+ rc = FAPI_ATTR_GET(ATTR_IS_MPIPL, NULL, attr_mpipl);
+ if(rc)
+ {
+ FAPI_ERR("Error querying attribute ATTR_IS_MPIPL");
+ break;
+ }
- psr.value = 0;
- psr.fields.set = PBA_SLVRST_SET(id);
+ psr.value = 0;
+ psr.fields.set = PBA_SLVRST_SET(id);
- FAPI_DBG(" PBA_SLVRST%x: 0x%16llx", id, psr.value);
+ FAPI_DBG(" PBA_SLVRST%x: 0x%16llx", id, psr.value);
- l_ecmdRc |= data.setDoubleWord(0, psr.value);
- if(l_ecmdRc)
- {
- FAPI_ERR("Error (0x%x) manipulating ecmdDataBufferBase for PBA_SLVRST", l_ecmdRc);
- rc.setEcmdError(l_ecmdRc);
- return rc;
- }
+ e_rc |= data.setDoubleWord(0, psr.value);
+ if(e_rc)
+ {
+ FAPI_ERR("Error (0x%x) manipulating ecmdDataBufferBase for PBA_SLVRST", e_rc);
+ rc.setEcmdError(e_rc);
+ return rc;
+ }
- rc = fapiPutScom(i_target, PBA_SLVRST_0x00064001, data);
- if (rc)
- {
- FAPI_ERR("Put SCOM error for PBA Slave Reset");
- }
- else
- {
- do
+ rc = fapiPutScom(i_target, PBA_SLVRST_0x00064001, data);
+ if (rc)
{
- rc = fapiGetScom(i_target, PBA_SLVRST_0x00064001, data);
- if (rc)
+ FAPI_ERR("Put SCOM error for PBA Slave Reset");
+ break;
+ }
+
+ // Due to HW228485, skip the check of the in-progress bits for MPIPL
+ // (after the PBA channels have been used at runtime) as they
+ // are unreliable in Murano 1.x.
+ if (attr_mpipl && ec_has_pba_slvrest_bug)
+ {
+ FAPI_INF("PBA Reset Polling being skipped due to MPIPL on a chip with PBA reset bug");
+ }
+ else
+ {
+ poll_failure = true;
+ for (p=0; p<MAX_PBA_RESET_POLLS; p++)
{
- FAPI_ERR("Put SCOM error for PBA Slave Reset");
- break;
- }
-
- psr.value = data.getDoubleWord(0);
-
- if (!(psr.fields.in_prog & PBA_SLVRST_IN_PROG(id)))
+ // Read the reset register to check for reset completion
+ rc = fapiGetScom(i_target, PBA_SLVRST_0x00064001 , data);
+ if (rc)
+ {
+ FAPI_ERR("fapiGetPutScom( PBA_SLVRST_0x00064001 ) failed. With rc = 0x%x", (uint32_t)rc);
+ break;
+ }
+ FAPI_DBG("Slave %x reset poll data = 0x%016llX", id, data.getDoubleWord(0));
+
+ // If slave reset in progress, wait and then poll
+ if (data.isBitClear(4+id))
+ {
+ FAPI_INF("PBA Reset complete for Slave %d", id);
+ poll_failure = false;
+ break;
+ }
+ else
+ {
+ rc = fapiDelay(PBA_RESET_POLL_DELAY*1000, 200000); // In microseconds
+ if (rc)
+ {
+ FAPI_ERR("fapiDelay failed. With rc = 0x%x", (uint32_t)rc);
+ break;
+ }
+ }
+ }
+
+ // Error exit from above loop
+ if (!rc.ok())
{
- break;
- }
+ break;
+ }
- poll_count++;
- if (poll_count == PBA_SLAVE_RESET_TIMEOUT)
+ if (poll_failure)
{
- const fapi::Target & CHIP = i_target;
- const uint32_t & POLLCOUNT = poll_count;
- const uint32_t & TIMEOUTVALUE = PBA_SLAVE_RESET_TIMEOUT;
- const uint64_t & PSR = psr.value;
- const uint32_t & SLVID = id;
- FAPI_SET_HWP_ERROR(rc, RC_PROCPM_PBA_SLVRST_TIMED_OUT);
- break;
- }
-
- } while (1);
- }
+ FAPI_ERR("PBA Slave Reset Timout");
+ const fapi::Target & CHIP = i_target;
+ const uint32_t & POLLCOUNT = MAX_PBA_RESET_POLLS;
+ const uint32_t & POLLVALUE = PBA_RESET_POLL_DELAY;
+ const uint64_t & PSR = data.getDoubleWord(0);
+ const uint32_t & SLVID = id;
+ FAPI_SET_HWP_ERROR(rc, RC_PROCPM_PBA_SLVRST_TIMED_OUT);
+ break;
+ }
+ }
+ } while(0);
return rc;
}
diff --git a/src/usr/hwpf/hwp/build_winkle_images/p8_set_pore_bar/p8_set_pore_bar_errors.xml b/src/usr/hwpf/hwp/build_winkle_images/p8_set_pore_bar/p8_set_pore_bar_errors.xml
index 4fff60cc3..74715e070 100644
--- a/src/usr/hwpf/hwp/build_winkle_images/p8_set_pore_bar/p8_set_pore_bar_errors.xml
+++ b/src/usr/hwpf/hwp/build_winkle_images/p8_set_pore_bar/p8_set_pore_bar_errors.xml
@@ -20,7 +20,7 @@
<!-- Origin: 30 -->
<!-- -->
<!-- IBM_PROLOG_END_TAG -->
-<!-- $Id: p8_set_pore_bar_errors.xml,v 1.5 2014/01/24 19:19:14 stillgs Exp $ -->
+<!-- $Id: p8_set_pore_bar_errors.xml,v 1.7 2014/03/07 14:32:52 stillgs Exp $ -->
<!-- Error definitions for p8_set_pore_bar procedure -->
<hwpErrors>
<!-- *********************************************************************** -->
@@ -65,7 +65,7 @@
<rc>RC_PROCPM_PBA_SLVRST_TIMED_OUT</rc>
<description>PBA Slave Reset timed out in p8_set_pore_bar</description>
<ffdc>POLLCOUNT</ffdc>
- <ffdc>TIMEOUTVALUE</ffdc>
+ <ffdc>POLLVALUE</ffdc>
<ffdc>PSR</ffdc>
<ffdc>SLVID</ffdc>
<callout>
@@ -115,11 +115,19 @@
<hwpError>
<rc>RC_PROCPM_POREBAR_IMAGE_PLACEMENT_ERROR</rc>
<description>Image address plus image size overflows PBA region in p8_set_pore_bar</description>
+ <callout>
+ <procedure>CODE</procedure>
+ <priority>HIGH</priority>
+ </callout>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
<rc>RC_PROCPM_POREBAR_IMAGE_ADDR_ERROR</rc>
<description>Find of XIP of slw_control_vector failed in p8_set_pore_bar</description>
+ <callout>
+ <procedure>CODE</procedure>
+ <priority>HIGH</priority>
+ </callout>
</hwpError>
<!-- *********************************************************************** -->
<hwpError>
OpenPOWER on IntegriCloud