summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorThi Tran <thi@us.ibm.com>2014-04-25 15:14:25 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-05-04 13:53:48 -0500
commitd9ebc89c4677fe5e25a636d7e3b624e35b9139d4 (patch)
tree556a0873579dd384142454d1cb5cfa9d31f94baa /src/usr
parent036f2469150d1024490d824071d4b899a10cb010 (diff)
downloadtalos-hostboot-d9ebc89c4677fe5e25a636d7e3b624e35b9139d4.tar.gz
talos-hostboot-d9ebc89c4677fe5e25a636d7e3b624e35b9139d4.zip
SW257243: Issue of SW244628 unfixed in v810.1 of HWP io_read_erepair
Change-Id: I74dccdaa72a0f228247344d0ed71e25e6d019708 CQ:SW257243 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/10778 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/10779 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/bus_training/io_read_erepair.C34
-rw-r--r--src/usr/hwpf/hwp/bus_training/io_restore_erepair.C48
2 files changed, 41 insertions, 41 deletions
diff --git a/src/usr/hwpf/hwp/bus_training/io_read_erepair.C b/src/usr/hwpf/hwp/bus_training/io_read_erepair.C
index 0aa7a399a..84eae19ca 100644
--- a/src/usr/hwpf/hwp/bus_training/io_read_erepair.C
+++ b/src/usr/hwpf/hwp/bus_training/io_read_erepair.C
@@ -20,26 +20,26 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: io_read_erepair.C,v 1.11 2014/03/06 11:44:04 varkeykv Exp $
+// $Id: io_read_erepair.C,v 1.12 2014/04/17 15:58:23 steffen Exp $
// *!***************************************************************************
// *! (C) Copyright International Business Machines Corp. 1997, 1998
// *! All Rights Reserved -- Property of IBM
// *! *** IBM Confidential ***
// *!***************************************************************************
// *! FILENAME : io_read_erepair.C
-// *! TITLE :
-// *! DESCRIPTION : Read e-repair data
-// *! CONTEXT :
+// *! TITLE :
+// *! DESCRIPTION : Read e-repair data
+// *! CONTEXT :
// *!
// *! OWNER NAME : Varghese, Varkey Email: varkey.kv@in.ibm.com
-// *! BACKUP NAME : Swaminathan, Janani Email: jaswamin@in.ibm.com
+// *! BACKUP NAME : Swaminathan, Janani Email: jaswamin@in.ibm.com
// *!
// *!***************************************************************************
// CHANGE HISTORY:
//------------------------------------------------------------------------------
// Version:|Author: | Date: | Comment:
// --------|--------|---------|--------------------------------------------------
-// 1.0 |varkeykv|21-Jan-13|Initial check in
+// 1.0 |varkeykv|21-Jan-13|Initial check in
//------------------------------------------------------------------------------
#include <fapi.H>
@@ -75,19 +75,19 @@ ReturnCode io_read_erepair(const Target& target,std::vector<uint8_t> &rx_lanes)
rc.setEcmdError(rc_ecmd);
return(rc);
}
-
- // Check which type of bus this is and do setup needed
+
+ // Check which type of bus this is and do setup needed
fapi::TargetType l_type = target.getType();
switch (l_type)
{
case fapi::TARGET_TYPE_ABUS_ENDPOINT:
start_group=0;
end_group=0;
- interface=CP_FABRIC_A0; // base scom for A bus , assume translation to A1 by PLAT
+ interface=CP_FABRIC_A0; // base scom for A bus , assume translation to A1 by PLAT
break;
case fapi::TARGET_TYPE_XBUS_ENDPOINT:
start_group=0;
- end_group=3;
+ end_group=0;
interface=CP_FABRIC_X0; // base scom for X bus
break;
case fapi::TARGET_TYPE_MCS_CHIPLET:
@@ -102,14 +102,14 @@ ReturnCode io_read_erepair(const Target& target,std::vector<uint8_t> &rx_lanes)
break;
default:
FAPI_ERR("Invalid io_read_erepair HWP invocation");
- FAPI_SET_HWP_ERROR(rc, IO_READ_EREPAIR_INVALID_INVOCATION_RC);
+ FAPI_SET_HWP_ERROR(rc,IO_READ_EREPAIR_INVALID_INVOCATION_RC);
break;
}
if (rc)
{
return(rc);
}
-
+
FAPI_INF("Reading erepair data \n");
for(uint8_t clock_group=start_group;clock_group<=end_group;++clock_group)
@@ -138,16 +138,16 @@ ReturnCode io_read_erepair(const Target& target,std::vector<uint8_t> &rx_lanes)
}
}
- //Collect the RX bad lanes
+ //Collect the RX bad lanes
rc_ecmd|=data_one.flushTo0();
-
+
if(rc_ecmd)
{
FAPI_ERR("io_read_erepair hit an error while flushing data");
rc.setEcmdError(rc_ecmd);
return(rc);
}
-
+
rc = GCR_read( target, interface, rx_bad_lane_enc_gcrmsg_pg, clock_group, 0, data_one);
if(rc)
{
@@ -155,7 +155,7 @@ ReturnCode io_read_erepair(const Target& target,std::vector<uint8_t> &rx_lanes)
return(rc);
}
- // RX lane records
+ // RX lane records
// Set the RX bad lanes in the RX vector
uint8_t status=0;
@@ -176,7 +176,7 @@ ReturnCode io_read_erepair(const Target& target,std::vector<uint8_t> &rx_lanes)
data_one.extract(&lane,7,7);
lane=lane>>1;
FAPI_DBG("Second bad lane is %d",lane);
- rx_lanes.push_back(lane); // 16 to 31 bad lanes
+ rx_lanes.push_back(lane); // 16 to 31 bad lanes
}
}
else{
diff --git a/src/usr/hwpf/hwp/bus_training/io_restore_erepair.C b/src/usr/hwpf/hwp/bus_training/io_restore_erepair.C
index ca92249cb..6de3828ae 100644
--- a/src/usr/hwpf/hwp/bus_training/io_restore_erepair.C
+++ b/src/usr/hwpf/hwp/bus_training/io_restore_erepair.C
@@ -20,26 +20,26 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: io_restore_erepair.C,v 1.17 2014/03/05 12:01:03 varkeykv Exp $
+// $Id: io_restore_erepair.C,v 1.19 2014/04/18 21:25:49 steffen Exp $
// *!***************************************************************************
// *! (C) Copyright International Business Machines Corp. 1997, 1998
// *! All Rights Reserved -- Property of IBM
// *! *** IBM Confidential ***
// *!***************************************************************************
// *! FILENAME : io_restore_erepair.C
-// *! TITLE :
-// *! DESCRIPTION : Restore e-repair data
-// *! CONTEXT :
+// *! TITLE :
+// *! DESCRIPTION : Restore e-repair data
+// *! CONTEXT :
// *!
// *! OWNER NAME : Varghese, Varkey Email: varkey.kv@in.ibm.com
-// *! BACKUP NAME : Swaminathan, Janani Email: jaswamin@in.ibm.com
+// *! BACKUP NAME : Swaminathan, Janani Email: jaswamin@in.ibm.com
// *!
// *!***************************************************************************
// CHANGE HISTORY:
//------------------------------------------------------------------------------
// Version:|Author: | Date: | Comment:
// --------|--------|--------|--------------------------------------------------
-// 1.0 |varkeykv|09/27/11|Initial check in . Have to modify targets once bus target is defined and available.Not tested in any way other than in unit SIM IOTK
+// 1.0 |varkeykv|09/27/11|Initial check in . Have to modify targets once bus target is defined and available.Not tested in any way other than in unit SIM IOTK
//------------------------------------------------------------------------------
@@ -58,7 +58,7 @@ using namespace fapi;
//! Read repair values from VPD into the HW
/*
This function will perform erepair for one IO type target -- eithe MCS or XBUS or ABUS
- * In Cronus the tx_lanes and rx_lanes vectors should be passed empty so we will use the accessor provided data instead
+ * In Cronus the tx_lanes and rx_lanes vectors should be passed empty so we will use the accessor provided data instead
* This is due to a MFG FW requirement that needed to pass in bad lanes as args instead of via VPD
* Note that power down of lanes is done by a seperate HWP called io_power_down_lanes
* Its up to the caller to call that separately to power down a lane
@@ -77,19 +77,19 @@ ReturnCode io_restore_erepair(const Target& target,std::vector<uint8_t> &tx_lane
uint32_t rc_ecmd=0;
uint8_t start_group=0;
uint8_t end_group=0;
-
+
rc_ecmd=mask.flushTo1();
if(rc_ecmd)
{
rc.setEcmdError(rc_ecmd);
return(rc);
}
-
- // Check which type of bus this is and do setup needed
+
+ // Check which type of bus this is and do setup needed
if(target.getType() == fapi::TARGET_TYPE_ABUS_ENDPOINT) {
start_group=0;
end_group=0;
- interface=CP_FABRIC_A0; // base scom for A bus , assume translation to A1 by PLAT
+ interface=CP_FABRIC_A0; // base scom for A bus , assume translation to A1 by PLAT
}
else if(target.getType() == fapi::TARGET_TYPE_XBUS_ENDPOINT ) {
start_group=0;
@@ -117,42 +117,42 @@ ReturnCode io_restore_erepair(const Target& target,std::vector<uint8_t> &tx_lane
// And we still need to run this in Cronus
// Since the hack was not made in the accessor to detect this,
// Provision was made to detect if arguments passed in are empty.
- // If so then the accessor is called to determine from VPD data directly .
-
- // This is specially for Cronus/Lab
+ // If so then the accessor is called to determine from VPD data directly .
+
+ // This is specially for Cronus/Lab
if(tx_lanes.size()==0 && rx_lanes.size()==0){
- // rc=erepairGetFailedLanes(target,tx_lanes,rx_lanes);
+ // rc=erepairGetFailedLanes(target,tx_lanes,rx_lanes);
//FAPI_EXEC_HWP(rc,erepairGetFailedLanesHwp,target,tx_lanes,rx_lanes);
if(!rc.ok()){
FAPI_ERR("Accessor HWP has returned a fail");
return rc;
}
}
-
+
FAPI_INF("Restoring erepair data \n");
for(uint8_t clock_group=start_group;clock_group<=end_group;++clock_group){
rc_ecmd|=data_one.flushTo0();
rc_ecmd|=data_two.flushTo0();
-
+
if(rc_ecmd)
{
rc.setEcmdError(rc_ecmd);
return(rc);
}
-
+
// Read in original data
-
- // Read in values for RMW
+
+ // Read in values for RMW
rc = GCR_read( target,interface,rx_lane_bad_vec_0_15_pg, clock_group, 0, data_one);
if(rc){return rc;}
rc = GCR_read( target,interface,rx_lane_bad_vec_16_31_pg, clock_group, 0, data_two);
if(rc){return rc;}
-
- // RX lane records
- // Set the RX bad lanes in the buffer
+
+ // RX lane records
+ // Set the RX bad lanes in the buffer
for(uint8_t i=0;i<rx_lanes.size();++i){
-
+
if(interface==CP_FABRIC_X0){
if(clock_group==0 && rx_lanes[i]<20){
lane=rx_lanes[i];
OpenPOWER on IntegriCloud