diff options
author | Bill Schwartz <whs@us.ibm.com> | 2013-04-25 10:26:12 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-05-08 10:50:44 -0500 |
commit | 750329e0758039e2692b3c26c28a4debb8feea1c (patch) | |
tree | b969bc3db446d62892f20e002456cea2f7cd21ec | |
parent | 1d3a43698a3abc6c39098c2d4684ab47fb9a41bc (diff) | |
download | talos-hostboot-750329e0758039e2692b3c26c28a4debb8feea1c.tar.gz talos-hostboot-750329e0758039e2692b3c26c28a4debb8feea1c.zip |
Retrieve Phase Rotator Values from CDIMM VPD
Update cvpd dd for VSPD record, including MR keyword
Update fapiGetPlatMBvpdAccess for VSPD record
Create an accessor to retrieve Phase Rotator attributes from MR keyword
Add, but comment out FAPI_ATTR_GET changes until CDIMM vpd is valid (69935).
Change-Id: I053aac1f7477f6e9c6d53bfa68c29cb53f872034
RTC: 59048
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4212
Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r-- | src/include/usr/hwpf/fapi/fapiMBvpdAccess.H | 13 | ||||
-rw-r--r-- | src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.H | 128 | ||||
-rw-r--r-- | src/include/usr/hwpf/plat/fapiPlatAttributeService.H | 318 | ||||
-rw-r--r-- | src/include/usr/vpd/cvpdenums.H | 8 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.C | 145 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk | 3 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml | 27 | ||||
-rw-r--r-- | src/usr/hwpf/plat/fapiPlatAttributeService.C | 12 | ||||
-rw-r--r-- | src/usr/hwpf/plat/fapiPlatMBvpdAccess.C | 9 | ||||
-rw-r--r-- | src/usr/hwpf/test/fapiwinkletest.H | 974 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/attribute_types.xml | 5 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/target_types.xml | 3 | ||||
-rw-r--r-- | src/usr/vpd/cvpd.H | 8 | ||||
-rw-r--r-- | src/usr/vpd/makefile | 2 | ||||
-rwxr-xr-x | src/usr/vpd/test/cvpdtest.H | 8 |
15 files changed, 1640 insertions, 23 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H b/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H index f53c89a8e..5fa79f5fa 100644 --- a/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H +++ b/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H @@ -28,13 +28,14 @@ * must implement * */ - +// $Id: fapiMBvpdAccess.H,v 1.2 2013/04/29 16:09:31 whs Exp $ /* * Change Log ****************************************************************** * Flag Defect/Feature User Date Description * ------ -------------- ---------- ----------- ---------------------------- * whs 01/24/2013 Added fapiGetMBvpdField + * whs 04/29/2013 Added VSPD record, keywords */ #ifndef _FAPI_FAPIMBVPDACCESS_H_ @@ -52,12 +53,22 @@ namespace fapi MBVPD_RECORD_VEIR = 0x00, MBVPD_RECORD_VER0 = 0x01, MBVPD_RECORD_MER0 = 0x02, + MBVPD_RECORD_VSPD = 0x03, }; enum MBvpdKeyword { MBVPD_KEYWORD_PDI = 0x00, + MBVPD_KEYWORD_PF = 0x01, + MBVPD_KEYWORD_MT = 0x02, + MBVPD_KEYWORD_MR = 0x03, + MBVPD_KEYWORD_PDA = 0x04, + MBVPD_KEYWORD_EL = 0x05, + MBVPD_KEYWORD_LM = 0x06, + MBVPD_KEYWORD_MW = 0x07, + MBVPD_KEYWORD_MV = 0x08, }; + } extern "C" diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.H new file mode 100644 index 000000000..88616a179 --- /dev/null +++ b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.H @@ -0,0 +1,128 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.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: getMBvpdPhaseRotatorData.H,v 1.2 2013/04/29 16:48:15 whs Exp + +/** + * @file getMBvpdPhaseRotatorData.H + * + * @brief Prototype for getMBvpdPhaseRotatorData() - + * get Phase Rotator Data from MBvpd + */ + +#ifndef _HWP_MVPDPHASERATORDATA_ +#define _HWP_MVPDPHASERATORDATA_ + +#include <fapi.H> + +namespace fapi +{ + +// values match offset into MR keyword data + enum MBvpdPhaseRotatorData + { + PHASE_ROT_M0_CLK_P0 = 0x00, + PHASE_ROT_M0_CLK_P1 = 0x01, + PHASE_ROT_M1_CLK_P0 = 0x02, + PHASE_ROT_M1_CLK_P1 = 0x03, + PHASE_ROT_M_CMD_A0 = 0x04, + PHASE_ROT_M_CMD_A1 = 0x05, + PHASE_ROT_M_CMD_A2 = 0x06, + PHASE_ROT_M_CMD_A3 = 0x07, + PHASE_ROT_M_CMD_A4 = 0x08, + PHASE_ROT_M_CMD_A5 = 0x09, + PHASE_ROT_M_CMD_A6 = 0x0a, + PHASE_ROT_M_CMD_A7 = 0x0b, + PHASE_ROT_M_CMD_A8 = 0x0c, + PHASE_ROT_M_CMD_A9 = 0x0d, + PHASE_ROT_M_CMD_A10 = 0x0e, + PHASE_ROT_M_CMD_A11 = 0xf, + PHASE_ROT_M_CMD_A12 = 0x10, + PHASE_ROT_M_CMD_A13 = 0x11, + PHASE_ROT_M_CMD_A14 = 0x12, + PHASE_ROT_M_CMD_A15 = 0x13, + PHASE_ROT_M_CMD_BA0 = 0x14, + PHASE_ROT_M_CMD_BA1 = 0x15, + PHASE_ROT_M_CMD_BA2 = 0x16, + PHASE_ROT_M_CMD_CASN = 0x17, + PHASE_ROT_M_CMD_RASN = 0x18, + PHASE_ROT_M_CMD_WEN = 0x19, + PHASE_ROT_M_PAR = 0x1a, + PHASE_ROT_M_ACTN = 0x1b, + PHASE_ROT_M0_CNTL_CKE0 = 0x1c, + PHASE_ROT_M0_CNTL_CKE1 = 0x1d, + PHASE_ROT_M0_CNTL_CKE2 = 0x1e, + PHASE_ROT_M0_CNTL_CKE3 = 0x1f, + PHASE_ROT_M0_CNTL_CSN0 = 0x20, + PHASE_ROT_M0_CNTL_CSN1 = 0x21, + PHASE_ROT_M0_CNTL_CSN2 = 0x22, + PHASE_ROT_M0_CNTL_CSN3 = 0x23, + PHASE_ROT_M0_CNTL_ODT0 = 0x24, + PHASE_ROT_M0_CNTL_ODT1 = 0x25, + PHASE_ROT_M1_CNTL_CKE0 = 0x26, + PHASE_ROT_M1_CNTL_CKE1 = 0x27, + PHASE_ROT_M1_CNTL_CKE2 = 0x28, + PHASE_ROT_M1_CNTL_CKE3 = 0x29, + PHASE_ROT_M1_CNTL_CSN0 = 0x2a, + PHASE_ROT_M1_CNTL_CSN1 = 0x2b, + PHASE_ROT_M1_CNTL_CSN2 = 0x2c, + PHASE_ROT_M1_CNTL_CSN3 = 0x2d, + PHASE_ROT_M1_CNTL_ODT0 = 0x2e, + PHASE_ROT_M1_CNTL_ODT1 = 0x2f, +// The max value is 0x3f. The MR keyword is 255 bytes. There is only room for +// 63 attributes per port. There are 4 x 64 byte sections, +// but the last one is 1 byte short. + }; +} + +// function pointer typedef definition for HWP call support +typedef fapi::ReturnCode (*getMBvpdPhaseRotatorData_FP_t) + (const fapi::Target &, const fapi::MBvpdPhaseRotatorData, + uint8_t (&)[2]); + + +extern "C" +{ +/** + * @brief get Phase Rotator Data from cvpd record VSPD keyword MR + * + * There are Phase Rotator attributes for the mba's 2 ports in cvpd + * record VSPD keyword MR. Each attribute has 2 bytes, one for each port. + * There are two mba per memory buffer, position 0 and position 1. + * + * @param i_mbaTarget - mba target + * @param i_attr - Phase Rotator Data attribute enumerator + * @param o_val - Phase Rotator Data for each of the 2 ports + * [0] port A (position 0) Port C (position 1) + * [1] port B (position 0) Port D (position 1) + * + * @return fapi::ReturnCode - FAPI_RC_SUCCESS if success, + * relevant error code for failure. + */ +fapi::ReturnCode getMBvpdPhaseRotatorData( + const fapi::Target &i_mbaTarget, + const fapi::MBvpdPhaseRotatorData i_attr, + uint8_t (&o_val)[2]); + +} + +#endif diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H index 3fb49a56d..812ecb6fc 100644 --- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H +++ b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H @@ -53,6 +53,7 @@ #include <hwpf/fapi/fapiReturnCode.H> #include <hwpf/fapi/fapiTarget.H> #include <hwpf/plat/fapiPlatAttrOverrideSync.H> +#include <hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.H> #include <vpd/spdenums.H> #include <dimmConsts.H> #include <util/singleton.H> @@ -442,6 +443,21 @@ fapi::ReturnCode fapiPlatGetSingleMemberEnableAttr( const fapi::Target * i_pTarget, uint32_t & o_val); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * the Phase Rotator Data attributes + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[in] i_attr Phase Rotator Data enumerator item + * @param[out] o_val Phase Rotator Data for each of the 2 ports + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetPhaseRotatorData ( + const fapi::Target * i_pTarget, + const fapi::MBvpdPhaseRotatorData i_attr, + uint8_t (&o_val) [2] ); + } // namespace platAttrSvc } // namespace fapi @@ -750,4 +766,306 @@ fapi::ReturnCode fapiPlatGetSingleMemberEnableAttr( #define ATTR_EX_L2_SINGLE_MEMBER_ENABLE_GETMACRO( ID, PTARGET, VAL ) \ fapi::platAttrSvc::fapiPlatGetSingleMemberEnableAttr ( PTARGET, VAL ) +// TODO: RTC 69935 complete Phase Rotator Data. +// Use this code to fully implements 59048. +// Remove Phase Rotator attributes from attribute_types.xml +// and target_types.xml then enable the following. +// The "sets" are only needed to temporarily allow mss_eff_config_termination.C +// to do FAPI_ATTR_SET, but need to be removed when fully complete. +#define RTC69935 0 +#if RTC69935 +//------------------------------------------------------------------------------ +// MACROS to support MBVPD Phase Rotator attributes +//------------------------------------------------------------------------------ +#define ATTR_EFF_CEN_PHASE_ROT_M0_CLK_P0_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M0_CLK_P0, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M0_CLK_P1_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M0_CLK_P1, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M1_CLK_P0_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M1_CLK_P0, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M1_CLK_P1_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M1_CLK_P1, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A0_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_A0, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A1_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_A1, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A2_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_A2, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A3_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_A3, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A4_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_A4, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A5_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_A5, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A6_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_A6, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A7_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_A7, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A8_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_A8, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A9_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_A9, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A10_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_A10, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A11_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_A11, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A12_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_A12, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A13_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_A13, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A14_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_A14, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A15_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_A15, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA0_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_BA0, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA1_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_BA1, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA2_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_BA2, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_CASN_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_CASN, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_RASN_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_RASN, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_WEN_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_CMD_WEN, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_PAR_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_PAR, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M_ACTN_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M_ACTN, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE0_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M0_CNTL_CKE0, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE1_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M0_CNTL_CKE1, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE2_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M0_CNTL_CKE2, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE3_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M0_CNTL_CKE3, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN0_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M0_CNTL_CSN0, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN1_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M0_CNTL_CSN1, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN2_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M0_CNTL_CSN2, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN3_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M0_CNTL_CSN3, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_ODT0_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M0_CNTL_ODT0, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_ODT1_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M0_CNTL_ODT1, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE0_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M1_CNTL_CKE0, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE1_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M1_CNTL_CKE1, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE2_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M1_CNTL_CKE2, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE3_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M1_CNTL_CKE3, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN0_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M1_CNTL_CSN0, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN1_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M1_CNTL_CSN1, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN2_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M1_CNTL_CSN2, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN3_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M1_CNTL_CSN3, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_ODT0_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M1_CNTL_ODT0, VAL) +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_ODT1_GETMACRO(ID, PTARGET, VAL)\ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\ + (PTARGET, PHASE_ROT_M1_CNTL_ODT1, VAL) +// TODO: RTC 69935: remove the no op sets once work around in +// mss_eff_config_termination.C is removed +#define ATTR_EFF_CEN_PHASE_ROT_M0_CLK_P0_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M0_CLK_P1_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M1_CLK_P0_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M1_CLK_P1_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A0_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A1_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A2_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A3_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A4_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A5_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A6_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A7_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A8_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A9_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A10_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A11_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A12_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A13_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A14_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_A15_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA0_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA1_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA2_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_CASN_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_RASN_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_CMD_WEN_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_PAR_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M_ACTN_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE0_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE1_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE2_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE3_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN0_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN1_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN2_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN3_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_ODT0_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_ODT1_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE0_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE1_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE2_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE3_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN0_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN1_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN2_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN3_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_ODT0_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#define ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_ODT1_SETMACRO(ID, PTARGET, VAL)\ + fapi::FAPI_RC_SUCCESS +#endif #endif // FAPIPLATATTRIBUTESERVICE_H_ diff --git a/src/include/usr/vpd/cvpdenums.H b/src/include/usr/vpd/cvpdenums.H index 2f52ee07a..3a2516f7b 100644 --- a/src/include/usr/vpd/cvpdenums.H +++ b/src/include/usr/vpd/cvpdenums.H @@ -36,6 +36,7 @@ namespace CVPD VEIR = CVPD_FIRST_RECORD, VER0 = 0x01, MER0 = 0x02, + VSPD = 0x03, // Last Record CVPD_LAST_RECORD, CVPD_TEST_RECORD, // Test purposes ONLY! @@ -51,6 +52,13 @@ namespace CVPD CVPD_FIRST_KEYWORD = 0x00, pdI = CVPD_FIRST_KEYWORD, PF = 0x01, + MT = 0x02, + MR = 0x03, + pdA = 0x04, + EL = 0x05, + LM = 0x06, + MW = 0x07, + MV = 0x08, // Last Keyword CVPD_LAST_KEYWORD, CVPD_TEST_KEYWORD, // Test purposes ONLY! diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.C new file mode 100644 index 000000000..f81554342 --- /dev/null +++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.C @@ -0,0 +1,145 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.C $ */ +/* */ +/* 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: getMBvpdPhaseRotatorData.C,v 1.2 2013/04/29 16:44:00 whs Exp $ +/** + * @file getMBvpdPhaseRotatorData.C + * + * @brief get Phase Rotator Data from MBvpd MR keyword + * + */ + +#include <stdint.h> + +// fapi support +#include <fapi.H> +#include <getMBvpdPhaseRotatorData.H> + +extern "C" +{ +using namespace fapi; + +fapi::ReturnCode getMBvpdPhaseRotatorData( + const fapi::Target &i_mbaTarget, + const fapi::MBvpdPhaseRotatorData i_attr, + uint8_t (&o_val)[2]) + +{ + + //MR keyword layout + const uint8_t NUM_MBA = 2; //There are 2 MBAs per Centaur memory buffer + const uint8_t NUM_PORTS = 2; //Each MBA has 2 ports + const uint8_t PHASE_ROTATOR_ATTR_SIZE = 64; //Each port has 64 bytes + // for attributes + struct port_attributes + { + uint8_t port_attr[PHASE_ROTATOR_ATTR_SIZE]; + }; + struct mba_attributes + { + port_attributes mba_port[NUM_PORTS]; + }; + struct mr_keyword + { + mba_attributes mb_mba[NUM_MBA]; + }; + // The actual size of the MR keword is 255 bytes, which is one byte short + // of the mr_keyword struct. One byte is used for the size in the vpd. + // As long as there is at least one reserved attribute, then all will fit. + + fapi::ReturnCode l_fapirc; + fapi::Target l_mbTarget; + uint8_t l_pos = NUM_PORTS; //initialize to out of range value (+1) + mr_keyword * l_pMrBuffer = NULL; // MBvpd MR keyword buffer + uint32_t l_MrBufsize = sizeof(mr_keyword); + + FAPI_DBG("getMBvpdPhaseRotatorData: entry attr=0x%02x ", + i_attr ); + + do { + // find the position of the passed mba on the centuar + l_fapirc = FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS,&i_mbaTarget,l_pos); + if (l_fapirc) + { + FAPI_ERR(" getMBvpdPhaseRotatorData: Get MBA position failed "); + break; // break out with fapirc + } + FAPI_DBG("getMBvpdPhaseRotatorData: mba %s position=%d", + i_mbaTarget.toEcmdString(), + l_pos); + + // find the Centaur memmory buffer from the passed MBA + l_fapirc = fapiGetParentChip (i_mbaTarget,l_mbTarget); + if (l_fapirc) + { + FAPI_ERR("getMBvpdPhaseRotatorData: Finding the parent mb failed "); + break; // break out with fapirc + } + FAPI_DBG("getMBvpdPhaseRotatorData: parent path=%s ", + l_mbTarget.toEcmdString() ); + + // Read the MR keyword field + l_pMrBuffer = new mr_keyword; + + l_fapirc = fapiGetMBvpdField(fapi::MBVPD_RECORD_VSPD, + fapi::MBVPD_KEYWORD_MR, + l_mbTarget, + reinterpret_cast<uint8_t *>(l_pMrBuffer), + l_MrBufsize); + if (l_fapirc) + { + FAPI_ERR("getMBvpdPhaseRotatorData: Read of MR keyword failed"); + break; // break out with fapirc + } + + // Check that sufficient MR was returned. + uint32_t l_sizeNeeded = l_pos*sizeof(mba_attributes)+ + sizeof(port_attributes)+i_attr; + if (l_MrBufsize < l_sizeNeeded ) + { + FAPI_ERR("getMBvpdPhaseRotatorData:" + " less MR keyword returned than expected %d < %d", + l_MrBufsize, l_sizeNeeded); + FAPI_SET_HWP_ERROR(l_fapirc, RC_MBVPD_INSUFFICIENT_MR_KEYWORD ); + break; // break out with fapirc + } + + // return the requested attributes from the MR keyword buffer + for (uint8_t l_port=0 ; l_port<NUM_PORTS ; l_port++) + { + o_val[l_port]=l_pMrBuffer-> + mb_mba[l_pos].mba_port[l_port].port_attr[i_attr]; + } + + } while (0); + + delete l_pMrBuffer; + l_pMrBuffer = NULL; + + FAPI_DBG("getMBvpdPhaseRotatorData: exit rc=0x%08x (0x%02x,0x%02x)", + static_cast<uint32_t>(l_fapirc), + o_val[0],o_val[1] ); + + return l_fapirc; +} + +} // extern "C" diff --git a/src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk b/src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk index 14a6c4ac9..f12fdc1dc 100644 --- a/src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk +++ b/src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk @@ -28,5 +28,6 @@ VPATH += mvpd_accessors OBJS += getMvpdRing.o \ setMvpdRing.o \ mvpdRingFuncs.o \ - getMvpdExL2SingleMemberEnable.o + getMvpdExL2SingleMemberEnable.o \ + getMBvpdPhaseRotatorData.o diff --git a/src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml b/src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml index 6730025b2..88b48c270 100644 --- a/src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml +++ b/src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml @@ -20,23 +20,23 @@ <!-- Origin: 30 --> <!-- --> <!-- IBM_PROLOG_END_TAG --> -<!-- $Id: mvpd_errors.xml,v 1.3 2013/04/10 22:02:54 mjjones Exp $ --> +<!-- $Id: mvpd_errors.xml,v 1.4 2013/04/29 16:06:37 whs Exp $ --> <hwpErrors> - <!-- *********************************************************************** --> + <!-- ********************************************************************* --> <hwpError> <rc>RC_REPAIR_RING_INVALID_RINGBUF_PTR</rc> <description> Invalid input parameter: pointer to ringbuffer was NULL </description> </hwpError> - <!-- *********************************************************************** --> + <!-- ********************************************************************* --> <hwpError> <rc>RC_REPAIR_RING_ALLOC_FAIL</rc> <description> Failed to allocate buffer space for repair ring data </description> </hwpError> - <!-- *********************************************************************** --> + <!-- ********************************************************************* --> <hwpError> <rc>RC_REPAIR_RING_INVALID_MAGIC</rc> <description> @@ -44,14 +44,14 @@ </description> <ffdc>MAGIC</ffdc> </hwpError> - <!-- *********************************************************************** --> + <!-- ********************************************************************* --> <hwpError> <rc>RC_REPAIR_RING_INVALID_SIZE</rc> <description> - Invalid input parameter: size of buffer was not big enough to copy repair ring data + Invalid input parameter: buffer too small to copy repair ring data </description> </hwpError> - <!-- *********************************************************************** --> + <!-- ********************************************************************* --> <hwpError> <rc>RC_REPAIR_RING_NOT_FOUND</rc> <description> @@ -60,21 +60,21 @@ <ffdc>RING_MODIFIER</ffdc> <ffdc>CHIPLET_ID</ffdc> </hwpError> - <!-- *********************************************************************** --> + <!-- ********************************************************************* --> <hwpError> <rc>RC_MVPD_RING_FUNC_INVALID_PARAMETER</rc> <description> An invalid parameter was passed to a mvpd ring function. </description> </hwpError> - <!-- *********************************************************************** --> + <!-- ********************************************************************* --> <hwpError> <rc>RC_MVPD_RING_FUNC_INSUFFICIENT_RECORD_SPACE</rc> <description> Insufficient room in the record to set the requested ring. </description> </hwpError> - <!-- *********************************************************************** --> + <!-- ********************************************************************* --> <hwpError> <rc>RC_MVPD_EX_L2_SINGLE_MEMBER_ENABLE_BAD_FIELD_SIZE</rc> <description> @@ -82,4 +82,11 @@ </description> <ffdc>FIELD_SIZE</ffdc> </hwpError> + <!-- ********************************************************************* --> + <hwpError> + <rc>RC_MBVPD_INSUFFICIENT_MR_KEYWORD</rc> + <description> + MR keyword record returned is smaller than expected. + </description> + </hwpError> </hwpErrors> diff --git a/src/usr/hwpf/plat/fapiPlatAttributeService.C b/src/usr/hwpf/plat/fapiPlatAttributeService.C index 567cffcc9..f98043756 100644 --- a/src/usr/hwpf/plat/fapiPlatAttributeService.C +++ b/src/usr/hwpf/plat/fapiPlatAttributeService.C @@ -41,6 +41,7 @@ #include <vpd/spdenums.H> #include <devicefw/driverif.H> #include <hwpf/hwp/mvpd_accessors/getMvpdExL2SingleMemberEnable.H> +#include <hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.H> // The following file checks at compile time that all HWPF attributes are // handled by Hostboot. This is done to ensure that the HTML file listing @@ -1205,6 +1206,17 @@ fapi::ReturnCode fapiPlatGetSingleMemberEnableAttr( return l_rc; } +fapi::ReturnCode fapiPlatGetPhaseRotatorData ( + const fapi::Target * i_pTarget, + const fapi::MBvpdPhaseRotatorData i_attr, + uint8_t (&o_val) [2] ) +{ + // Call a VPD Accessor HWP to get the data + fapi::ReturnCode l_rc; + FAPI_EXEC_HWP(l_rc, getMBvpdPhaseRotatorData, *i_pTarget, i_attr, o_val); + return l_rc; +} + fapi::ReturnCode fapiPlatGetEnableAttr ( fapi::AttributeId i_id, const fapi::Target * i_pFapiTarget, uint8_t & o_enable ) { diff --git a/src/usr/hwpf/plat/fapiPlatMBvpdAccess.C b/src/usr/hwpf/plat/fapiPlatMBvpdAccess.C index f04029038..5ddf458de 100644 --- a/src/usr/hwpf/plat/fapiPlatMBvpdAccess.C +++ b/src/usr/hwpf/plat/fapiPlatMBvpdAccess.C @@ -58,6 +58,7 @@ fapi::ReturnCode MBvpdRecordXlate(const fapi::MBvpdRecord i_fapiRecord, CVPD::VEIR, CVPD::VER0, CVPD::MER0, + CVPD::VSPD, }; const uint8_t NUM_MBVPD_RECORDS = sizeof(mbvpdFapiRecordToHbRecord)/sizeof(mbvpdFapiRecordToHbRecord[0]); @@ -108,6 +109,14 @@ fapi::ReturnCode MBvpdKeywordXlate(const fapi::MBvpdKeyword i_fapiKeyword, mbvpdFapiKeywordToHbKeyword[] = { CVPD::pdI, + CVPD::PF, + CVPD::MT, + CVPD::MR, + CVPD::pdA, + CVPD::EL, + CVPD::LM, + CVPD::MW, + CVPD::MV, }; const uint8_t NUM_MBVPD_KEYWORDS = sizeof(mbvpdFapiKeywordToHbKeyword)/sizeof(mbvpdFapiKeywordToHbKeyword[0]); diff --git a/src/usr/hwpf/test/fapiwinkletest.H b/src/usr/hwpf/test/fapiwinkletest.H index ffc6cdb7a..6a164f402 100644 --- a/src/usr/hwpf/test/fapiwinkletest.H +++ b/src/usr/hwpf/test/fapiwinkletest.H @@ -25,7 +25,11 @@ #define __FAPIWINKLETEST_H // set to 1 for doing unit tests, set to 0 for production -#define RTC51716 0 +#define UNITTESTfwt 0 +// TODO: RTC 69935 complete Phase Rotator Data +// use the code in the 1 path until 69935 fully implements 59048. +// Then the 1 path code can be removed and use the 0 path. +#define RTC69935fwt 1 /** * @file fapiwinkletest.H * @@ -42,6 +46,7 @@ #include <getMvpdRing.H> #include <setMvpdRing.H> +#include <mvpd_accessors/getMBvpdPhaseRotatorData.H> #include <errl/errlmanager.H> #include <errl/errlentry.H> @@ -102,7 +107,6 @@ public: // cast OUR type of target to a FAPI type of target. fapi::Target l_fapi_cpu_target( TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> (const_cast<TARGETING::Target*>(l_cpu_target)) ); // loop through mvpd records of interest @@ -176,6 +180,14 @@ public: { MBVPD_RECORD_VEIR, MBVPD_KEYWORD_PDI}, // { MBVPD_RECORD_VER0, MBVPD_KEYWORD_PDI},//in spec, not supported { MBVPD_RECORD_MER0, MBVPD_KEYWORD_PDI}, + { MBVPD_RECORD_VSPD, MBVPD_KEYWORD_PDI}, + { MBVPD_RECORD_VSPD, MBVPD_KEYWORD_MT}, + { MBVPD_RECORD_VSPD, MBVPD_KEYWORD_MR}, + { MBVPD_RECORD_VSPD, MBVPD_KEYWORD_PDA}, + { MBVPD_RECORD_VSPD, MBVPD_KEYWORD_EL}, + { MBVPD_RECORD_VSPD, MBVPD_KEYWORD_LM}, + { MBVPD_RECORD_VSPD, MBVPD_KEYWORD_MW}, + { MBVPD_RECORD_VSPD, MBVPD_KEYWORD_MV}, }; TS_TRACE( "testGetMBvpd entry" ); @@ -200,7 +212,6 @@ public: // cast OUR type of target to a FAPI type of target. fapi::Target l_fapi_mb_target( TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> (const_cast<TARGETING::Target*>(l_mb_target)) ); // loop through mvpd records of interest @@ -247,7 +258,14 @@ public: free( l_pRecord ); return; } - +#if UNITTESTmft + TRACFCOMP(g_trac_test,"testMBvpd:Record=%d,Keyword=%d", + l_mbvpdRecords[i].record, + l_mbvpdRecords[i].keyword); + TRACFBIN(g_trac_test,"testMBvpd:DumpRecord:", + l_pRecord, + l_len ); +#endif // call fapiSetMvpdField l_fapirc = fapiSetMBvpdField(l_mbvpdRecords[i].record, l_mbvpdRecords[i].keyword, @@ -271,6 +289,950 @@ public: } + /** + * @brief call fapiGetMBvpdField to fetch memory buffer vpd records. + * + */ + void testGetPhaseRotatorData() + { + fapi::ReturnCode l_fapirc( fapi::FAPI_RC_SUCCESS ); + const uint8_t PORT_SIZE = 2; + uint8_t l_attr_eff_cen_phase_rot[PORT_SIZE]; +#if RTC69935fwt + getMBvpdPhaseRotatorData_FP_t (l_getMBvpdPhaseRotatorData) + = &getMBvpdPhaseRotatorData; +#endif + + TS_TRACE( "testGetPhaseRotatorData entry" ); + + TARGETING::TargetHandleList l_memBufList; + getAllChips(l_memBufList, TYPE_MEMBUF); + + TS_TRACE( "testGetPhaseRotatorData l_memBufList.size()=%d", + l_memBufList.size() ); + + // loop thru memory buffers +#if UNITTESTfwt + uint8_t l_mbNum = 0; // check them all in unit test +#else + uint8_t l_mbNum = (l_memBufList.size() > 0) ? l_memBufList.size()-1 : 0; +#endif + for (; l_mbNum < l_memBufList.size(); l_mbNum++ ) + { + TARGETING::TargetHandleList l_mbaList; + getChildAffinityTargets(l_mbaList,l_memBufList[l_mbNum], + CLASS_UNIT,TYPE_MBA,false); + + TS_TRACE( "testGetPhaseRotatorData l_mbaBufList.size()=%d", + l_mbaList.size()); + + // loop thru all the mbas (should be 2) +#if UNITTESTfwt + uint8_t l_mbaNum = 0; // check them all in unit test +#else + uint8_t l_mbaNum = (l_mbaList.size() > 0) ? l_mbaList.size()-1:0 ; +#endif + for (; l_mbaNum < l_mbaList.size(); l_mbaNum++ ) + { + // dump physical path to target + EntityPath l_path; + l_path = l_mbaList[l_mbaNum]->getAttr<ATTR_PHYS_PATH>(); + l_path.dump(); + + // cast OUR type of target to a FAPI type of target. + fapi::Target l_fapi_mba_target( + TARGET_TYPE_MBA_CHIPLET, + (const_cast<TARGETING::Target*>(l_mbaList[l_mbaNum])) ); + + // verify getting all attributes +#if RTC69935fwt + // getting all the attributes is a bit of over kill. + // cen_ddrphy.initfile accesses all the values + // the exhaustive test is good for unit test + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M0_CLK_P0, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M0_CLK_P0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); +#if UNITTESTfwt + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M0_CLK_P1, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M0_CLK_P1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M1_CLK_P0, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M1_CLK_P0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M1_CLK_P1, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M1_CLK_P1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_A0, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_A1, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_A2, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A2=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_A3, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A3=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_A4, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A4=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_A5, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A5=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_A6, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A6=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_A7, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A7=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_A8, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A8=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_A9, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A9=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_A10, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A10=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_A11, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A11=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_A12, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A12=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_A13, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A13=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_A14, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A14=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_A15, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A15=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_BA0, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_BA1, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_BA2, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA2=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_CASN, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_CASN=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_RASN, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_RASN=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_CMD_WEN, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_WEN=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_PAR, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_PAR=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M_ACTN, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M_ACTN=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M0_CNTL_CKE0, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M0_CNTL_CKE1, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M0_CNTL_CKE2, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE2=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M0_CNTL_CKE3, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE3=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M0_CNTL_CSN0, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M0_CNTL_CSN1, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M0_CNTL_CSN2, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN2=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M0_CNTL_CSN3, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN3=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M0_CNTL_ODT0, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_ODT0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M0_CNTL_ODT1, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_ODT1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M1_CNTL_CKE0, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M1_CNTL_CKE1, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M1_CNTL_CKE2, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE2=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M1_CNTL_CKE3, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE3=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M1_CNTL_CSN0, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M1_CNTL_CSN1, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M1_CNTL_CSN2, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN2=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M1_CNTL_CSN3, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN3=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M1_CNTL_ODT0, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_ODT0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target, + fapi::PHASE_ROT_M1_CNTL_ODT1, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData accessor" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_ODT1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); +#endif +#else + // getting all the attributes is a bit of over kill. + // cen_ddrphy.initfile accesses all the values + // the exhaustive test is good for unit test + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M0_CLK_P0, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M0_CLK_P0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); +#if UNITTESTfwt + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M0_CLK_P1, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M0_CLK_P1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M1_CLK_P0, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M1_CLK_P0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M1_CLK_P1, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M1_CLK_P1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_A0, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_A1, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_A2, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A2=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_A3, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A3=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_A4, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A4=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_A5, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A5=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_A6, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A6=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_A7, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A7=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_A8, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A8=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_A9, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A9=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_A10, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A10=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_A11, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A11=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_A12, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A12=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_A13, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A13=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_A14, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A14=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_A15, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_A15=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA0, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA1, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA2, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA2=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_CASN, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_CASN=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_RASN, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_RASN=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_CMD_WEN, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_CMD_WEN=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_PAR, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_PAR=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M_ACTN, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M_ACTN=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE0, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE1, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE2, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE2=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE3, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE3=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN0, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN1, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN2, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN2=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN3, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN3=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_ODT0, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_ODT0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_ODT1, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_ODT1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE0, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE1, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE2, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE2=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE3, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE3=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN0, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN1, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN2, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN2=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN3, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN3=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_ODT0, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_ODT0=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); + + l_fapirc = FAPI_ATTR_GET(ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_ODT1, + &l_fapi_mba_target, + l_attr_eff_cen_phase_rot); + if (l_fapirc) break; + TS_TRACE( "testGetPhaseRotatorData" + " ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_ODT1=(0x%02x,0x%02x)", + l_attr_eff_cen_phase_rot[0], + l_attr_eff_cen_phase_rot[1]); +#endif +#endif + } + if (l_fapirc) + { + TS_FAIL( "fapiGetPhaseRotatorData: FAPI_ATTR_GET fail rc=0x%x", + static_cast<uint32_t>(l_fapirc) ); + fapiLogError(l_fapirc); + } + } + + + TS_TRACE( "testGetPhaseRotatorData exit" ); + + } + + // Structure used to save/restore the VPD typedef struct saveRestoreData_t { TARGETING::Target* target; @@ -403,13 +1365,9 @@ public: // add to the master list l_srData.push_back(tmpsave); - //-- - - // cast OUR type of target to a FAPI type of target. fapi::Target l_fapi_cpu_target( TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> (const_cast<TARGETING::Target*>(l_cpu_target)) ); // allocate some space to put the record(s) diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml index 28f6118de..a62352f1a 100644 --- a/src/usr/targeting/common/xmltohb/attribute_types.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types.xml @@ -8346,8 +8346,9 @@ bits6:7 will be consumed together to form COARSE_LVL. </description> </hwpfToHbAttrMap> </attribute> -<!-- TODO RTC 59048. These phase rotator attributes need to come from CDIMM VPD. For now - they are setup by the mss_eff_config_termination HWP --> +<!-- TODO RTC 69935. These phase rotator attributes need to come from CDIMM VPD + For now, they are setup by the mss_eff_config_termination HWP. + Remove these when valid vpd is on the CDIMMs --> <attribute> <id>EFF_CEN_PHASE_ROT_M0_CLK_P0</id> diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml index 6ce46f37f..91078c0e5 100644 --- a/src/usr/targeting/common/xmltohb/target_types.xml +++ b/src/usr/targeting/common/xmltohb/target_types.xml @@ -838,6 +838,9 @@ <attribute><id>MSS_SLEW_RATE_DATA</id></attribute> <attribute><id>MSS_SLEW_RATE_ADR</id></attribute> <attribute><id>MSS_ALLOW_SINGLE_PORT</id></attribute> +<!-- TODO RTC 69935. These phase rotator attributes need to come from CDIMM VPD + For now, they are setup by the mss_eff_config_termination HWP. + Remove these when valid vpd is on the CDIMMs --> <attribute><id>EFF_CEN_PHASE_ROT_M0_CLK_P0</id></attribute> <attribute><id>EFF_CEN_PHASE_ROT_M0_CLK_P1</id></attribute> <attribute><id>EFF_CEN_PHASE_ROT_M1_CLK_P0</id></attribute> diff --git a/src/usr/vpd/cvpd.H b/src/usr/vpd/cvpd.H index b50b97bad..5445df475 100644 --- a/src/usr/vpd/cvpd.H +++ b/src/usr/vpd/cvpd.H @@ -64,6 +64,7 @@ namespace CVPD { VEIR, "VEIR" }, { VER0, "VER0" }, //Not currently used, but keep support { MER0, "MER0" }, + { VSPD, "VSPD" }, // ------------------------------------------------------------------- // DO NOT USE!! This is for test purposes ONLY! { CVPD_TEST_RECORD, "TEST" }, @@ -84,6 +85,13 @@ namespace CVPD // ------------------------------------------------------------------- { pdI, "#I" }, { PF, "PF" }, + { MT, "MT" }, + { MR, "MR" }, + { pdA, "#A" }, + { EL, "EL" }, + { LM, "LM" }, + { MW, "MW" }, + { MV, "MV" }, // ------------------------------------------------------------------- // DO NOT USE!! This is for test purposes ONLY! { CVPD_TEST_KEYWORD, "XX" }, diff --git a/src/usr/vpd/makefile b/src/usr/vpd/makefile index db17207a6..78bb8453b 100644 --- a/src/usr/vpd/makefile +++ b/src/usr/vpd/makefile @@ -29,6 +29,6 @@ SUBDIRS = test.d BINARY_FILES = $(IMGDIR)/dimmspd.dat:9a6e6b6a7f6d3fc77a12d38537279d402124d699 BINARY_FILES += $(IMGDIR)/procmvpd.dat:9473e24c02c40a577700ae0292676c4b82698c13 -BINARY_FILES += $(IMGDIR)/cvpd.dat:199b4db0140c2021c82c73b88d7516dde52a2718 +BINARY_FILES += $(IMGDIR)/cvpd.dat:2e60fd37c773399e2a30633459aa5852c99b4e18 include ${ROOTPATH}/config.mk diff --git a/src/usr/vpd/test/cvpdtest.H b/src/usr/vpd/test/cvpdtest.H index b9bdf2e7d..3429a6117 100755 --- a/src/usr/vpd/test/cvpdtest.H +++ b/src/usr/vpd/test/cvpdtest.H @@ -64,6 +64,14 @@ cvpdTestData cvpdData[] = { { CVPD::VEIR, CVPD::pdI }, { CVPD::MER0, CVPD::pdI }, + { CVPD::VSPD, CVPD::pdI }, + { CVPD::VSPD, CVPD::MT }, + { CVPD::VSPD, CVPD::MR }, + { CVPD::VSPD, CVPD::pdA }, + { CVPD::VSPD, CVPD::EL }, + { CVPD::VSPD, CVPD::LM }, + { CVPD::VSPD, CVPD::MW }, + { CVPD::VSPD, CVPD::MV }, }; |