diff options
author | Elliott Dahle <dedahle@us.ibm.com> | 2013-07-22 11:07:23 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-07-30 14:44:28 -0500 |
commit | 9319829a92387bc15ab63a5a90710a518e43a453 (patch) | |
tree | 3d3818c368d9cc78ad77f832c7e6a8cc94176d98 /src/include | |
parent | c600aad20e783024b998a52d17d9d4650b9005a0 (diff) | |
download | talos-hostboot-9319829a92387bc15ab63a5a90710a518e43a453.tar.gz talos-hostboot-9319829a92387bc15ab63a5a90710a518e43a453.zip |
Access Bad DQ via ATTR_BAD_DQ_BITMAP and show unconnected DQs
Change-Id: Id703749de7c08aef337904a2dccac3af2e90a108
RTC: 72937
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5510
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: William H. Schwartz <whs@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
4 files changed, 155 insertions, 22 deletions
diff --git a/src/include/usr/hwpf/hwp/dimmBadDqBitmapAccessHwp.H b/src/include/usr/hwpf/hwp/dimmBadDqBitmapAccessHwp.H index fc7703ebc..7a3eb9925 100644 --- a/src/include/usr/hwpf/hwp/dimmBadDqBitmapAccessHwp.H +++ b/src/include/usr/hwpf/hwp/dimmBadDqBitmapAccessHwp.H @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/hwpf/hwp/dimmBadDqBitmapAccessHwp.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 other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/hwpf/hwp/dimmBadDqBitmapAccessHwp.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 dimmBadDqBitmapAccessHwp.H * diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSpareDramData.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSpareDramData.H new file mode 100644 index 000000000..6e05fb3f3 --- /dev/null +++ b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSpareDramData.H @@ -0,0 +1,56 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSpareDramData.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 */ +#ifndef GETMBVPDSPAREDRAMDATA_H_ +#define GETMBVPDSPAREDRAMDATA_H_ + +#include <fapi.H> +#include <dimmConsts.H> + +typedef fapi::ReturnCode (*getMBvpdSpareDramData_FP_t)( + const fapi::Target &, + const fapi::Target &, + uint8_t &); + +extern "C" +{ + +/** + * @brief FW Team HWP that, for C-DIMMs, queries MBvpd to determine spare DRAM + * availability and, for IS-DIMMS, returns NO_SPARE. + * + * This HWP should be called through the VPD_DIMM_SPARE attribute. + * + * @param[in] i_mba Reference to MBA Target associated with the DIMM. + * @param[in] i_dimm Reference to DIMM Target. + * @param[out] o_data Reference to spare DRAM data. + * + * @return ReturnCode + */ +fapi::ReturnCode getMBvpdSpareDramData( + const fapi::Target & i_mba, + const fapi::Target & i_dimm, + uint8_t &o_data); + +} + +#endif diff --git a/src/include/usr/hwpf/hwpf_reasoncodes.H b/src/include/usr/hwpf/hwpf_reasoncodes.H index ea80fbfc2..871297e4c 100644 --- a/src/include/usr/hwpf/hwpf_reasoncodes.H +++ b/src/include/usr/hwpf/hwpf_reasoncodes.H @@ -60,6 +60,8 @@ namespace fapi MOD_VDDR_PROC_MSG = 0x15, MOD_VDDR_PROC_VDDR_MSG = 0x16, MOD_VDDR_SEND_MSG = 0x17, + MOD_PLAT_ATTR_SVC_GET_MIRR_DATA = 0x18, + MOD_PLAT_ATTR_SVC_GET_SPARE_DATA = 0x19, }; /** diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H index 89b876a30..670b5125f 100644 --- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H +++ b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H @@ -36,6 +36,7 @@ * mjjones 06/27/2011 Created. * bofferdn 09/13/2011 Support fapi->hb mapping * thi 01/28/2013 Add SPD CUSTOM attr + * dedahle 06/20/2013 Add Bad DIMM DQ Bitmap attr */ #ifndef FAPIPLATATTRIBUTESERVICE_H_ @@ -57,6 +58,7 @@ #include <hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.H> #include <hwpf/hwp/mvpd_accessors/getMBvpdTermData.H> #include <hwpf/hwp/mvpd_accessors/getMBvpdSlopeInterceptData.H> +#include <hwpf/hwp/mvpd_accessors/getMBvpdSpareDramData.H> #include <vpd/spdenums.H> #include <dimmConsts.H> #include <util/singleton.H> @@ -499,6 +501,59 @@ fapi::ReturnCode fapiPlatGetSlopeInterceptData ( const fapi::Target * i_pTarget, const fapi::MBvpdSlopeIntercept i_attr, uint32_t & o_Val); + +//------------------------------------------------------------------------------ +// Prototypes to support BAD_DQ_BITMAP attribute +// See dimm_spd_attributes.xml for detailed descriptions +//------------------------------------------------------------------------------ + +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * the Bad DQ Bitmap attribute + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_data Bad DIMM DQ Bitmap + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatDimmGetBadDqBitmap ( + const fapi::Target * i_pTarget, + uint8_t (&o_data)[DIMM_DQ_MAX_DIMM_RANKS]\ + [DIMM_DQ_RANK_BITMAP_SIZE]); + +/** + * @brief This function is called by the FAPI_ATTR_SET macro when setting + * the Bad DQ Bitmap attribute + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[in] i_data Bad DIMM DQ Bitmap + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatDimmSetBadDqBitmap ( + const fapi::Target * i_pTarget, + uint8_t (&i_data)[DIMM_DQ_MAX_DIMM_RANKS]\ + [DIMM_DQ_RANK_BITMAP_SIZE]); + +//------------------------------------------------------------------------------ +// Prototype to support VPD_DIMM_SPARE attribute +// See dimm_spd_attributes.xml for detailed description +//------------------------------------------------------------------------------ + +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * the VPD DIMM Spare attribute + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_data Spare DRAM availability for DIMM + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatDimmGetSpareDram ( + const fapi::Target * i_pTarget, + uint8_t &o_data); + + } // namespace platAttrSvc } // namespace fapi @@ -1444,4 +1499,24 @@ fapi::ReturnCode fapiPlatGetSlopeInterceptData ( fapi::platAttrSvc::fapiPlatGetSlopeInterceptData\ (PTARGET, fapi::SUPPLIER_POWER_INTERCEPT , VAL) +//------------------------------------------------------------------------------ +// MACRO to support BAD_DQ_BITMAP Attribute +//------------------------------------------------------------------------------ +#define ATTR_BAD_DQ_BITMAP_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatDimmGetBadDqBitmap\ + (PTARGET, VAL) +#define ATTR_BAD_DQ_BITMAP_SETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::setAttrActionsFunc(fapi::ID, PTARGET,\ + sizeof(VAL), &VAL),\ + fapi::platAttrSvc::fapiPlatDimmSetBadDqBitmap(PTARGET, VAL) + +//------------------------------------------------------------------------------ +// MACRO to support VPD_DIMM_SPARE Attribute +//------------------------------------------------------------------------------ +#define ATTR_VPD_DIMM_SPARE_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatDimmGetSpareDram\ + (PTARGET, VAL) + #endif // FAPIPLATATTRIBUTESERVICE_H_ |