summaryrefslogtreecommitdiffstats
path: root/src/include/usr/hwpf
diff options
context:
space:
mode:
authorBilicon Patil <bilpatil@in.ibm.com>2013-07-25 08:16:58 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-08-08 11:04:19 -0500
commit0122e5443d294f93010344288d51c9131d57fc47 (patch)
treeae1dcab63f10442c457467aae97d35aaad2f0198 /src/include/usr/hwpf
parentaa9eff9dfd7ddbb969ae92c244988348bdc2718b (diff)
downloadblackbird-hostboot-0122e5443d294f93010344288d51c9131d57fc47.tar.gz
blackbird-hostboot-0122e5443d294f93010344288d51c9131d57fc47.zip
Refactor eRepair Accessor HWP
Combine the two eRepair Accesor HWP that operated on Field VPD and Manufacturing VPD into a single HWP. Change-Id: I2528d3035bff008a0c409e540149c86dc78d4b4c RTC: 69592 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5566 Tested-by: Jenkins Server Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/hwpf')
-rw-r--r--src/include/usr/hwpf/hwp/erepairAccessorHwpFuncs.H8
-rw-r--r--src/include/usr/hwpf/hwp/erepairConsts.H8
-rw-r--r--src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.H20
-rw-r--r--src/include/usr/hwpf/hwp/erepairGetMnfgFailedLanesHwp.H73
-rwxr-xr-xsrc/include/usr/hwpf/hwp/erepairSetFailedLanesHwp.H11
-rwxr-xr-xsrc/include/usr/hwpf/hwp/erepairSetMnfgFailedLanesHwp.H77
-rw-r--r--src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H2
7 files changed, 27 insertions, 172 deletions
diff --git a/src/include/usr/hwpf/hwp/erepairAccessorHwpFuncs.H b/src/include/usr/hwpf/hwp/erepairAccessorHwpFuncs.H
index 1e11b9b6a..6df3e5bcc 100644
--- a/src/include/usr/hwpf/hwp/erepairAccessorHwpFuncs.H
+++ b/src/include/usr/hwpf/hwp/erepairAccessorHwpFuncs.H
@@ -39,14 +39,6 @@
#include <fapi.H>
-// VPD Type to read-write
-enum erepairVpdType
-{
- EREPAIR_VPD_UNKNOWN = 0,
- EREPAIR_VPD_MNFG = 1,
- EREPAIR_VPD_FIELD = 2,
-};
-
const uint8_t EREPAIR_MAX_CENTAUR_PER_MCS = 1;
typedef fapi::ReturnCode (*getLanes_t)(
diff --git a/src/include/usr/hwpf/hwp/erepairConsts.H b/src/include/usr/hwpf/hwp/erepairConsts.H
index 3ebc46d95..3ed5eb5da 100644
--- a/src/include/usr/hwpf/hwp/erepairConsts.H
+++ b/src/include/usr/hwpf/hwp/erepairConsts.H
@@ -126,6 +126,14 @@ enum interfaceType
RECEIVE = 8 // Rx
};
+// VPD Type to read-write
+enum erepairVpdType
+{
+ EREPAIR_VPD_UNKNOWN = 0,
+ EREPAIR_VPD_MNFG = 1,
+ EREPAIR_VPD_FIELD = 2,
+};
+
}// end of EREPAIR namespace
/******************************************************************************
diff --git a/src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.H b/src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.H
index 7a3781f60..0fe93662b 100644
--- a/src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.H
+++ b/src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.H
@@ -41,21 +41,23 @@
typedef fapi::ReturnCode (*erepairGetFailedLanesHwp_FP_t)(
- const fapi::Target &i_tgtHandle,
- std::vector<uint8_t> &o_txFailLanes,
- std::vector<uint8_t> &o_rxFailLanes);
+ const fapi::Target &i_tgtHandle,
+ EREPAIR::erepairVpdType i_vpdType,
+ std::vector<uint8_t> &o_txFailLanes,
+ std::vector<uint8_t> &o_rxFailLanes);
extern "C"
{
/**
- * @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
+ * @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 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 memBuf Target
+ * @param[in] i_vpdType Specifies which VPD (MNFG or Field) to access.
* @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
@@ -64,9 +66,11 @@ extern "C"
* @return ReturnCode
*
*/
-fapi::ReturnCode erepairGetFailedLanesHwp(const fapi::Target &i_tgtHandle,
- std::vector<uint8_t> &o_txFailLanes,
- std::vector<uint8_t> &o_rxFailLanes);
+fapi::ReturnCode erepairGetFailedLanesHwp(
+ const fapi::Target &i_tgtHandle,
+ EREPAIR::erepairVpdType i_vpdType,
+ std::vector<uint8_t> &o_txFailLanes,
+ std::vector<uint8_t> &o_rxFailLanes);
}// end of extern C
diff --git a/src/include/usr/hwpf/hwp/erepairGetMnfgFailedLanesHwp.H b/src/include/usr/hwpf/hwp/erepairGetMnfgFailedLanesHwp.H
deleted file mode 100644
index a15df19ef..000000000
--- a/src/include/usr/hwpf/hwp/erepairGetMnfgFailedLanesHwp.H
+++ /dev/null
@@ -1,73 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/include/usr/hwpf/hwp/erepairGetMnfgFailedLanesHwp.H $ */
-/* */
-/* IBM CONFIDENTIAL */
-/* */
-/* COPYRIGHT International Business Machines Corp. 2012,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 erepairGetMnfgFailedLanesHwp.H.H
- *
- * @brief FW Team HWP that accesses the fail lanes of Fabric and Memory buses.
- */
-
-/*
- * Change Log ******************************************************************
- * Flag Defect/Feature User Date Description
- * ------ -------------- ---------- ----------- ----------------------------
- * bilicon 12/02/2012 Created.
- */
-
-#ifndef EREPAIRGETMNFGFAILEDLANESHWP_H_
-#define EREPAIRGETMNFGFAILEDLANESHWP_H_
-
-#include <fapi.H>
-#include <erepairConsts.H>
-
-
-typedef fapi::ReturnCode (*erepairGetMnfgFailedLanesHwp_FP_t)(
- const fapi::Target &i_tgtHandle,
- std::vector<uint8_t> &o_txFailLanes,
- std::vector<uint8_t> &o_rxFailLanes);
-
-extern "C"
-{
-
-/**
- * @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 memBuf Target
- * @param[o] o_txFailLanes Reference to a vector that will hold eRepair fail
- * 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 of i_tgtHandle
- *
- * @return ReturnCode
- *
- */
-fapi::ReturnCode erepairGetMnfgFailedLanesHwp(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/include/usr/hwpf/hwp/erepairSetFailedLanesHwp.H b/src/include/usr/hwpf/hwp/erepairSetFailedLanesHwp.H
index 77da42099..8c1413560 100755
--- a/src/include/usr/hwpf/hwp/erepairSetFailedLanesHwp.H
+++ b/src/include/usr/hwpf/hwp/erepairSetFailedLanesHwp.H
@@ -41,19 +41,21 @@
typedef fapi::ReturnCode (*erepairSetFailedLanesHwp_FP_t)(
- const fapi::Target &i_tgtHandle,
- std::vector<uint8_t> &i_txFailLanes,
- std::vector<uint8_t> &i_rxFailLanes);
+ const fapi::Target &i_tgtHandle,
+ EREPAIR::erepairVpdType i_vpdType,
+ 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.
+ * @brief FW Team HWP that writes the 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_vpdType Specifies which VPD (MNFG or Field) to access.
* @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
@@ -66,6 +68,7 @@ extern "C"
*/
fapi::ReturnCode erepairSetFailedLanesHwp(
const fapi::Target &i_tgtHandle,
+ EREPAIR::erepairVpdType i_vpdType,
const std::vector<uint8_t> &i_txFailLanes,
const std::vector<uint8_t> &i_rxFailLanes);
diff --git a/src/include/usr/hwpf/hwp/erepairSetMnfgFailedLanesHwp.H b/src/include/usr/hwpf/hwp/erepairSetMnfgFailedLanesHwp.H
deleted file mode 100755
index 910da3de1..000000000
--- a/src/include/usr/hwpf/hwp/erepairSetMnfgFailedLanesHwp.H
+++ /dev/null
@@ -1,77 +0,0 @@
-/* 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
diff --git a/src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H b/src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H
index aebcf5d85..ad6d000ca 100644
--- a/src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H
+++ b/src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H
@@ -41,9 +41,7 @@
#include <fapiTestHwpDq.H>
#include <dimmBadDqBitmapAccessHwp.H>
#include <erepairGetFailedLanesHwp.H>
-#include <erepairGetMnfgFailedLanesHwp.H>
#include <erepairSetFailedLanesHwp.H>
-#include <erepairSetMnfgFailedLanesHwp.H>
/**
* @brief HWP Executor macro
OpenPOWER on IntegriCloud