summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBilicon Patil <bilpatil@in.ibm.com>2012-09-25 05:02:16 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-10-24 11:24:47 -0500
commit151af22184f03b1393ec5f4ca390272d06cf1e2f (patch)
tree11b9eeba4d37023e9862ac94ef4399b8bfca4715 /src
parent44282a5242ed8f268680cc7fc2c365df79fdd900 (diff)
downloadtalos-hostboot-151af22184f03b1393ec5f4ca390272d06cf1e2f.tar.gz
talos-hostboot-151af22184f03b1393ec5f4ca390272d06cf1e2f.zip
FW team Accessor HWP for erepair
Change-Id: If1cf10820ae7fc678152641ce9c958f68b003891 RTC: 22646 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1867 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/hwpf/hwp/erepairConsts.H114
-rw-r--r--src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.H70
-rw-r--r--src/usr/hwpf/hwp/erepairGetFailedLanesHwp.C436
-rw-r--r--src/usr/hwpf/hwp/erepair_errors.xml39
-rw-r--r--src/usr/hwpf/hwp/makefile3
-rw-r--r--src/usr/hwpf/makefile3
6 files changed, 663 insertions, 2 deletions
diff --git a/src/include/usr/hwpf/hwp/erepairConsts.H b/src/include/usr/hwpf/hwp/erepairConsts.H
new file mode 100644
index 000000000..b67e27d39
--- /dev/null
+++ b/src/include/usr/hwpf/hwp/erepairConsts.H
@@ -0,0 +1,114 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hwpf/hwp/erepairConsts.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 otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+
+/**
+ * @file eRepairConsts.H
+ *
+ * @brief eRepair Constants
+ */
+
+/*
+ * Change Log ******************************************************************
+ * Flag Defect/Feature User Date Description
+ * ------ -------------- ---------- ----------- ----------------------------
+ * bilicon 09/14/2012 Created.
+ */
+
+#ifndef EREPAIRCONSTS_H_
+#define EREPAIRCONSTS_H_
+
+
+/******************************************************************************
+ * Erepair constants
+ *****************************************************************************/
+
+namespace EREPAIR
+{
+
+const uint8_t INVALID_FAIL_LANE_NUMBER = 0xFF;
+
+enum busType
+{
+ EREPAIR_UNKNOWN_BUS_TYPE = 0,
+ PROCESSOR_EI4 = 1,
+ PROCESSOR_EDI = 2,
+ MEMORY_EDI = 3
+};
+
+enum interfaceType
+{
+ EREPAIR_UNKNOWN_INT_TYPE = 0,
+ PBUS_DRIVER = 1, // X-Bus, A-Bus transmit
+ PBUS_RECEIVER = 2, // X-Bus, A-Bus receive
+ DMI_MCS_RECEIVE = 3, // MCS receive
+ DMI_MCS_DRIVE = 4, // MCS transmit
+ DMI_MEMBUF_RECEIVE = 5, // Centaur receive
+ DMI_MEMBUF_DRIVE = 6 // Centaur transmit
+};
+
+}// end of EREPAIR namespace
+
+/******************************************************************************
+ * VPD Structures.
+ *****************************************************************************/
+
+// Device info structure of the P8 Processor
+struct eRepairProcDevInfo
+{
+ uint8_t processor_id;// Range:0x00-0xFF. Value:Processor MRU IDs
+ uint8_t fabricBus; // Range:0x00-0xFF. Value:FabricBus(ATTR_CHIP_UNIT_POS)
+};
+
+// eRepair structure for failing lanes on Power Bus
+struct eRepairPowerBus
+{
+ eRepairProcDevInfo device; // Device info of P8
+ uint8_t type :4; // Range:0x0-0xF. Value:PROCESSOR_EI4,
+ // PROCESSOR_EDI
+ uint8_t interface :4; // Range:0x0-0xF. Value:PBUS_DRIVER,
+ // PBUS_RECEIVER
+ uint8_t failBit; // Range:0x00-0xFF. Value:Failing lane number
+};
+
+
+// Device info structure of the endpoints of the Memory Channel
+struct eRepairMemDevInfo
+{
+ uint8_t proc_Centaur_id;// Range:0x00-0xFF.Value:Processor or Centaur MRU ID
+ uint8_t memChannel; // Range:0x00-0xFF.Value:MemoryBus(ATTR_CHIP_UNIT_POS)
+};
+
+// eRepair structure of failing lanes on Memory Channel
+struct eRepairMemBus
+{
+ eRepairMemDevInfo device; // Device info of P8 and Centaur
+ uint8_t type :4;// Range:0x0-0xF. Value:MEMORY_EDI
+ uint8_t interface :4;// Range:0x0-0xF. Value:UpIn, UpOut,
+ // DownIn, DownOut
+ uint8_t failBit; // Range:0x00-0xFF.
+ // Value:Failing lane number:0-13 OR 0-19
+ // depends on DownStream or UpStream
+};
+
+#endif
diff --git a/src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.H b/src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.H
new file mode 100644
index 000000000..5c0231bab
--- /dev/null
+++ b/src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.H
@@ -0,0 +1,70 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hwpf/hwp/erepairFailLaneGetHwp.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 otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+/**
+ * @file erepairGetFailedLanesHwp.H
+ *
+ * @brief FW Team HWP that accesses the fail lanes of Fabric and Memory buses.
+ */
+
+/*
+ * Change Log ******************************************************************
+ * Flag Defect/Feature User Date Description
+ * ------ -------------- ---------- ----------- ----------------------------
+ * bilicon 09/14/2012 Created.
+ */
+
+#ifndef EREPAIRGETFAILEDLANESHWP_H_
+#define EREPAIRGETFAILEDLANESHWP_H_
+
+#include <fapi.H>
+#include <erepairConsts.H>
+
+extern "C"
+{
+
+/**
+ * @brief FW Team HWP that retrieves the eRepair fail lanes.
+ * It retrieves the eRepair data from the P8 MVPD and the Centaur FRU
+ * VPD. It then parses the eRepair data to determine the fail lane
+ * numbers on the sub-interfaces (Tx and Rx) of the passed bus target.
+ * Only Field eRepair data reading is currently supported.
+ * Manufacturing eRepair data reading is not supported yet.
+ *
+ * @param[in] i_tgtHandle Reference to X-Bus or A-Bus or MCS or Target
+ * @param[o] o_txFailLanes Reference to a vector that will hold eRepair fail
+ * lane numbers of the Tx sub-interface.
+ * @param[o] o_rxFailLanes Reference to a vector that will hold eRepair fail
+ * lane numbers of the Rx sub-interface.
+ *
+ * @return ReturnCode
+ *
+ * TODO: i_tgtHandle There will be future support for Centaur Target.
+ * RTC Task 51234. Depends on RTC Story 44009
+ */
+fapi::ReturnCode erepairGetFailedLanesHwp(const fapi::Target &i_tgtHandle,
+ std::vector<uint8_t> &o_txFailLanes,
+ std::vector<uint8_t> &o_rxFailLanes);
+
+}// end of extern C
+
+#endif
diff --git a/src/usr/hwpf/hwp/erepairGetFailedLanesHwp.C b/src/usr/hwpf/hwp/erepairGetFailedLanesHwp.C
new file mode 100644
index 000000000..8132064c9
--- /dev/null
+++ b/src/usr/hwpf/hwp/erepairGetFailedLanesHwp.C
@@ -0,0 +1,436 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwpf/hwp/erepairFailLaneGetHwp.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 otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+/**
+ * @file erepairGetFailedLanesHwp.C
+ *
+ * @brief FW Team HWP that accesses the fail lanes of Fabric and Memory buses.
+ */
+
+/*
+ * Change Log ******************************************************************
+ * Flag Defect/Feature User Date Description
+ * ------ -------------- ---------- ----------- ----------------------------
+ * bilicon 09/14/2012 Created.
+ */
+
+#include <erepairGetFailedLanesHwp.H>
+
+extern "C"
+{
+
+/******************************************************************************
+ * Forward Declarations
+ *****************************************************************************/
+
+/**
+ * @brief Function called by the FW Team HWP that reads the data from VPD.
+ * This function makes the actual calls to read the PNOR MVPD or the
+ * SEEPROM VPD.
+ * It determines the size of the buffer to be read, allocates memory
+ * of the determined size, calls fapiGetMvpdField to read the eRepair
+ * records. This buffer is further passed to another routine for
+ * parsing.
+ *
+ * @param[in] i_tgtHandle Reference to X-Bus or A-Bus or MCS target
+ * @param[in] i_procTgt Reference to the Processor target associated with
+ * passed i_tgtHandle
+ * @param[in] i_recordType This is the VPD record type that is used to query
+ * the VPD data
+ * @param[o] o_txFailLanes Reference to a vector that will hold eRepair fail
+ * lane numbers of the Tx sub-interface.
+ * @param[o] o_rxFailLanes Reference to a vector that will hold eRepair fail
+ * lane numbers of the Rx sub-interface.
+ *
+ * @return ReturnCode
+ */
+fapi::ReturnCode retrieveRepairData(const fapi::Target &i_tgtHandle,
+ const fapi::Target &i_procTgt,
+ fapi::MvpdRecord i_recordType,
+ std::vector<uint8_t> &o_txFailLanes,
+ std::vector<uint8_t> &o_rxFailLanes);
+
+/**
+ * @brief Function called by the FW Team HWP that parses the data read from VPD
+ * This function matches each eRepair record read from the VPD and
+ * matches it against the attributes of the passed target.
+ * If a match is found, the corresponding eRepair record is copied into
+ * the respective failLane vectors to be returned to the caller.
+ *
+ * @param[in] i_tgtHandle Reference to X-Bus or A-Bus or MCS target
+ * @param[in] i_buf This is the buffer that has the eRepair records
+ * read from the VPD
+ * @param[in] i_bufSz This is the size of passed buffer in terms of bytes
+ * @param[o] o_txFailLanes Reference to a vector that will hold eRepair fail
+ * lane numbers of the Tx sub-interface.
+ * @param[o] o_rxFailLanes Reference to a vector that will hold eRepair fail
+ * lane numbers of the Rx sub-interface.
+ *
+ * @return ReturnCode
+ */
+fapi::ReturnCode determineRepairLanes(const fapi::Target &i_tgtHandle,
+ uint8_t *i_buf,
+ uint32_t i_bufSz,
+ std::vector<uint8_t> &o_txFailLanes,
+ std::vector<uint8_t> &o_rxFailLanes);
+
+
+/******************************************************************************
+ * Accessor HWP
+ *****************************************************************************/
+
+fapi::ReturnCode erepairGetFailedLanesHwp(const fapi::Target &i_tgtHandle,
+ std::vector<uint8_t> &o_txFailLanes,
+ std::vector<uint8_t> &o_rxFailLanes)
+{
+ fapi::ReturnCode l_rc;
+ fapi::Target l_processorTgt;
+ fapi::MvpdRecord l_fieldRecord;
+// fapi::MvpdRecord l_mfgRecord; // not supported yet
+ fapi::TargetType l_tgtType = fapi::TARGET_TYPE_NONE;
+ std::vector<fapi::Target> l_mcsChiplets;
+// bool l_mfgRepairSupported = false; // not supported yet
+
+ FAPI_INF(">> erepairGetFailedLanesHwp");
+
+ do
+ {
+ o_txFailLanes.clear();
+ o_rxFailLanes.clear();
+
+ // Determine the type of target
+ l_tgtType = i_tgtHandle.getType();
+
+ // Verify if the correct target type is passed
+ // TODO: l_tgtType of fapi::TARGET_TYPE_MEMBUF_CHIP will be supported
+ // when HWSV will provide the device driver to read the
+ // Centaur FRU VPD. RTC Task 51234, Depends on Story 44009
+ if((l_tgtType != fapi::TARGET_TYPE_MCS_CHIPLET) &&
+ (l_tgtType != fapi::TARGET_TYPE_XBUS_ENDPOINT) &&
+ (l_tgtType != fapi::TARGET_TYPE_ABUS_ENDPOINT))
+ {
+ FAPI_ERR("erepairGetFailedLanesHwp: Invalid Target type %d",
+ l_tgtType);
+ FAPI_SET_HWP_ERROR(l_rc, RC_ACCESSOR_HWP_INVALID_TARGET_TYPE);
+ break;
+ }
+
+ // Determine the Processor target
+ l_rc = fapiGetParentChip(i_tgtHandle, l_processorTgt);
+ if(l_rc)
+ {
+ FAPI_ERR("Error (0x%x) from fapiGetParentChip",
+ static_cast<uint32_t>(l_rc));
+ break;
+ }
+
+ // Retrieve the Field eRepair lane numbers from the VPD
+ l_fieldRecord = fapi::MVPD_RECORD_VWML;
+ l_rc = retrieveRepairData(i_tgtHandle,
+ l_processorTgt,
+ l_fieldRecord,
+ o_txFailLanes,
+ o_rxFailLanes);
+
+ if(l_rc)
+ {
+ FAPI_ERR("Error (0x%x) during retrieval of Field records",
+ static_cast<uint32_t>(l_rc));
+ break;
+ }
+
+// TODO: Uncomment this when there is plan to support Manufacturing eRepair.i
+// RTC Task 51051
+/*
+ if(l_mfgRepairSupported)
+ {
+ l_mfgRecord = MVPD_RECORD_MER0;
+
+ // Retrieve the Manufacturing eRepair lane numbers from the VPD
+ l_rc = retrieveRepairData(i_tgtHandle,
+ l_processorTgt,
+ l_mfgRecord,
+ o_txFailLanes,
+ o_rxFailLanes);
+
+ if(l_rc)
+ {
+ FAPI_ERR("Error (0x%x) during retrieval of Mfg records",
+ static_cast<uint32_t>(l_rc);
+ break;
+ }
+ }
+*/
+ }while(0);
+
+ FAPI_INF("<< erepairGetFailedLanesHwp");
+
+ return l_rc;
+}
+
+
+fapi::ReturnCode retrieveRepairData(const fapi::Target &i_tgtHandle,
+ const fapi::Target &i_procTgt,
+ fapi::MvpdRecord i_recordType,
+ std::vector<uint8_t> &o_txFailLanes,
+ std::vector<uint8_t> &o_rxFailLanes)
+{
+ uint8_t *l_retBuf = NULL;
+ uint32_t l_bufSize = 0;
+ fapi::ReturnCode l_rc;
+
+ FAPI_INF(">> retrieveRepairData");
+
+ do
+ {
+ // Determine the size of the eRepair data in the VPD
+ l_rc = fapiGetMvpdField(i_recordType,
+ fapi::MVPD_KEYWORD_PDI,
+ i_procTgt,
+ NULL,
+ l_bufSize);
+
+ if(l_rc)
+ {
+ FAPI_ERR("Error (0x%x) from fapiGetMvpdField",
+ static_cast<uint32_t> (l_rc));
+ break;
+ }
+
+ if(l_bufSize != 0)
+ {
+ // Allocate memory for buffer
+ l_retBuf = new uint8_t[l_bufSize];
+ if(l_retBuf == NULL)
+ {
+ FAPI_ERR("Failed to allocate memory size of %d",
+ l_bufSize);
+ FAPI_SET_HWP_ERROR(l_rc, RC_ACCESSOR_HWP_MEMORY_ALLOC_FAIL);
+ break;
+ }
+
+ // Retrieve the Field eRepair data from the PNOR
+ l_rc = fapiGetMvpdField(i_recordType,
+ fapi::MVPD_KEYWORD_PDI,
+ i_procTgt,
+ l_retBuf,
+ l_bufSize);
+
+ if(l_rc)
+ {
+ FAPI_ERR("Error (0x%x) from fapiGetMvpdField",
+ static_cast<uint32_t> (l_rc));
+ break;
+ }
+
+ // Parse the buffer to determine eRepair lanes and copy the
+ // fail lane numbers to the return vector
+ l_rc = determineRepairLanes(i_tgtHandle,
+ l_retBuf,
+ l_bufSize,
+ o_txFailLanes,
+ o_rxFailLanes);
+ if(l_rc)
+ {
+ FAPI_ERR("determineRepairLanes failed");
+ break;
+ }
+ }
+ }while(0);
+
+ // Delete the buffer which has Field eRepair data
+ delete[] l_retBuf;
+
+ FAPI_INF("<< retrieveRepairData");
+
+ return (l_rc);
+}
+
+fapi::ReturnCode determineRepairLanes(const fapi::Target &i_tgtHandle,
+ uint8_t *i_buf,
+ uint32_t i_bufSz,
+ std::vector<uint8_t> &o_txFailLanes,
+ std::vector<uint8_t> &o_rxFailLanes)
+{
+ uint32_t l_vpdHeader = 0;
+ uint32_t l_numRepairs = 0;
+ uint8_t *l_vpdPtr = NULL;
+ uint32_t l_loop = 0;
+ uint32_t l_bytesParsed = 0;
+ const uint32_t l_numRepairsMask = 0x000000FF;
+ fapi::TargetType l_tgtType = fapi::TARGET_TYPE_NONE;
+ fapi::ReturnCode l_rc;
+ fapi::ATTR_CHIP_UNIT_POS_Type l_busNum;
+
+ FAPI_INF(">> determineRepairLanes");
+
+ do
+ {
+ // Read the header and count information
+
+ l_vpdPtr = i_buf; // point to the start of header data
+ memcpy(&l_vpdHeader, l_vpdPtr, sizeof(l_vpdHeader));
+
+ l_numRepairs = (l_vpdHeader & l_numRepairsMask);
+
+ l_bytesParsed = sizeof(l_vpdHeader); // we've read the header data
+ l_vpdPtr += sizeof(l_vpdHeader); // point to the start of repair data
+
+ l_tgtType = i_tgtHandle.getType();
+
+ // Parse for Power bus data
+ if((l_tgtType == fapi::TARGET_TYPE_XBUS_ENDPOINT) ||
+ (l_tgtType == fapi::TARGET_TYPE_ABUS_ENDPOINT))
+ {
+ eRepairPowerBus l_fabricBus;
+
+ // Read Power bus eRepair data and get the failed lane numbers
+ for(l_loop = 0; l_loop < l_numRepairs; l_loop++)
+ {
+ // Make sure we are not parsing more data than the passed size
+ l_bytesParsed += sizeof(eRepairPowerBus);
+ if(l_bytesParsed > i_bufSz)
+ {
+ break;
+ }
+
+ memcpy(&l_fabricBus, l_vpdPtr, sizeof(eRepairPowerBus));
+
+ // Check if we have the correct Processor ID
+ // Get the MRU ID of the passed processor target and
+ // match with l_fabricBus.device.processor_id.
+ // Note: This is currently not required.
+
+ // Check if we have the matching the Fabric Bus types
+ if((l_fabricBus.type != EREPAIR::PROCESSOR_EI4) &&
+ (l_fabricBus.type != EREPAIR::PROCESSOR_EDI))
+ {
+ continue;
+ }
+
+ // Check if we have the matching fabric bus interface
+ l_rc = FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS,&i_tgtHandle,l_busNum);
+ if(l_rc)
+ {
+ FAPI_ERR("Error (0x%x), from FAPI_ATTR_GET",
+ static_cast<uint32_t>(l_rc));
+ break;
+ }
+
+ if(l_fabricBus.device.fabricBus != l_busNum)
+ {
+ continue;
+ }
+
+ // Check if we have valid fail lane numbers
+ if(l_fabricBus.failBit == EREPAIR::INVALID_FAIL_LANE_NUMBER)
+ {
+ continue;
+ }
+
+ // Copy the fail lane numbers in the vectors
+ if(l_fabricBus.interface == EREPAIR::PBUS_DRIVER)
+ {
+ o_txFailLanes.push_back(l_fabricBus.failBit);
+ }
+ else if(l_fabricBus.interface == EREPAIR::PBUS_RECEIVER)
+ {
+ o_rxFailLanes.push_back(l_fabricBus.failBit);
+ }
+
+ // Increment pointer to point to the next fabric repair data
+ l_vpdPtr += sizeof(eRepairPowerBus);
+
+ } // end of for loop
+ } // end of if(l_tgtType is XBus or ABus)
+ else if(l_tgtType == fapi::TARGET_TYPE_MCS_CHIPLET)
+ {
+ // Parse for Memory bus data
+ eRepairMemBus l_memBus;
+
+ // Read Power bus eRepair data and get the failed lane numbers
+ for(l_loop = 0; l_loop < l_numRepairs; l_loop++)
+ {
+ // Make sure we are not parsing more data than the passed size
+ l_bytesParsed += sizeof(eRepairMemBus);
+ if(l_bytesParsed > i_bufSz)
+ {
+ break;
+ }
+
+ memcpy(&l_memBus, l_vpdPtr, sizeof(eRepairMemBus));
+
+ // Check if we have the correct Processor ID
+ // Get the MRU ID of the passed processor target and
+ // match with l_memBus.device.processor_id
+ // Note: This is currently not required.
+
+ // Check if we have the matching the Memory Bus types
+ if(l_memBus.type != EREPAIR::MEMORY_EDI)
+ {
+ continue;
+ }
+
+ // Check if we have the matching memory bus interface
+ l_rc = FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS,&i_tgtHandle,l_busNum);
+ if(l_rc)
+ {
+ FAPI_ERR("Error (0x%x), from ATTR_CHIP_UNIT_POS",
+ static_cast<uint32_t>(l_rc));
+ break;
+ }
+
+ if(l_memBus.device.memChannel != l_busNum)
+ {
+ continue;
+ }
+
+ // Check if we have valid fail lane numbers
+ if(l_memBus.failBit == EREPAIR::INVALID_FAIL_LANE_NUMBER)
+ {
+ continue;
+ }
+
+ // Copy the fail lane numbers in the vectors
+ if(l_memBus.interface == EREPAIR::DMI_MCS_DRIVE)
+ {
+ o_txFailLanes.push_back(l_memBus.failBit);
+ }
+ else if(l_memBus.interface == EREPAIR::DMI_MCS_RECEIVE)
+ {
+ o_rxFailLanes.push_back(l_memBus.failBit);
+ }
+
+ // Increment pointer to point to the next dmi repair data
+ l_vpdPtr += sizeof(eRepairMemBus);
+
+ } // end of for loop
+ } // end of if(l_tgtType is MCS)
+
+ }while(0);
+
+ FAPI_INF("<< determineRepairLanes");
+
+ return(l_rc);
+}
+
+}// endof extern "C"
diff --git a/src/usr/hwpf/hwp/erepair_errors.xml b/src/usr/hwpf/hwp/erepair_errors.xml
new file mode 100644
index 000000000..c6e1c38dc
--- /dev/null
+++ b/src/usr/hwpf/hwp/erepair_errors.xml
@@ -0,0 +1,39 @@
+<!-- IBM_PROLOG_BEGIN_TAG -->
+<!-- This is an automatically generated prolog. -->
+<!-- -->
+<!-- $Source: src/usr/hwpf/hwp/erepair_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 otherwise -->
+<!-- divested of its trade secrets, irrespective of what has been -->
+<!-- deposited with the U.S. Copyright Office. -->
+<!-- -->
+<!-- Origin: 30 -->
+<!-- -->
+<!-- IBM_PROLOG_END_TAG -->
+<hwpErrors>
+ <!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_ACCESSOR_HWP_INVALID_TARGET_TYPE</rc>
+ <description>
+ Invalid input parameter: Valid target types are - XBUS, ABUS, MCS
+ </description>
+ </hwpError>
+ <!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_ACCESSOR_HWP_MEMORY_ALLOC_FAIL</rc>
+ <description>
+ Failed to allocate run time memory from the heap
+ </description>
+ </hwpError>
+ <!-- *********************************************************************** -->
+</hwpErrors>
diff --git a/src/usr/hwpf/hwp/makefile b/src/usr/hwpf/hwp/makefile
index 760a09ccf..5a266d954 100644
--- a/src/usr/hwpf/hwp/makefile
+++ b/src/usr/hwpf/hwp/makefile
@@ -41,7 +41,8 @@ OBJS = fapiTestHwp.o \
fapiHwpExecInitFile.o \
dimmBadDqBitmapFuncs.o \
dimmBadDqBitmapAccessHwp.o \
- RepairRingFunc.o
+ RepairRingFunc.o \
+ erepairGetFailedLanesHwp.o
SUBDIRS = dmi_training.d sbe_centaur_init.d mc_config.d \
dram_training.d activate_powerbus.d build_winkle_images.d \
diff --git a/src/usr/hwpf/makefile b/src/usr/hwpf/makefile
index 5a2671e0a..fdfd65b52 100644
--- a/src/usr/hwpf/makefile
+++ b/src/usr/hwpf/makefile
@@ -49,7 +49,8 @@ HWP_ERROR_XML_FILES = hwp/fapiHwpErrorInfo.xml \
hwp/core_activate/proc_stop_deadman_timer/proc_stop_deadman_timer_errors.xml \
hwp/activate_powerbus/proc_build_smp/proc_build_smp_errors.xml \
hwp/activate_powerbus/proc_build_smp/proc_adu_utils_errors.xml \
- hwp/thread_activate/proc_thread_control/proc_thread_control.xml
+ hwp/thread_activate/proc_thread_control/proc_thread_control.xml \
+ hwp/erepair_errors.xml
## these get generated into obj/genfiles/AttributeIds.H
OpenPOWER on IntegriCloud