diff options
author | Mike Jones <mjjones@us.ibm.com> | 2013-05-17 13:46:41 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-06-06 10:21:40 -0500 |
commit | 66474f4f93fd10ad3b35ed89cecc3d6b11e99eed (patch) | |
tree | d4eead386bbfce426e554bd35a105410689d5b9a /src/include/usr/hwpf | |
parent | 3d8ff73f2435dda59135776a751d692779b045bb (diff) | |
download | talos-hostboot-66474f4f93fd10ad3b35ed89cecc3d6b11e99eed.tar.gz talos-hostboot-66474f4f93fd10ad3b35ed89cecc3d6b11e99eed.zip |
Retrieve attributes from VSPD AM Centaur VPD fields
Create a HWP accessor to retrieve Address Mirroring Data attributes from cvpd
record VSPD keyword AM.
Change-Id: I1b994814407d0747021c869515d8e08a6d02f7e5
RTC: 50574
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4781
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: MIKE J. JONES <mjjones@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/fapi/fapiMBvpdAccess.H | 1 | ||||
-rw-r--r-- | src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.H | 108 | ||||
-rw-r--r-- | src/include/usr/hwpf/hwpf_reasoncodes.H | 2 | ||||
-rw-r--r-- | src/include/usr/hwpf/plat/fapiPlatAttributeService.H | 22 |
4 files changed, 133 insertions, 0 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H b/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H index 5fa79f5fa..e90ce67cd 100644 --- a/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H +++ b/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H @@ -67,6 +67,7 @@ namespace fapi MBVPD_KEYWORD_LM = 0x06, MBVPD_KEYWORD_MW = 0x07, MBVPD_KEYWORD_MV = 0x08, + MBVPD_KEYWORD_AM = 0x09, }; } diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.H new file mode 100644 index 000000000..75d217587 --- /dev/null +++ b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.H @@ -0,0 +1,108 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirror.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 */ +// $Id$ + +/** + * @file getMBvpdAddrMirror.H + * + * @brief Prototype for getMBvpdAddrMirror() - + * get Address Mirroring Data from MBvpd + */ + +#ifndef _HWP_MBVPDADDRMIRRORDATA_ +#define _HWP_MBVPDADDRMIRRORDATA_ + +#include <fapi.H> + +// function pointer typedef definition for HWP call support +typedef fapi::ReturnCode (*getMBvpdAddrMirrorData_FP_t) + (const fapi::Target &, uint8_t (&) [2][2]); + +extern "C" +{ +/** + * @brief get Address Mirroring Data from cvpd record VSPD keyword AM + * + * The Address Mirroring Data attributes are retrieved from cvpd record VSPD + * keyword AM. + * There are two mba per memory buffer: position 0 and position 1. + * There are two ports for each mba and 2 DIMMs per port. + * + * cpvd record VSPD keyword AM - 4 bytes + * ----------------------------------- + * | mba position 0 | + * | ----------------------------- | + * | | port 0 (Port A) | | + * | | ------------------------ | | + * | | | DIMM 0 : 4 bits | | | + * | | ------------------------ | | + * | | | DIMM 1 : 4 bits | | | + * | | ------------------------ | | + * | |---------------------------| | + * | | port 1 (Port B) | | + * | | ------------------------ | | + * | | | DIMM 0 : 4 bits | | | + * | | ------------------------ | | + * | | | DIMM 1 : 4 bits | | | + * | | ------------------------ | | + * | ----------------------------- | + * |---------------------------------| + * | mba postion 1 | + * | ----------------------------- | + * | | port 0 (Port C) | | + * | | ------------------------ | | + * | | | DIMM 0 : 4 bits | | | + * | | ------------------------ | | + * | | | DIMM 1 : 4 bits | | | + * | | ------------------------ | | + * | |---------------------------| | + * | | port 1 (Port D) | | + * | | ------------------------ | | + * | | | DIMM 0 : 4 bits | | | + * | | ------------------------ | | + * | | | DIMM 1 : 4 bits | | | + * | | ------------------------ | | + * | ----------------------------- | + * ----------------------------------- + * + * Bit definition + * + * RANK0_MIRRORED = 0x08, + * RANK1_MIRRORED = 0x04, + * RANK2_MIRRORED = 0x02, + * RANK3_MIRRORED = 0x01, + * + * @param[in] i_mbaTarget - mba target + * @param[out] o_val - 2 x 2 array of bytes ([num ports] [num dimms]) + * Address Mirroring 4 bits per dimm returned + * in the lower nibble of the byte for the mba + * + * @return fapi::ReturnCode - FAPI_RC_SUCCESS if success, + * relevant error code for failure. + */ +fapi::ReturnCode getMBvpdAddrMirrorData( const fapi::Target &i_mbaTarget, + uint8_t (&o_val) [2][2]); + +} + +#endif diff --git a/src/include/usr/hwpf/hwpf_reasoncodes.H b/src/include/usr/hwpf/hwpf_reasoncodes.H index 818157f43..c16296fe6 100644 --- a/src/include/usr/hwpf/hwpf_reasoncodes.H +++ b/src/include/usr/hwpf/hwpf_reasoncodes.H @@ -103,6 +103,8 @@ namespace fapi RC_VDDR_ERROR_MSG = HWPF_COMP_ID | 0x26, RC_VDDR_POWR_ERR = HWPF_COMP_ID | 0x27, RC_INCORRECT_MSG_TYPE = HWPF_COMP_ID | 0x28, + + RC_NO_SINGLE_MBA = HWPF_COMP_ID | 0x29, }; /** diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H index 97c60b0de..0d423acdf 100644 --- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H +++ b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H @@ -54,6 +54,7 @@ #include <hwpf/fapi/fapiTarget.H> #include <hwpf/plat/fapiPlatAttrOverrideSync.H> #include <hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.H> +#include <hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.H> #include <vpd/spdenums.H> #include <dimmConsts.H> #include <util/singleton.H> @@ -452,6 +453,19 @@ fapi::ReturnCode fapiPlatGetPhaseRotatorData ( const fapi::Target * i_pTarget, const fapi::MBvpdPhaseRotatorData i_attr, uint8_t (&o_val) [2] ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * the Address Mirroring Data attributes + * It should not be called directly. + * + * @param[in] i_pTarget Target DIMM pointer + * @param[out] o_val Address Mirroring Data for DIMM + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetAddrMirrorData ( + const fapi::Target * i_pTarget, + uint8_t &o_val); + } // namespace platAttrSvc @@ -1064,4 +1078,12 @@ fapi::ReturnCode fapiPlatGetPhaseRotatorData ( #define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_ODT1_SETMACRO(ID, PTARGET, VAL)\ fapi::FAPI_RC_SUCCESS #endif +//------------------------------------------------------------------------------ +// MACROS to support MBVPD Address Mirror attributes +//------------------------------------------------------------------------------ +#define ATTR_VPD_DRAM_ADDRESS_MIRRORING_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetAddrMirrorData\ + (PTARGET, VAL) + #endif // FAPIPLATATTRIBUTESERVICE_H_ |