summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Schwartz <whs@us.ibm.com>2013-08-15 16:40:38 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-09-13 12:57:46 -0500
commitfe7854394eb388e40bd94b7b4398003b6ac3b268 (patch)
tree8dba2bfd9801ff56161a47c954e8784079a6f9f9
parent0b823dd9ef5579112cbbaae770028c75f7d19119 (diff)
downloadtalos-hostboot-fe7854394eb388e40bd94b7b4398003b6ac3b268.tar.gz
talos-hostboot-fe7854394eb388e40bd94b7b4398003b6ac3b268.zip
VPD Accessor functions for Clock Mapping, DIMM timing and TSYS VPD Attributes
Extend existing CDIMM hwp accessors for MR and MT keywords to add support for 7 new attributes. Based on vpd level 6.0 with work around driven by vpd version to also support vpd level 5.3 definition. FSP change to add cvpd record VINI to PNOR is 897882 Change-Id: I02b3a0ade288c6b75918ad1d99257c5a042fc18d RTC: 79615 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5805 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r--src/include/usr/hwpf/fapi/fapiMBvpdAccess.H2
-rw-r--r--src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.H67
-rw-r--r--src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.H54
-rw-r--r--src/include/usr/hwpf/plat/fapiPlatAttributeService.H46
-rw-r--r--src/include/usr/vpd/cvpdenums.H2
-rw-r--r--src/usr/hwpf/hwp/memory_attributes.xml70
-rw-r--r--src/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.C93
-rw-r--r--src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C146
-rw-r--r--src/usr/hwpf/plat/fapiPlatMBvpdAccess.C2
-rw-r--r--src/usr/hwpf/test/fapiwinkletest.H160
-rw-r--r--src/usr/vpd/cvpd.H2
-rw-r--r--src/usr/vpd/makefile2
-rwxr-xr-xsrc/usr/vpd/test/cvpdtest.H1
13 files changed, 617 insertions, 30 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H b/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H
index 1370fee0c..270b48dff 100644
--- a/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H
+++ b/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H
@@ -53,6 +53,7 @@ namespace fapi
MBVPD_RECORD_VER0 = 0x01,
MBVPD_RECORD_MER0 = 0x02,
MBVPD_RECORD_VSPD = 0x03,
+ MBVPD_RECORD_VINI = 0x04,
};
enum MBvpdKeyword
@@ -67,6 +68,7 @@ namespace fapi
MBVPD_KEYWORD_MW = 0x07,
MBVPD_KEYWORD_MV = 0x08,
MBVPD_KEYWORD_AM = 0x09,
+ MBVPD_KEYWORD_VZ = 0x0a,
};
}
diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.H
index 88616a179..cb07272af 100644
--- a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.H
+++ b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.H
@@ -36,8 +36,35 @@
namespace fapi
{
+// The MBvpdPhaseRotatorData enumeration is used on the FAPI_ATTR_GET and
+// getMBvpdPhaseRotatorData HWP accessor interface. The lower byte (6 bits)
+// matches the offset of the vpd field in the MR keyword. This is a convenient
+// use of the value for efficiency to index into the vpd keyword data.
+//
+// Most of the attributes are byte values and can be returned to the requester
+// directly. There are some that require special processing. For those, a
+// special processing flag is added into the value. This also distinguishes
+// values which have the same offset.
-// values match offset into MR keyword data
+// special processing flags to be added on to the MBvpdPhaseRotatorData value
+ enum MBvpdPhaseRotatorSpecial
+ {
+ PHASE_ROT_HIGH_NIBBLE = 0x0100, //bits 4:7 shifted right 4
+ PHASE_ROT_LOW_NIBBLE = 0x0200, //bits 0:3
+ PHASE_ROT_PORT00=0x0300, // return vpd port 0 value for 0 and 1
+ PHASE_ROT_PORT11=0x0400, // return vpd port 1 value for 0 and 1
+ };
+// mask to isolate special processing flags
+const uint16_t PHASE_ROT_SPECIAL_MASK = 0x0700;
+
+// The offset changed for some of the attributes going from v5.3 of the vpd
+// layout to v6.0 and after. There is a work around to use the proper offset
+// based on the version
+// Flag to be added into MBvpdPhaseRotatorData value for attributes that need
+// to be checked for the work around.
+const uint8_t PHASE_ROT_CHK60 = 0x40; // check version for offset to use
+
+// base values match offset into MR keyword data
enum MBvpdPhaseRotatorData
{
PHASE_ROT_M0_CLK_P0 = 0x00,
@@ -88,11 +115,24 @@ namespace fapi
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.
+ // DRAM_2N_MODE reserved = 0x30,
+ PHASE_ROT_TSYS_ADR = 0x31 | PHASE_ROT_CHK60 | PHASE_ROT_PORT00,
+ PHASE_ROT_TSYS_DP18 = 0x31 | PHASE_ROT_CHK60 | PHASE_ROT_PORT11,
+// Use these offsets for vpd less than version 6.0
+ PHASE_ROT_RLO_V53 = 0x31 | PHASE_ROT_HIGH_NIBBLE,
+ PHASE_ROT_WLO_V53 = 0x31 | PHASE_ROT_LOW_NIBBLE,
+ PHASE_ROT_GPO_V53= 0x32,
+ PHASE_ROT_TSYS_ADR_V53 = 0x33 | PHASE_ROT_PORT00,
+ PHASE_ROT_TSYS_DP18_V53 = 0x33 | PHASE_ROT_PORT11,
+ // invalid value
+ PHASE_ROT_INVALID = 0x3f,
};
}
+// The max base offset value is 0x3e. 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. See diagram below...
+const uint8_t PHASE_ROT_OFFSET_MASK = 0x003f; // mask attr to isolate base
+ // vpd offsetk
// function pointer typedef definition for HWP call support
typedef fapi::ReturnCode (*getMBvpdPhaseRotatorData_FP_t)
@@ -108,6 +148,25 @@ extern "C"
* 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.
+ * The Termination Data attributes are retrieved from cvpd record VSPD
+ * keyword MT.
+ *
+ * cpvd record VSPD keyword MR
+ * -----------------------------------
+ * | mba position 0 |
+ * | ----------------------------- |
+ * | | port 0 (Port A) 64 bytes | |
+ * | |---------------------------| |
+ * | | port 1 (Port B) 64 bytes | |
+ * | ----------------------------- |
+ * |---------------------------------|
+ * | mba postion 1 |
+ * | ----------------------------- |
+ * | | port 0 (Port C) 64 bytes | |
+ * | |---------------------------| |
+ * | | port 1 (Port D) 63 bytes | |
+ * | ----------------------------- |
+ * -----------------------------------
*
* @param i_mbaTarget - mba target
* @param i_attr - Phase Rotator Data attribute enumerator
diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.H
index 57a6f111f..4679bdf30 100644
--- a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.H
+++ b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.H
@@ -37,8 +37,34 @@
namespace fapi
{
-// Values match offset into MT keyword cvpd data
-// There are multiple types of output values. The type is shown in the comment
+// The MBvpdTermData enumeration is used on the FAPI_ATTR_GET and
+// getMBvpdTermData HWP accessor interface. The lower byte (6 bits)
+// matches the offset of the vpd field in the MT keyword. This is a convenient
+// use of the value for efficiency to index into the vpd keyword data.
+//
+// Most of the vpd attribute values can be returned to the requester directly.
+// There are some that require special processing. For those, a
+// special processing flag is added into the value. This also distinguishes
+// values which have the same offset.
+
+// special processing flags to be added on to the MBvpdTermData value
+ enum MBvpdTermDataSpecial
+ {
+ TERM_DATA_HIGH_NIBBLE = 0x0100, //bits 4:7 shifted right 4
+ TERM_DATA_LOW_NIBBLE = 0x0200, //bits 0:3
+ };
+// mask to isolate special processing flags
+const uint16_t TERM_DATA_SPECIAL_MASK = 0x0300;
+
+// The vpd keyword changed for some of the attributes going from v5.3 of the vpd
+// layout to v6.0 and after. There is a work around to use the previous
+// keyword based on the vpd version.
+// Flag to be added into MBvpdTermData value for attributes that need to be
+// checked for work around.
+const uint8_t TERM_DATA_CHK60 = 0x40; // check version for keyword to use
+
+// There are multiple types of output values. The type is shown in the comment.
+// The base offset value is incremented based on the vpd data type.
enum MBvpdTermData
{
TERM_DATA_DRAM_RON = 0x00, //uint8_t [2][2]
@@ -60,11 +86,19 @@ namespace fapi
TERM_DATA_CEN_SLEW_RATE_ADDR = 0x33, //uint8_t [2]
TERM_DATA_CEN_SLEW_RATE_CLK = 0x34, //uint8_t [2]
TERM_DATA_CEN_SLEW_RATE_SPCKE = 0x35, //uint8_t [2]
-// The max value is 0x3e. The MT keyword is 255 bytes divided into four
-// 64 byte sections, but the last one is 1 byte short. There is only room for
-// 63 bytes of attributes per section.
+// TERM_DATA_CKE_PRI_MAP is a uint16 in the vpd data. It is returned as
+// as a uint32. The offset is incremented by only 2 to get the next vpd value.
+ TERM_DATA_CKE_PRI_MAP = 0x36, //uint32_t [2]
+ TERM_DATA_CKE_PWR_MAP = 0x38, //uint32_t [2]
+ TERM_DATA_RLO = 0x3c|TERM_DATA_CHK60|TERM_DATA_HIGH_NIBBLE, //uint8_t[2]
+ TERM_DATA_WLO = 0x3c|TERM_DATA_CHK60|TERM_DATA_LOW_NIBBLE, //uint8_t[2]
+ TERM_DATA_GPO = 0x3d|TERM_DATA_CHK60, //uint8_t[2]
};
}
+// The max base offset value is 0x3e. The MT 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. See diagram below...
+const uint8_t TERM_DATA_OFFSET_MASK = 0x003f; //mask attr to isolate base offset
// Template class that is specialized for each attribute specifying it's type
template<const fapi::MBvpdTermData A>
@@ -107,6 +141,16 @@ template<>class MBvpdTermDataSize<fapi::TERM_DATA_CEN_SLEW_RATE_CLK>
{ public: typedef uint8_t Type[2]; };
template<>class MBvpdTermDataSize<fapi::TERM_DATA_CEN_SLEW_RATE_SPCKE>
{ public: typedef uint8_t Type[2]; };
+template<>class MBvpdTermDataSize<fapi::TERM_DATA_CKE_PRI_MAP>
+ { public: typedef uint32_t Type[2]; };
+template<>class MBvpdTermDataSize<fapi::TERM_DATA_CKE_PWR_MAP>
+ { public: typedef uint32_t Type[2]; };
+template<>class MBvpdTermDataSize<fapi::TERM_DATA_RLO>
+ { public: typedef uint8_t Type[2]; };
+template<>class MBvpdTermDataSize<fapi::TERM_DATA_WLO>
+ { public: typedef uint8_t Type[2]; };
+template<>class MBvpdTermDataSize<fapi::TERM_DATA_GPO>
+ { public: typedef uint8_t Type[2]; };
// Template function that checks that the type is as expected.
// This can be optionally called before calling the main HWP in order
diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
index 670b5125f..270cd543f 100644
--- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
+++ b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
@@ -37,6 +37,8 @@
* 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
+ * whs 08/15/2013 79615 Clock Mapping,
+ * DIMM timing and TSYS
*/
#ifndef FAPIPLATATTRIBUTESERVICE_H_
@@ -553,7 +555,6 @@ fapi::ReturnCode fapiPlatDimmGetSpareDram (
const fapi::Target * i_pTarget,
uint8_t &o_data);
-
} // namespace platAttrSvc
} // namespace fapi
@@ -1203,6 +1204,16 @@ fapi::ReturnCode fapiPlatDimmGetSpareDram (
fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\
fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\
(PTARGET, PHASE_ROT_M1_CNTL_ODT1, VAL)
+#endif
+#define ATTR_VPD_TSYS_ADR_GETMACRO(ID, PTARGET, VAL)\
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\
+ fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\
+ (PTARGET, PHASE_ROT_TSYS_ADR, VAL)
+#define ATTR_VPD_TSYS_DP18_GETMACRO(ID, PTARGET, VAL)\
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\
+ fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetPhaseRotatorData\
+ (PTARGET, PHASE_ROT_TSYS_DP18, VAL)
+#if RTC69935
// 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)\
@@ -1434,7 +1445,38 @@ fapi::ReturnCode fapiPlatDimmGetSpareDram (
(checkTermDataType<fapi::TERM_DATA_CEN_SLEW_RATE_SPCKE>(VAL), \
fapi::platAttrSvc::fapiPlatGetTermData\
(PTARGET, fapi::TERM_DATA_CEN_SLEW_RATE_SPCKE , VAL, sizeof(VAL)))
-
+#endif
+#define ATTR_VPD_RLO_GETMACRO(ID, PTARGET, VAL)\
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\
+ fapi::FAPI_RC_SUCCESS :\
+ (checkTermDataType<fapi::TERM_DATA_RLO>(VAL), \
+ fapi::platAttrSvc::fapiPlatGetTermData\
+ (PTARGET, fapi::TERM_DATA_RLO , VAL, sizeof(VAL)))
+#define ATTR_VPD_WLO_GETMACRO(ID, PTARGET, VAL)\
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\
+ fapi::FAPI_RC_SUCCESS :\
+ (checkTermDataType<fapi::TERM_DATA_WLO>(VAL), \
+ fapi::platAttrSvc::fapiPlatGetTermData\
+ (PTARGET, fapi::TERM_DATA_WLO , VAL, sizeof(VAL)))
+#define ATTR_VPD_GPO_GETMACRO(ID, PTARGET, VAL)\
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\
+ fapi::FAPI_RC_SUCCESS :\
+ (checkTermDataType<fapi::TERM_DATA_GPO>(VAL), \
+ fapi::platAttrSvc::fapiPlatGetTermData\
+ (PTARGET, fapi::TERM_DATA_GPO , VAL, sizeof(VAL)))
+#define ATTR_VPD_CKE_PRI_MAP_GETMACRO(ID, PTARGET, VAL)\
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\
+ fapi::FAPI_RC_SUCCESS :\
+ (checkTermDataType<fapi::TERM_DATA_CKE_PRI_MAP>(VAL), \
+ fapi::platAttrSvc::fapiPlatGetTermData\
+ (PTARGET, fapi::TERM_DATA_CKE_PRI_MAP , VAL, sizeof(VAL)))
+#define ATTR_VPD_CKE_PWR_MAP_GETMACRO(ID, PTARGET, VAL)\
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\
+ fapi::FAPI_RC_SUCCESS :\
+ (checkTermDataType<fapi::TERM_DATA_CKE_PWR_MAP>(VAL), \
+ fapi::platAttrSvc::fapiPlatGetTermData\
+ (PTARGET, fapi::TERM_DATA_CKE_PWR_MAP , VAL, sizeof(VAL)))
+#if RTC69935
#define ATTR_EFF_DRAM_RON_SETMACRO(ID, PTARGET, VAL)\
fapi::FAPI_RC_SUCCESS
#define ATTR_EFF_DRAM_RTT_NOM_SETMACRO(ID, PTARGET, VAL)\
diff --git a/src/include/usr/vpd/cvpdenums.H b/src/include/usr/vpd/cvpdenums.H
index 4a8f2821b..52c582976 100644
--- a/src/include/usr/vpd/cvpdenums.H
+++ b/src/include/usr/vpd/cvpdenums.H
@@ -37,6 +37,7 @@ namespace CVPD
VER0 = 0x01,
MER0 = 0x02,
VSPD = 0x03,
+ VINI = 0x04,
// Last Record
CVPD_LAST_RECORD,
CVPD_TEST_RECORD, // Test purposes ONLY!
@@ -60,6 +61,7 @@ namespace CVPD
MW = 0x07,
MV = 0x08,
AM = 0x09,
+ VZ = 0x0a,
// Last Keyword
CVPD_LAST_KEYWORD,
CVPD_TEST_KEYWORD, // Test purposes ONLY!
diff --git a/src/usr/hwpf/hwp/memory_attributes.xml b/src/usr/hwpf/hwp/memory_attributes.xml
index af1fb78d3..a65b076d1 100644
--- a/src/usr/hwpf/hwp/memory_attributes.xml
+++ b/src/usr/hwpf/hwp/memory_attributes.xml
@@ -3642,6 +3642,76 @@ will originates from VPD for custom DIMMs in the MW keyword byte 5 (MSB is on th
-->
<attribute>
+ <id>ATTR_VPD_CKE_PRI_MAP</id>
+ <targetType>TARGET_TYPE_MBA_CHIPLET</targetType>
+ <description>This value comes from the VPD keyword MT bytes 54 and 55 MT(54:55) for the Logical DIMM associated with port A. Bytes 118:119 for port B, 182:183 for port C and 246:247 for port D. In the end, the AB and CD portions form a 32 bit word for each mba to write into the corresponding ddrphy register</description>
+ <valueType>uint32</valueType>
+ <platInit/>
+ <odmVisable/>
+ <array>2</array>
+</attribute>
+
+<attribute>
+ <id>ATTR_VPD_CKE_PWR_MAP</id>
+ <targetType>TARGET_TYPE_MBA_CHIPLET</targetType>
+ <description>This value comes from the VPD keyword MT bytes 56 to 59 MT(56:59) for the Logical DIMM associated with port A. Bytes 120:123 for port B, 184:187 for port C and 248:251 for port D</description>
+ <valueType>uint32</valueType>
+ <platInit/>
+ <odmVisable/>
+ <array>2</array>
+</attribute>
+
+<attribute>
+ <id>ATTR_VPD_GPO</id>
+ <targetType>TARGET_TYPE_MBA_CHIPLET</targetType>
+ <description>This value comes from the VPD keyword MT bytes 61 MT(61) for the Logical DIMM associated with port A. Bytes 125 for port B, 189 for port C and 253 for port D</description>
+ <valueType>uint8</valueType>
+ <platInit/>
+ <odmVisable/>
+ <array>2</array>
+</attribute>
+
+<attribute>
+ <id>ATTR_VPD_RLO</id>
+ <targetType>TARGET_TYPE_MBA_CHIPLET</targetType>
+ <description>This value comes from the VPD keyword MT byte 60 bits 4:7 for the Logical DIMM associated with port A. Byte 124 bits 4:7 for port B, 188 bits 4:7 for port C and 252 bits 4:7 for port D</description>
+ <valueType>uint8</valueType>
+ <platInit/>
+ <odmVisable/>
+ <array>2</array>
+</attribute>
+
+<attribute>
+ <id>ATTR_VPD_WLO</id>
+ <targetType>TARGET_TYPE_MBA_CHIPLET</targetType>
+ <description>This value comes from the VPD keyword MT byte 60 bits 0:3 for the Logical DIMM associated with port A. Byte 124 bits 0:3 for port B, 188 bits 0:3 for port C and 252 bits 0:3 for port D</description>
+ <valueType>uint8</valueType>
+ <platInit/>
+ <odmVisable/>
+ <array>2</array>
+</attribute>
+
+<attribute>
+ <id>ATTR_VPD_TSYS_ADR</id>
+ <targetType>TARGET_TYPE_MBA_CHIPLET</targetType>
+ <description>This value comes from the VPD MR keyword byte 49 for ports A and B and byte 177 for port C and D. This means that all ADR blocks use this value on an mba level</description>
+ <valueType>uint8</valueType>
+ <platInit/>
+ <odmVisable/>
+ <array>2</array>
+</attribute>
+
+<attribute>
+ <id>ATTR_VPD_TSYS_DP18</id>
+ <targetType>TARGET_TYPE_MBA_CHIPLET</targetType>
+ <description>This value comes from the VPD MR keyword byte 113 for ports A and B and byte 241 for port C and D. This means all DP18 blocks use this value on a mba level</description>
+ <valueType>uint8</valueType>
+ <platInit/>
+ <odmVisable/>
+ <array>2</array>
+</attribute>
+
+<attribute>
<id>ATTR_LAB_USE_JTAG_MODE</id>
<targetType>TARGET_TYPE_SYSTEM</targetType>
<description>This attribute controls how the procedures operate in JTAG mode under an environment called cronus flex. For normal operation, this attribute should be set to FALSE. Platforms should initialize this attribute to FALSE.</description>
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.C
index 7df854c2f..a0708b870 100644
--- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.C
+++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.C
@@ -72,8 +72,12 @@ fapi::ReturnCode getMBvpdPhaseRotatorData(
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 ",
+ // Mask off to isolate vpd offset. MBvpdPhaseRatorData value is the offset
+ // into vpd. Also protects against indexing out of bounds.
+ uint8_t l_attrOffset = i_attr & PHASE_ROT_OFFSET_MASK;
+ uint32_t l_special = i_attr & PHASE_ROT_SPECIAL_MASK; // mask off to
+ // isolate special processing flags
+ FAPI_DBG("getMBvpdPhaseRotatorData: entry attr=0x%04x ",
i_attr );
do {
@@ -98,6 +102,57 @@ fapi::ReturnCode getMBvpdPhaseRotatorData(
FAPI_DBG("getMBvpdPhaseRotatorData: parent path=%s ",
l_mbTarget.toEcmdString() );
+ // Check if the old vpd layout is different for this attr
+ if (PHASE_ROT_CHK60 & i_attr) // need to check vpd version for this attr
+ {
+ uint16_t l_vpdVersion = 0;
+ uint32_t l_bufSize = sizeof(l_vpdVersion);
+ const uint16_t VPD_VERSION_V60=0x3130; // Version 6.0 is ascii "10"
+
+ // get vpd version from record VINI keyword VZ
+ l_fapirc = fapiGetMBvpdField(fapi::MBVPD_RECORD_VINI,
+ fapi::MBVPD_KEYWORD_VZ,
+ l_mbTarget,
+ reinterpret_cast<uint8_t *>(&l_vpdVersion),
+ l_bufSize);
+ if (l_fapirc)
+ {
+ FAPI_ERR("getMBvpdPhaseRotatorData: Read of VZ keyword failed");
+ break; // break out with fapirc
+ }
+ FAPI_DBG("getMBvpdPhaseRotatorData: vpd version=0x%08x",
+ l_vpdVersion);
+
+ // Check that sufficient size was returned.
+ if (l_bufSize < sizeof(l_vpdVersion) )
+ {
+ FAPI_ERR("getMBvpdPhaseRotatorData:"
+ " less keyword data returned than expected %d < %d",
+ l_bufSize, sizeof(l_vpdVersion));
+ const uint32_t & KEYWORD = sizeof(l_vpdVersion);
+ const uint32_t & RETURNED_SIZE = l_bufSize;
+ FAPI_SET_HWP_ERROR(l_fapirc,RC_MBVPD_INSUFFICIENT_VPD_RETURNED);
+ break; // break out with fapirc
+ }
+
+ // Check if work around needed
+ if (l_vpdVersion < VPD_VERSION_V60)
+ {
+ // use the v5.3 offsets and special processing
+ if (PHASE_ROT_TSYS_ADR == i_attr)
+ {
+ l_attrOffset=PHASE_ROT_TSYS_ADR_V53 & PHASE_ROT_OFFSET_MASK;
+ l_special=PHASE_ROT_TSYS_ADR_V53 & PHASE_ROT_SPECIAL_MASK;
+ }
+ else if (PHASE_ROT_TSYS_DP18 == i_attr)
+ {
+ l_attrOffset=PHASE_ROT_TSYS_DP18_V53 &
+ PHASE_ROT_OFFSET_MASK;
+ l_special=PHASE_ROT_TSYS_DP18_V53 & PHASE_ROT_SPECIAL_MASK;
+ }
+ }
+ }
+
// Read the MR keyword field
l_pMrBuffer = new mr_keyword;
@@ -124,13 +179,39 @@ fapi::ReturnCode getMBvpdPhaseRotatorData(
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++)
+ // pull data from MR keyword buffer
+ uint8_t l_port0=
+ l_pMrBuffer->mb_mba[l_pos].mba_port[0].port_attr[l_attrOffset];
+ uint8_t l_port1=
+ l_pMrBuffer->mb_mba[l_pos].mba_port[1].port_attr[l_attrOffset];
+ switch (l_special)
{
- o_val[l_port]=l_pMrBuffer->
- mb_mba[l_pos].mba_port[l_port].port_attr[i_attr];
+ case PHASE_ROT_LOW_NIBBLE: // return low nibble
+ l_port0 = l_port0 & 0x0F;
+ l_port1 = l_port1 & 0x0F;
+ break;
+
+ case PHASE_ROT_HIGH_NIBBLE: // return high nibble
+ l_port0 = ((l_port0 & 0xF0)>>4);
+ l_port1 = ((l_port1 & 0xF0)>>4);
+ break;
+
+ case PHASE_ROT_PORT00: // return port 0 for both ports 0 and 1
+ l_port1=l_port0;
+ break;
+
+ case PHASE_ROT_PORT11:// return port 1 for both ports 0 and 1
+ l_port0=l_port1;
+ break;
+
+ default:
+ ; // data is ok directly from MR keyword buffer
}
+ // return the requested attributes from the MR keyword buffer
+ o_val[0]=l_port0;
+ o_val[1]=l_port1;
+
} while (0);
delete l_pMrBuffer;
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C
index 7723d38cf..7e2713e86 100644
--- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C
+++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C
@@ -34,6 +34,7 @@
#include <fapi.H>
#include <fapiUtil.H>
#include <getMBvpdTermData.H>
+#include <getMBvpdPhaseRotatorData.H>
extern "C"
{
@@ -77,6 +78,9 @@ fapi::ReturnCode getMBvpdTermData(
mt_keyword * l_pMtBuffer = NULL; // MBvpd MT keyword buffer
uint32_t l_MtBufsize = sizeof(mt_keyword);
uint32_t l_sizeCheck = 0; //invalid size
+ // Mask off to isolate vpd offset. MBvpdTermData value is offset into vpd.
+ // Also protects against indexing out of bounds
+ uint8_t l_attrOffset = i_attr & TERM_DATA_OFFSET_MASK;
FAPI_DBG("getMBvpdTermData: entry attr=0x%02x, size=%d ",
i_attr,i_valSize );
@@ -161,6 +165,26 @@ fapi::ReturnCode getMBvpdTermData(
l_sizeCheck=
sizeof (MBvpdTermDataSize<TERM_DATA_CEN_SLEW_RATE_SPCKE>::Type);
break;
+ case TERM_DATA_CKE_PRI_MAP:
+ l_sizeCheck=
+ sizeof (MBvpdTermDataSize<TERM_DATA_CKE_PRI_MAP>::Type);
+ break;
+ case TERM_DATA_CKE_PWR_MAP:
+ l_sizeCheck=
+ sizeof (MBvpdTermDataSize<TERM_DATA_CKE_PWR_MAP>::Type);
+ break;
+ case TERM_DATA_RLO:
+ l_sizeCheck=
+ sizeof (MBvpdTermDataSize<TERM_DATA_RLO>::Type);
+ break;
+ case TERM_DATA_WLO:
+ l_sizeCheck=
+ sizeof (MBvpdTermDataSize<TERM_DATA_WLO>::Type);
+ break;
+ case TERM_DATA_GPO:
+ l_sizeCheck=
+ sizeof (MBvpdTermDataSize<TERM_DATA_GPO>::Type);
+ break;
default: // Hard to do, but needs to be caught
FAPI_ERR("getMBvpdTermData: invalid attribute ID 0x%02x",
i_attr);
@@ -204,6 +228,75 @@ fapi::ReturnCode getMBvpdTermData(
FAPI_DBG("getMBvpdTermData: parent path=%s ",
l_mbTarget.toEcmdString() );
+ // Check if the old vpd layout is different for this attr
+ if (TERM_DATA_CHK60 & i_attr) // need to check vpd version for this attr
+ {
+ uint16_t l_vpdVersion = 0;
+ uint32_t l_bufSize = sizeof(l_vpdVersion);
+ const uint16_t VPD_VERSION_V60=0x3130; // Version 6.0 is ascii "10"
+
+ // get vpd version from record VINI keyword VZ
+ l_fapirc = fapiGetMBvpdField(fapi::MBVPD_RECORD_VINI,
+ fapi::MBVPD_KEYWORD_VZ,
+ l_mbTarget,
+ reinterpret_cast<uint8_t *>(&l_vpdVersion),
+ l_bufSize);
+ if (l_fapirc)
+ {
+ FAPI_ERR("getMBvpdTermData: Read of VZ keyword failed");
+ break; // break out with fapirc
+ }
+ FAPI_DBG("getMBvpdTermData: vpd version=0x%08x",
+ l_vpdVersion);
+
+ // Check that sufficient size was returned.
+ if (l_bufSize < sizeof(l_vpdVersion) )
+ {
+ FAPI_ERR("getMBvpdTermData:"
+ " less keyword data returned than expected %d < %d",
+ l_bufSize, sizeof(l_vpdVersion));
+ const uint32_t & KEYWORD = sizeof(l_vpdVersion);
+ const uint32_t & RETURNED_SIZE = l_bufSize;
+ FAPI_SET_HWP_ERROR(l_fapirc,RC_MBVPD_INSUFFICIENT_VPD_RETURNED);
+ break; // break out with fapirc
+ }
+
+ // Check if work around needed
+ if (l_vpdVersion < VPD_VERSION_V60)
+ {
+ MBvpdPhaseRotatorData l_phaseRotAttr = PHASE_ROT_INVALID;
+
+ if (TERM_DATA_RLO == i_attr)
+ {
+ l_phaseRotAttr = PHASE_ROT_RLO_V53;
+ }
+ else if (TERM_DATA_WLO == i_attr)
+ {
+ l_phaseRotAttr = PHASE_ROT_WLO_V53;
+ }
+ else if (TERM_DATA_GPO == i_attr)
+ {
+ l_phaseRotAttr = PHASE_ROT_GPO_V53;
+ }
+ else // not expected
+ {
+ FAPI_ERR("getMBvpdTermData: invalid attribute ID 0x%02x",
+ i_attr);
+ const fapi::MBvpdTermData & ATTR_ID = i_attr;
+ FAPI_SET_HWP_ERROR(l_fapirc, RC_MBVPD_INVALID_ATTRIBUTE_ID);
+ break; // break out with fapirc
+ }
+
+ // Retrieve these attributes from the MR keyword
+ FAPI_EXEC_HWP(l_fapirc,
+ getMBvpdPhaseRotatorData,
+ i_mbaTarget,
+ l_phaseRotAttr,
+ *((uint8_t (*)[2])o_pVal));
+ break; // break out with Phase Rotator data fapirc
+ }
+ }
+
// Read the MT keyword field
l_pMtBuffer = new mt_keyword;
@@ -243,7 +336,7 @@ fapi::ReturnCode getMBvpdTermData(
for (uint8_t l_j=0; l_j<NUM_DIMMS; l_j++)
{
(*l_pVal)[l_port][l_j] = l_pMtBuffer->
- mb_mba[l_pos].mba_port[l_port].port_attr[i_attr+l_j];
+ mb_mba[l_pos].mba_port[l_port].port_attr[l_attrOffset+l_j];
}
}
break;
@@ -262,7 +355,7 @@ fapi::ReturnCode getMBvpdTermData(
for (uint8_t l_k=0; l_k<NUM_RANKS; l_k++)
{
(*l_pVal)[l_port][l_j][l_k] = l_pMtBuffer->
- mb_mba[l_pos].mba_port[l_port].port_attr[i_attr+(l_j*NUM_RANKS)+l_k];
+ mb_mba[l_pos].mba_port[l_port].port_attr[l_attrOffset+(l_j*NUM_RANKS)+l_k];
}
}
}
@@ -272,16 +365,33 @@ fapi::ReturnCode getMBvpdTermData(
// need to consider endian since they are word fields
case TERM_DATA_CEN_RD_VREF:
case TERM_DATA_DRAM_WR_VREF:
+ case TERM_DATA_CKE_PWR_MAP:
{
uint32_t (* l_pVal)[2] = (uint32_t (*)[2])o_pVal;
for (uint8_t l_port=0; l_port<2;l_port++)
{
uint32_t * l_pWord = (uint32_t *)&l_pMtBuffer->
- mb_mba[l_pos].mba_port[l_port].port_attr[i_attr];
+ mb_mba[l_pos].mba_port[l_port].port_attr[l_attrOffset];
(*l_pVal)[l_port] = FAPI_BE32TOH(*l_pWord);
}
break;
}
+ // return the uint16_t [2] attributes from the MT keyword buffer
+ // into the return uint32_t [2]
+ // need to consider endian since they are word fields
+ case TERM_DATA_CKE_PRI_MAP:
+ {
+ uint32_t (* l_pVal)[2] = (uint32_t (*)[2])o_pVal;
+ (*l_pVal)[0] = l_pMtBuffer->
+ mb_mba[l_pos].mba_port[0].port_attr[l_attrOffset+1]; //LSB
+ (*l_pVal)[0] |= (l_pMtBuffer->
+ mb_mba[l_pos].mba_port[0].port_attr[l_attrOffset]<<8); //MSB
+ (*l_pVal)[1] = l_pMtBuffer->
+ mb_mba[l_pos].mba_port[1].port_attr[l_attrOffset+1]; //LSB
+ (*l_pVal)[1] |= (l_pMtBuffer->
+ mb_mba[l_pos].mba_port[1].port_attr[l_attrOffset]<<8); //MSB
+ break;
+ }
// return the uint8_t [2] attributes from the MT keyword buffer
case TERM_DATA_DRAM_WRDDR4_VREF:
case TERM_DATA_CEN_RCV_IMP_DQ_DQS:
@@ -295,13 +405,37 @@ fapi::ReturnCode getMBvpdTermData(
case TERM_DATA_CEN_SLEW_RATE_ADDR:
case TERM_DATA_CEN_SLEW_RATE_CLK:
case TERM_DATA_CEN_SLEW_RATE_SPCKE:
+ case TERM_DATA_RLO:
+ case TERM_DATA_WLO:
+ case TERM_DATA_GPO:
{
uint8_t (* l_pVal)[2] = (uint8_t (*)[2])o_pVal;
- for (uint8_t l_port=0; l_port<NUM_PORTS;l_port++)
+
+ // pull data from keyword buffer
+ uint8_t l_port0 = l_pMtBuffer->
+ mb_mba[l_pos].mba_port[0].port_attr[l_attrOffset];
+ uint8_t l_port1 = l_pMtBuffer->
+ mb_mba[l_pos].mba_port[1].port_attr[l_attrOffset];
+
+ // isolate special processing flags
+ uint32_t l_special = i_attr & TERM_DATA_SPECIAL_MASK;
+ switch (l_special)
{
- (*l_pVal)[l_port] = l_pMtBuffer->
- mb_mba[l_pos].mba_port[l_port].port_attr[i_attr];
+ case TERM_DATA_LOW_NIBBLE: // return low nibble
+ l_port0 = l_port0 & 0x0F;
+ l_port1 = l_port1 & 0x0F;
+ break;
+
+ case TERM_DATA_HIGH_NIBBLE: // return high nibble
+ l_port0 = ((l_port0 & 0xF0)>>4);
+ l_port1 = ((l_port1 & 0xF0)>>4);
+ break;
+ default:
+ ; // data is ok directly from keyword buffer
}
+
+ (*l_pVal)[0] = l_port0;
+ (*l_pVal)[1] = l_port1;
break;
}
}
diff --git a/src/usr/hwpf/plat/fapiPlatMBvpdAccess.C b/src/usr/hwpf/plat/fapiPlatMBvpdAccess.C
index c5efb2d96..670da1379 100644
--- a/src/usr/hwpf/plat/fapiPlatMBvpdAccess.C
+++ b/src/usr/hwpf/plat/fapiPlatMBvpdAccess.C
@@ -59,6 +59,7 @@ fapi::ReturnCode MBvpdRecordXlate(const fapi::MBvpdRecord i_fapiRecord,
CVPD::VER0,
CVPD::MER0,
CVPD::VSPD,
+ CVPD::VINI,
};
const uint8_t NUM_MBVPD_RECORDS =
sizeof(mbvpdFapiRecordToHbRecord)/sizeof(mbvpdFapiRecordToHbRecord[0]);
@@ -118,6 +119,7 @@ fapi::ReturnCode MBvpdKeywordXlate(const fapi::MBvpdKeyword i_fapiKeyword,
CVPD::MW,
CVPD::MV,
CVPD::AM,
+ CVPD::VZ,
};
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 99ca55192..d88eb4d34 100644
--- a/src/usr/hwpf/test/fapiwinkletest.H
+++ b/src/usr/hwpf/test/fapiwinkletest.H
@@ -26,6 +26,7 @@
// set to 1 for doing unit tests, set to 0 for production
#define UNITTESTfwt 0
+#define UNITTEST2fwt 0
// TODO: RTC 69935 complete Phase Rotator Data and Termination Data.
// Use the code in the 1 path until CDIMM vpd has proper values.
// Then the 1 path code can be removed and keep the 0 path code.
@@ -82,9 +83,11 @@ public:
fapi::MvpdRecord record;
fapi::MvpdKeyword keyword;
} l_mvpdRecords[] = {
+#if UNITTESTfwt
{ MVPD_RECORD_CP00, MVPD_KEYWORD_PDG},
{ MVPD_RECORD_MER0, MVPD_KEYWORD_PDI},
// { MVPD_RECORD_VER0, MVPD_KEYWORD_PDI}, //VER0 in spec,not supported
+#endif
{ MVPD_RECORD_VWML, MVPD_KEYWORD_PDI},
};
@@ -180,6 +183,7 @@ public:
fapi::MBvpdRecord record;
fapi::MBvpdKeyword keyword;
} l_mbvpdRecords[] = {
+#if UNITTESTfwt
{ MBVPD_RECORD_VEIR, MBVPD_KEYWORD_PDI},
// { MBVPD_RECORD_VER0, MBVPD_KEYWORD_PDI},//in spec, not supported
{ MBVPD_RECORD_MER0, MBVPD_KEYWORD_PDI},
@@ -192,6 +196,8 @@ public:
{ MBVPD_RECORD_VSPD, MBVPD_KEYWORD_MW},
{ MBVPD_RECORD_VSPD, MBVPD_KEYWORD_MV},
{ MBVPD_RECORD_VSPD, MBVPD_KEYWORD_AM},
+#endif
+ { MBVPD_RECORD_VINI, MBVPD_KEYWORD_VZ},
};
TS_TRACE( "testGetMBvpd entry" );
@@ -519,14 +525,17 @@ public:
void testGetTermData()
{
fapi::ReturnCode l_fapirc( fapi::FAPI_RC_SUCCESS );
- uint8_t val1[2][2] = {{0xFF,0xFF},{0xFF,0xFF}};
#if UNITTESTfwt
+ uint8_t val1[2][2] = {{0xFF,0xFF},{0xFF,0xFF}};
uint8_t val2[2][2][4]={
{{0xFF,0xFF,0xFF,0xFF},{0xFF,0xFF,0xFF,0xFF}},
{{0xFF,0xFF,0xFF,0xFF},{0xFF,0xFF,0xFF,0xFF}}};
- uint32_t val3[2] = {0xFFFFFFFF,0xFFFFFFFF};
- uint8_t val4[2] = {0xFF,0xFF};
uint8_t l_errorChk = 1; //do error checks just once
+ uint8_t val4[2] = {0xFF,0xFF};
+#endif
+ uint32_t val3[2] = {0xFFFFFFFF,0xFFFFFFFF};
+#if UNITTEST2fwt
+ uint8_t val5[2] = {0xFF,0xFF};
#endif
#if RTC69935fwt
getMBvpdTermData_FP_t (l_getMBvpdTermData)
@@ -635,6 +644,7 @@ public:
#if RTC69935fwt
// Verify fetching attributes by calling the HWP directly
+#if UNITTESTfwt
// TERM_DATA_DRAM_RON
l_fapirc = (*l_getMBvpdTermData)(l_fapi_mba_target,
fapi::TERM_DATA_DRAM_RON,
@@ -644,7 +654,6 @@ public:
"TERM_DATA_DRAM_RON=(0x%02x,0x%02x),(0x%02x,0x%02x)",
val1[0][0], val1[0][1], val1[1][0], val1[1][1]);
-#if UNITTESTfwt
// TERM_DATA_DRAM_RTT_NOM
l_fapirc = (*l_getMBvpdTermData)(l_fapi_mba_target,
fapi::TERM_DATA_DRAM_RTT_NOM,
@@ -835,6 +844,55 @@ public:
"TERM_DATA_CEN_SLEW_RATE_SPCKE=0x%02x,0x%02x",
val4[0], val4[1]);
#endif
+ // TERM_DATA_CKE_PRI_MAP
+ l_fapirc = (*l_getMBvpdTermData)(l_fapi_mba_target,
+ fapi::TERM_DATA_CKE_PRI_MAP,
+ &val3, sizeof(val3));
+ if (l_fapirc) break;
+ TS_TRACE( "testGetTermData accessor "
+ "TERM_DATA_CKE_PRI_MAP=0x%08x,0x%08x",
+ val3[0], val3[1]);
+
+#if UNITTESTfwt
+ // TERM_DATA_CKE_PWR_MAP
+ val3[0] = 0xFFFFFFFF;
+ val3[1] = 0xFFFFFFFF;
+ l_fapirc = (*l_getMBvpdTermData)(l_fapi_mba_target,
+ fapi::TERM_DATA_CKE_PWR_MAP,
+ &val3, sizeof(val3));
+ if (l_fapirc) break;
+ TS_TRACE( "testGetTermData accessor "
+ "TERM_DATA_CKE_PWR_MAP=0x%08x,0x%08x",
+ val3[0], val3[1]);
+
+ // TERM_DATA_RLO
+ l_fapirc = (*l_getMBvpdTermData)(l_fapi_mba_target,
+ fapi::TERM_DATA_RLO,
+ &val4, sizeof(val4));
+ if (l_fapirc) break;
+ TS_TRACE( "testGetTermData accessor "
+ "TERM_DATA_RLO=0x%02x,0x%02x",
+ val4[0], val4[1]);
+
+ // TERM_DATA_WLO
+ l_fapirc = (*l_getMBvpdTermData)(l_fapi_mba_target,
+ fapi::TERM_DATA_WLO,
+ &val4, sizeof(val4));
+ if (l_fapirc) break;
+ TS_TRACE( "testGetTermData accessor "
+ "TERM_DATA_WLO=0x%02x,0x%02x",
+ val4[0], val4[1]);
+
+ // TERM_DATA_GPO
+ l_fapirc = (*l_getMBvpdTermData)(l_fapi_mba_target,
+ fapi::TERM_DATA_GPO,
+ &val4, sizeof(val4));
+ if (l_fapirc) break;
+ TS_TRACE( "testGetTermData accessor "
+ "TERM_DATA_GPO=0x%02x,0x%02x",
+ val4[0], val4[1]);
+#endif
+
#else
// Verify fetching attributes using FAPI_ATTR_GET
// TERM_DATA_DRAM_RON
@@ -1019,6 +1077,53 @@ public:
val4[0], val4[1]);
#endif
#endif
+
+ // TERM_DATA_CKE_PRI_MAP
+ val3[0] = 0xFFFFFFFF;
+ val3[1] = 0xFFFFFFFF;
+ l_fapirc = FAPI_ATTR_GET(ATTR_VPD_CKE_PRI_MAP,
+ &l_fapi_mba_target, val3);
+ if (l_fapirc) break;
+ TS_TRACE( "testGetTermData attr "
+ "TERM_DATA_CKE_PRI_MAP=0x%08x,0x%08x",
+ val3[0], val3[1]);
+
+#if UNITTEST2fwt
+ // TERM_DATA_CKE_PWR_MAP
+ val3[0] = 0xFFFFFFFF;
+ val3[1] = 0xFFFFFFFF;
+ l_fapirc = FAPI_ATTR_GET(ATTR_VPD_CKE_PWR_MAP,
+ &l_fapi_mba_target, val3);
+ if (l_fapirc) break;
+ TS_TRACE( "testGetTermData attr "
+ "TERM_DATA_CKE_PWR_MAP=0x%08x,0x%08x",
+ val3[0], val3[1]);
+
+ // TERM_DATA_RLO
+ l_fapirc = FAPI_ATTR_GET(ATTR_VPD_RLO,
+ &l_fapi_mba_target, val5);
+ if (l_fapirc) break;
+ TS_TRACE( "testGetTermData attr "
+ "TERM_DATA_VPD_RLO=(0x%02x,0x%02x)",
+ val5[0], val5[1]);
+
+ // TERM_DATA_WLO
+ l_fapirc = FAPI_ATTR_GET(ATTR_VPD_WLO,
+ &l_fapi_mba_target, val5);
+ if (l_fapirc) break;
+ TS_TRACE( "testGetTermData attr "
+ "TERM_DATA_VPD_WLO=(0x%02x,0x%02x)",
+ val5[0], val5[1]);
+
+ // TERM_DATA_GPO
+ l_fapirc = FAPI_ATTR_GET(ATTR_VPD_GPO,
+ &l_fapi_mba_target, val5);
+ if (l_fapirc) break;
+ TS_TRACE( "testGetTermData attr "
+ "TERM_DATA_VPD_GPO=(0x%02x,0x%02x)",
+ val5[0], val5[1]);
+#endif
+
}
if (l_fapirc)
{
@@ -1035,7 +1140,7 @@ public:
/**
- * @brief call fapiGetMBvpdField to fetch memory buffer vpd records.
+ * @brief call getMBvpdPhaseRotData to fetch memory buffer MR attributes
*
*/
void testGetPhaseRotatorData()
@@ -1094,6 +1199,7 @@ public:
// 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);
@@ -1102,6 +1208,7 @@ public:
" 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,
@@ -1525,6 +1632,28 @@ public:
" 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]);
+
+ l_attr_eff_cen_phase_rot[0] = 0xFF;
+ l_attr_eff_cen_phase_rot[1] = 0xFF;
+ l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target,
+ fapi::PHASE_ROT_TSYS_ADR,
+ l_attr_eff_cen_phase_rot);
+ if (l_fapirc) break;
+ TS_TRACE( "testGetPhaseRotatorData accessor"
+ " ATTR_VPD_TSYS_ADR=(0x%02x,0x%02x)",
+ l_attr_eff_cen_phase_rot[0],
+ l_attr_eff_cen_phase_rot[1]);
+
+ l_attr_eff_cen_phase_rot[0] = 0xFF;
+ l_attr_eff_cen_phase_rot[1] = 0xFF;
+ l_fapirc = (*l_getMBvpdPhaseRotatorData)(l_fapi_mba_target,
+ fapi::PHASE_ROT_TSYS_DP18,
+ l_attr_eff_cen_phase_rot);
+ if (l_fapirc) break;
+ TS_TRACE( "testGetPhaseRotatorData accessor"
+ " ATTR_VPD_TSYS_DP18=(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.
@@ -1961,8 +2090,28 @@ public:
" 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
+#ifdef UNITTEST2fwt
+ l_fapirc = FAPI_ATTR_GET(ATTR_VPD_TSYS_ADR,
+ &l_fapi_mba_target,
+ l_attr_eff_cen_phase_rot);
+ if (l_fapirc) break;
+ TS_TRACE( "testGetPhaseRotatorData"
+ " ATTR_VPD_TSYS_ADR=(0x%02x,0x%02x)",
+ l_attr_eff_cen_phase_rot[0],
+ l_attr_eff_cen_phase_rot[1]);
+
+ l_fapirc = FAPI_ATTR_GET(ATTR_VPD_TSYS_DP18,
+ &l_fapi_mba_target,
+ l_attr_eff_cen_phase_rot);
+ if (l_fapirc) break;
+ TS_TRACE( "testGetPhaseRotatorData"
+ " ATTR_VPD_TSYS_DP18=(0x%02x,0x%02x)",
+ l_attr_eff_cen_phase_rot[0],
+ l_attr_eff_cen_phase_rot[1]);
+#endif
}
if (l_fapirc)
{
@@ -1972,7 +2121,6 @@ public:
}
}
-
TS_TRACE( "testGetPhaseRotatorData exit" );
}
diff --git a/src/usr/vpd/cvpd.H b/src/usr/vpd/cvpd.H
index d2c9bd15c..3598e144c 100644
--- a/src/usr/vpd/cvpd.H
+++ b/src/usr/vpd/cvpd.H
@@ -65,6 +65,7 @@ namespace CVPD
{ VER0, "VER0" }, //Not currently used, but keep support
{ MER0, "MER0" },
{ VSPD, "VSPD" },
+ { VINI, "VINI" },
// -------------------------------------------------------------------
// DO NOT USE!! This is for test purposes ONLY!
{ CVPD_TEST_RECORD, "TEST" },
@@ -93,6 +94,7 @@ namespace CVPD
{ MW, "MW" },
{ MV, "MV" },
{ AM, "AM" },
+ { VZ, "VZ" },
// -------------------------------------------------------------------
// 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 c581e7b75..3a8a59154 100644
--- a/src/usr/vpd/makefile
+++ b/src/usr/vpd/makefile
@@ -29,6 +29,6 @@ SUBDIRS = test.d
BINARY_FILES = $(IMGDIR)/dimmspd.dat:3a9f53e3684e57401ed0aed75f25980fca99f40b
BINARY_FILES += $(IMGDIR)/procmvpd.dat:7dabbe4879dcdd19ed236573aa68e8671fa8c3c7
-BINARY_FILES += $(IMGDIR)/cvpd.dat:7410a45451fb7826daf1ae218f81b2a694e64234
+BINARY_FILES += $(IMGDIR)/cvpd.dat:1d43fa2a410a81b39b51b57248a3259cd3bf6352
include ${ROOTPATH}/config.mk
diff --git a/src/usr/vpd/test/cvpdtest.H b/src/usr/vpd/test/cvpdtest.H
index 957a328ef..90f91a660 100755
--- a/src/usr/vpd/test/cvpdtest.H
+++ b/src/usr/vpd/test/cvpdtest.H
@@ -73,6 +73,7 @@ cvpdTestData cvpdData[] =
{ CVPD::VSPD, CVPD::MW },
{ CVPD::VSPD, CVPD::MV },
{ CVPD::VSPD, CVPD::AM },
+ { CVPD::VINI, CVPD::VZ },
};
OpenPOWER on IntegriCloud