summaryrefslogtreecommitdiffstats
path: root/src/include/usr/hwpf/hwp
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/usr/hwpf/hwp')
-rw-r--r--src/include/usr/hwpf/hwp/erepairAccessorHwpFuncs.H105
-rw-r--r--src/include/usr/hwpf/hwp/erepairConsts.H11
-rw-r--r--src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.H14
-rw-r--r--src/include/usr/hwpf/hwp/erepairGetMnfgFailedLanesHwp.H16
-rwxr-xr-xsrc/include/usr/hwpf/hwp/erepairSetFailedLanesHwp.H74
-rwxr-xr-xsrc/include/usr/hwpf/hwp/erepairSetMnfgFailedLanesHwp.H77
6 files changed, 229 insertions, 68 deletions
diff --git a/src/include/usr/hwpf/hwp/erepairAccessorHwpFuncs.H b/src/include/usr/hwpf/hwp/erepairAccessorHwpFuncs.H
index 20dc8ebbc..1e11b9b6a 100644
--- a/src/include/usr/hwpf/hwp/erepairAccessorHwpFuncs.H
+++ b/src/include/usr/hwpf/hwp/erepairAccessorHwpFuncs.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012 */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
/* */
/* p1 */
/* */
@@ -61,16 +61,16 @@ typedef fapi::ReturnCode (*setLanes_t)(
/**
* @brief FW Team Utility function that gets eRepair data from the VPD
- *
- * @param[in] i_endp_target Reference to X-Bus or A-Bus or MCS Target
- * @param[out] o_txFailLanes Reference to a Vector that will contain the fail
- * lanes read from the VPD for Drive side
- * @param[out] o_rxFailLanes Reference to a Vector that will contain the fail
- * lanes read from the VPD for Receive side
+ * This function gets the eRepair data from both the Field VPD
+ * and the Manufacturing VPD.
+ *
+ * @param[in] i_endp_target Reference to X-Bus or A-Bus or MCS or memBuf Target
+ * @param[out] o_txFailLanes Reference to a Vector that will contain the fail
+ * lanes read from the VPD for Drive side
+ * @param[out] o_rxFailLanes Reference to a Vector that will contain the fail
+ * lanes read from the VPD for Receive side
* @return ReturnCode
*
- * TODO: i_endp_target There will be future support for Centaur Target.
- * RTC Task 51234. Depends on RTC Story 44009
*/
fapi::ReturnCode erepairGetFailedLanes(const fapi::Target &i_endp_target,
std::vector<uint8_t> &o_txFailLanes,
@@ -82,15 +82,13 @@ fapi::ReturnCode erepairGetFailedLanes(const fapi::Target &i_endp_target,
* This is a wrapper function for the Accessor HWP which reads failed lane
* numbers from the Field VPD
*
- * @param[in] i_endp_target Reference to X-Bus or A-Bus or MCS Target
- * @param[out] o_txFailLanes Reference to a Vector that will contain the fail
- * lanes read from the Field VPD for Drive side
- * @param[out] o_rxFailLanes Reference to a Vector that will contain the fail
- * lanes read from the Field VPD for Receive side
+ * @param[in] i_endp_target Reference to X-Bus or A-Bus or MCS or memBuf Target
+ * @param[out] o_txFailLanes Reference to a Vector that will contain the fail
+ * lanes read from the Field VPD for Drive side
+ * @param[out] o_rxFailLanes Reference to a Vector that will contain the fail
+ * lanes read from the Field VPD for Receive side
* @return ReturnCode
*
- * TODO: i_endp_target There will be future support for Centaur Target.
- * RTC Task 51234. Depends on RTC Story 44009
*/
fapi::ReturnCode erepairGetFieldFailedLanes(const fapi::Target &i_endp_target,
std::vector<uint8_t> &o_txFailLanes,
@@ -102,47 +100,56 @@ fapi::ReturnCode erepairGetFieldFailedLanes(const fapi::Target &i_endp_target,
* This is a wrapper function for the Accessor HWP which reads failed lane
* numbers from the Manufacturing VPD
*
- * @param[in] i_endp_target Reference to X-Bus or A-Bus or MCS Target
- * @param[out] o_txFailLanes Reference to a Vector that will contain the fail
- * lanes read from the Mnfg VPD for Drive side
- * @param[out] o_rxFailLanes Reference to a Vector that will contain the fail
- * lanes read from the Mnfg VPD for Receive side
+ * @param[in] i_endp_target Reference to X-Bus or A-Bus or MCS or memBuf Target
+ * @param[out] o_txFailLanes Reference to a Vector that will contain the fail
+ * lanes read from the Mnfg VPD for Drive side
+ * @param[out] o_rxFailLanes Reference to a Vector that will contain the fail
+ * lanes read from the Mnfg VPD for Receive side
* @return ReturnCode
*
- * TODO: i_endp_target There will be future support for Centaur Target.
- * RTC Task 51234. Depends on RTC Story 44009
*/
fapi::ReturnCode erepairGetMnfgFailedLanes(const fapi::Target &i_endp_target,
std::vector<uint8_t> &o_txFailLanes,
std::vector<uint8_t> &o_rxFailLanes);
/**
- * @brief FW Team Utility function that sets eRepair data in the VPD
- *
- * @param[in] i_endp_target Reference to X-Bus or A-Bus or MCS Target
- * @param[in] i_txFailLanes Vector that will contain the fail lane
- * to be written to VPD for Drive side
- * @param[in] i_rxFailLanes Vector that will contain the fail lanes
- * to be written to VPD for Receive side
+ * @brief FW Team Utility function that sets eRepair data in the VPD.
+ * This functions sets the eRepair data to either the Field VPD
+ * or the Manufacturing VPD depending on whether the IPL was done
+ * in normal mode or Manufacturing mode.
+ * It writes eRepair data to the VPD of both the endpoint targets
+ * passed as arguments.
+ *
+ * @param[in] i_txEndp_target Reference to X-Bus or A-Bus or MCS or memBuf
+ * Target. This is the peer target of
+ * i_rxEndp_target
+ * @param[in] i_rxEndp_target Reference to X-Bus or A-Bus or MCS or memBuf
+ * Target. This is the target on which the
+ * badlanes were found
+ * @param[in] i_rxFailLanes Vector that will contain the fail lanes
+ * to be written to VPD for Receive side
+ * @param[out] o_thresholdExceed If TRUE, indicates that the eRepair threshold
+ * has exceeded, FALSE otherwise.
*
* @return ReturnCode
*/
fapi::ReturnCode erepairSetFailedLanes(
- const fapi::Target &i_endp_target,
- const std::vector<uint8_t> &i_txFailLanes,
- const std::vector<uint8_t> &i_rxFailLanes);
+ const fapi::Target &i_txEndp_target,
+ const fapi::Target &i_rxEndp_target,
+ const std::vector<uint8_t> &i_rxFailLanes,
+ bool &o_thresholdExceed);
/**
* @brief FW Team Utility function that sets eRepair data in Field VPD
*
- * This is a wrapper function for the Accessor HWP which write failed lane
- * numbers in the Field VPD
+ * This is a wrapper function for the Accessor HWP which writes failed lane
+ * numbers to the Field VPD
*
- * @param[in] i_endp_target Reference to X-Bus or A-Bus or MCS Target
- * @param[in] i_txFailLanes Vector that will contain the fail lane
- * to be written to Field VPD for Drive side
- * @param[in] i_rxFailLanes Vector that will contain the fail lanes
- * to be written to Field VPD for Receive side
+ * @param[in] i_endp_target Reference to X-Bus or A-Bus or MCS or memBuf Target
+ * @param[in] i_txFailLanes Vector that will contain the fail lane
+ * to be written to Field VPD for Drive side
+ * @param[in] i_rxFailLanes Vector that will contain the fail lanes
+ * to be written to Field VPD for Receive side
*
* @return ReturnCode
*/
@@ -154,14 +161,14 @@ fapi::ReturnCode erepairSetFieldFailedLanes(
/**
* @brief FW Team Utility function that sets eRepair data in Manufacturing VPD
*
- * This is a wrapper function for the Accessor HWP which write failed lane
- * numbers in the Manufacturing VPD
+ * This is a wrapper function for the Accessor HWP which writes failed lane
+ * numbers to the Manufacturing VPD
*
- * @param[in] i_endp_target Reference to X-Bus or A-Bus or MCS Target
- * @param[in] i_txFailLanes Vector that will contain the fail lane
- * to be written to Mnfg VPD for Drive side
- * @param[in] i_rxFailLanes Vector that will contain the fail lanes
- * to be written to Mnfg VPD for Receive side
+ * @param[in] i_endp_target Reference to X-Bus or A-Bus or MCS or memBuf Target
+ * @param[in] i_txFailLanes Vector that will contain the fail lane
+ * to be written to Mnfg VPD for Drive side
+ * @param[in] i_rxFailLanes Vector that will contain the fail lanes
+ * to be written to Mnfg VPD for Receive side
*
* @return ReturnCode
*/
@@ -176,8 +183,8 @@ fapi::ReturnCode erepairSetMnfgFailedLanes(
*
* This function is called by the iStep dispatcher during the Restore Repair
* iStep for Fabric buses and DMI buses. The caller need to make sure that the
- * first two arguments of this function need to be end point targets of a
- * Fabric bus or DMI bus.
+ * first and fourth arguments are the endpoint targets of a Fabric bus or
+ * DMI bus.
* It calls the wrapper functions of Accessor HWP to read the fail lane data
* recorded in the VPD on both the ends and verifies that there are matching
* records on both the ends. If matching fail lanes are not found, the
diff --git a/src/include/usr/hwpf/hwp/erepairConsts.H b/src/include/usr/hwpf/hwp/erepairConsts.H
index 2fb0f6e5a..3ebc46d95 100644
--- a/src/include/usr/hwpf/hwp/erepairConsts.H
+++ b/src/include/usr/hwpf/hwp/erepairConsts.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012 */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
/* */
/* p1 */
/* */
@@ -100,6 +100,11 @@ const uint8_t DMIBUS_SPARE_DEPLOY_LANE_1 = 0;
const uint8_t DMIBUS_SPARE_DEPLOY_LANE_2 = 1;
const uint8_t DMIBUS_MAXSPARES_IN_HW = 2;
+const uint32_t EREPAIR_P8_MODULE_VPD_FIELD_SIZE = 0x154; // 340 bytes
+const uint32_t EREPAIR_P8_MODULE_VPD_MNFG_SIZE = 0xC4; // 196 bytes
+const uint32_t EREPAIR_MEM_FIELD_VPD_SIZE_PER_CENTAUR = 0x1C; // 28 bytes
+const uint32_t EREPAIR_MEM_MNFG_VPD_SIZE_PER_CENTAUR = 0x14; // 20 bytes
+
enum busType
{
UNKNOWN_BUS_TYPE = 0,
@@ -116,7 +121,9 @@ enum interfaceType
DMI_MCS_RECEIVE = 3, // MCS receive
DMI_MCS_DRIVE = 4, // MCS transmit
DMI_MEMBUF_RECEIVE = 5, // Centaur receive
- DMI_MEMBUF_DRIVE = 6 // Centaur transmit
+ DMI_MEMBUF_DRIVE = 6, // Centaur transmit
+ DRIVE = 7, // Tx
+ RECEIVE = 8 // Rx
};
}// end of EREPAIR namespace
diff --git a/src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.H b/src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.H
index a798d2296..7a3781f60 100644
--- a/src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.H
+++ b/src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.H
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/include/usr/hwpf/hwp/erepairFailLaneGetHwp.H $ */
+/* $Source: src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.H $ */
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012 */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
/* */
/* p1 */
/* */
@@ -49,13 +49,13 @@ 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 sections reserved for Field usage. It then parses the
+ * @brief FW Team HWP that retrieves the eRepair fail lanes from Field VPD.
+ * It retrieves the eRepair data from the P8 MVPD or the Centaur FRU
+ * VPD sections depending on the passed target type. It then parses the
* eRepair data to determine the fail lane numbers on the sub-interfaces
* (Tx and Rx) of the passed bus target.
*
- * @param[in] i_tgtHandle Reference to X-Bus or A-Bus or MCS or Target
+ * @param[in] i_tgtHandle Reference to X-Bus or A-Bus or MCS or memBuf 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
@@ -63,8 +63,6 @@ extern "C"
*
* @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,
diff --git a/src/include/usr/hwpf/hwp/erepairGetMnfgFailedLanesHwp.H b/src/include/usr/hwpf/hwp/erepairGetMnfgFailedLanesHwp.H
index 656389cde..a15df19ef 100644
--- a/src/include/usr/hwpf/hwp/erepairGetMnfgFailedLanesHwp.H
+++ b/src/include/usr/hwpf/hwp/erepairGetMnfgFailedLanesHwp.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012 */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
/* */
/* p1 */
/* */
@@ -49,22 +49,20 @@ 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 sections that is reserved for Mnfg usage. It then parses the
+ * @brief FW Team HWP that retrieves the eRepair fail lanes from Mnfg VPD.
+ * It retrieves the eRepair data from the P8 MVPD or the Centaur FRU
+ * VPD sections depending on the passed target type. It then parses the
* eRepair data to determine the fail lane numbers on the sub-interfaces
* (Tx and Rx) of the passed bus target.
*
- * @param[in] i_tgtHandle Reference to X-Bus or A-Bus or MCS or Target
+ * @param[in] i_tgtHandle Reference to X-Bus or A-Bus or MCS or memBuf Target
* @param[o] o_txFailLanes Reference to a vector that will hold eRepair fail
- * lane numbers of the Tx sub-interface.
+ * lane numbers of the Tx sub-interface of i_tgtHandle
* @param[o] o_rxFailLanes Reference to a vector that will hold eRepair fail
- * lane numbers of the Rx sub-interface.
+ * lane numbers of the Rx sub-interface of i_tgtHandle
*
* @return ReturnCode
*
- * TODO: i_tgtHandle There will be future support for Centaur Target.
- * RTC Task 51234. Depends on RTC Story 44009
*/
fapi::ReturnCode erepairGetMnfgFailedLanesHwp(const fapi::Target &i_tgtHandle,
std::vector<uint8_t> &o_txFailLanes,
diff --git a/src/include/usr/hwpf/hwp/erepairSetFailedLanesHwp.H b/src/include/usr/hwpf/hwp/erepairSetFailedLanesHwp.H
new file mode 100755
index 000000000..77da42099
--- /dev/null
+++ b/src/include/usr/hwpf/hwp/erepairSetFailedLanesHwp.H
@@ -0,0 +1,74 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hwpf/hwp/erepairSetFailedLanesHwp.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2013 */
+/* */
+/* 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 erepairSetFailedLanesHwp.H
+ *
+ * @brief FW Team HWP that accesses the fail lanes of Fabric and Memory buses.
+ */
+
+/*
+ * Change Log ******************************************************************
+ * Flag Defect/Feature User Date Description
+ * ------ -------------- ---------- ----------- ----------------------------
+ * bilicon 10-Jan-2013 Created.
+ */
+
+#ifndef EREPAIRSETFAILEDLANESHWP_H_
+#define EREPAIRSETFAILEDLANESHWP_H_
+
+#include <fapi.H>
+#include <erepairConsts.H>
+
+
+typedef fapi::ReturnCode (*erepairSetFailedLanesHwp_FP_t)(
+ const fapi::Target &i_tgtHandle,
+ std::vector<uint8_t> &i_txFailLanes,
+ std::vector<uint8_t> &i_rxFailLanes);
+
+extern "C"
+{
+
+/**
+ * @brief FW Team HWP that writes the Field eRepair fail lanes to the VPD.
+ * The fail lanes will be written to either the P8 MVPD or the
+ * Centaur FRU VPD depending on the passed target type.
+ *
+ * @param[in] i_tgtHandle Reference to X-Bus or A-Bus or MCS or memBuf Target
+ * @param[in] i_txFailLanes Reference to a vector that has the Tx side
+ * (of i_tgtHandle) fail lane numbers that need
+ * to be written to the VPD
+ * @param[in] i_rxFailLanes Reference to a vector that has the Rx side
+ * (of i_tgtHandle) fail lane numbers that need
+ * to be written to the VPD
+ *
+ * @return ReturnCode
+ *
+ */
+fapi::ReturnCode erepairSetFailedLanesHwp(
+ const fapi::Target &i_tgtHandle,
+ const std::vector<uint8_t> &i_txFailLanes,
+ const std::vector<uint8_t> &i_rxFailLanes);
+
+}// end of extern C
+
+#endif
diff --git a/src/include/usr/hwpf/hwp/erepairSetMnfgFailedLanesHwp.H b/src/include/usr/hwpf/hwp/erepairSetMnfgFailedLanesHwp.H
new file mode 100755
index 000000000..910da3de1
--- /dev/null
+++ b/src/include/usr/hwpf/hwp/erepairSetMnfgFailedLanesHwp.H
@@ -0,0 +1,77 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hwpf/hwp/erepairSetMnfgFailedLanesHwp.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2013 */
+/* */
+/* 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 */
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/**
+ * @file erepairSetMnfgFailedLanesHwp.H
+ *
+ * @brief FW Team HWP that accesses the fail lanes of Fabric and Memory buses.
+ */
+
+/*
+ * Change Log ******************************************************************
+ * Flag Defect/Feature User Date Description
+ * ------ -------------- ---------- ----------- ----------------------------
+ * bilicon 10-Jan-2013 Created.
+ */
+
+#ifndef EREPAIRSETMNFGFAILEDLANESHWP_H_
+#define EREPAIRSETMNFGFAILEDLANESHWP_H_
+
+#include <fapi.H>
+#include <erepairConsts.H>
+
+
+typedef fapi::ReturnCode (*erepairSetMnfgFailedLanesHwp_FP_t)(
+ const fapi::Target &i_tgtHandle,
+ std::vector<uint8_t> &i_txFailLanes,
+ std::vector<uint8_t> &i_rxFailLanes);
+
+extern "C"
+{
+
+/**
+ * @brief FW Team HWP that writes the eRepair fail lanes to the Mnfg VPD.
+ * The fail lanes will be written to either the P8 MVPD or the
+ * Centaur FRU VPD depending on the passed target type.
+ *
+ * @param[in] i_tgtHandle Reference to X-Bus or A-Bus or MCS or memBuf Target
+ * @param[in] i_txFailLanes Reference to a vector that has the Tx side
+ * (of i_tgtHandle) fail lane numbers that need
+ * to be written to the VPD
+ * @param[in] i_rxFailLanes Reference to a vector that has the Rx side
+ * (of i_tgtHandle) fail lane numbers that need
+ * to be written to the VPD
+ *
+ * @return ReturnCode
+ */
+
+fapi::ReturnCode erepairSetMnfgFailedLanesHwp(
+ const fapi::Target &i_tgtHandle,
+ const std::vector<uint8_t> &i_txFailLanes,
+ const std::vector<uint8_t> &i_rxFailLanes);
+
+}// end of extern C
+
+#endif
OpenPOWER on IntegriCloud