diff options
author | Benjamin Weisenbeck <bweisenb@us.ibm.com> | 2017-11-09 13:17:32 -0600 |
---|---|---|
committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2017-11-27 20:05:00 -0500 |
commit | 68e2f99dbe29c9fd178a7413acb4968db48713e7 (patch) | |
tree | 6af61dc0c436e01f61805d0d9374c798709a98aa /src/import/chips/p9/procedures/hwp/io/p9_io_erepairGetFailedLanesHwp.H | |
parent | c2c5d0e657f6229b9d248fde3195708e303adce1 (diff) | |
download | talos-hostboot-68e2f99dbe29c9fd178a7413acb4968db48713e7.tar.gz talos-hostboot-68e2f99dbe29c9fd178a7413acb4968db48713e7.zip |
erepair VPD access bug fixes
Fixed Expected size of VPD buffer for nimbus.
Added a TargetType template argument to interfaces instead of using
compound target types for fapi targets, so that type check conditions
will work as intended.
Change-Id: Ice35d4380924232e1b6f722bd48d0c2e81dd4e1e
CQ: SW408663
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/49497
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/49504
Reviewed-by: Hostboot Team <hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/io/p9_io_erepairGetFailedLanesHwp.H')
-rwxr-xr-x | src/import/chips/p9/procedures/hwp/io/p9_io_erepairGetFailedLanesHwp.H | 69 |
1 files changed, 30 insertions, 39 deletions
diff --git a/src/import/chips/p9/procedures/hwp/io/p9_io_erepairGetFailedLanesHwp.H b/src/import/chips/p9/procedures/hwp/io/p9_io_erepairGetFailedLanesHwp.H index c63575379..b79f8aff8 100755 --- a/src/import/chips/p9/procedures/hwp/io/p9_io_erepairGetFailedLanesHwp.H +++ b/src/import/chips/p9/procedures/hwp/io/p9_io_erepairGetFailedLanesHwp.H @@ -42,49 +42,40 @@ #include <p9_io_erepairConsts.H> -typedef fapi2::ReturnCode (*p9_io_erepairGetFailedLanesHwp_FP_t)( - const fapi2::Target < fapi2::TARGET_TYPE_XBUS | - fapi2::TARGET_TYPE_OBUS | - fapi2::TARGET_TYPE_MEMBUF_CHIP | - fapi2::TARGET_TYPE_MCS_CHIPLET | - fapi2::TARGET_TYPE_MCS > &i_target, +template<fapi2::TargetType K> +using p9_io_erepairGetFailedLanesHwp_FP_t = fapi2::ReturnCode (*)( + const fapi2::Target < K >& i_target, + EREPAIR::erepairVpdType i_vpdType, + const uint8_t i_clkGroup, + std::vector<uint8_t>& o_txFailLanes, + std::vector<uint8_t>& o_rxFailLanes); + + +/** + * @brief FW Team HWP that retrieves the eRepair fail lanes. + * It retrieves the eRepair data from the P9 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[in] i_clkGroup Specifies clock group 0:[XOA, X1A,..] 1:[X0B, X1B,..] + * @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 + * + */ +template<fapi2::TargetType K> +fapi2::ReturnCode p9_io_erepairGetFailedLanesHwp( + const fapi2::Target < K >& i_target, EREPAIR::erepairVpdType i_vpdType, const uint8_t i_clkGroup, std::vector<uint8_t>& o_txFailLanes, std::vector<uint8_t>& o_rxFailLanes); -extern "C" -{ - - /** - * @brief FW Team HWP that retrieves the eRepair fail lanes. - * It retrieves the eRepair data from the P9 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[in] i_clkGroup Specifies clock group 0:[XOA, X1A,..] 1:[X0B, X1B,..] - * @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 - * - */ - fapi2::ReturnCode p9_io_erepairGetFailedLanesHwp( - const fapi2::Target < fapi2::TARGET_TYPE_XBUS | - fapi2::TARGET_TYPE_OBUS | - fapi2::TARGET_TYPE_MEMBUF_CHIP | - fapi2::TARGET_TYPE_MCS_CHIPLET | - fapi2::TARGET_TYPE_MCS > &i_target, - EREPAIR::erepairVpdType i_vpdType, - const uint8_t i_clkGroup, - std::vector<uint8_t>& o_txFailLanes, - std::vector<uint8_t>& o_rxFailLanes); - -}// end of extern C #endif |