summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp/mvpd_accessors
diff options
context:
space:
mode:
authorBill Schwartz <whs@us.ibm.com>2015-02-17 08:24:11 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-02-24 16:21:33 -0600
commite56b9afb738e9aea6af2589fd1f56d3d2ba77f5d (patch)
tree4a945adcfe5fc5b59a97b845f800e2ef3f10fd14 /src/usr/hwpf/hwp/mvpd_accessors
parent9a3694c400f8c50da58459d0fbd91e3dc7a2ef28 (diff)
downloadtalos-hostboot-e56b9afb738e9aea6af2589fd1f56d3d2ba77f5d.tar.gz
talos-hostboot-e56b9afb738e9aea6af2589fd1f56d3d2ba77f5d.zip
Support VD keyword for ISDIMM VPD format
For ISDIMMs, check for VD in SPDX, if no VD, fall back to VINI VZ. For CDIMMs, check for VD in VSPD, if no VD, fall back to VINI VZ. Change-Id: Ib2a299bac7dae661a77664b9ad5e4419fdff5c01 RTC: 122881 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15806 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp/mvpd_accessors')
-rw-r--r--src/usr/hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.C6
-rw-r--r--src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.C195
-rw-r--r--src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttrData.C69
-rw-r--r--src/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.C8
-rw-r--r--src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml16
5 files changed, 212 insertions, 82 deletions
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.C b/src/usr/hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.C
index bf9767cc7..d7aee6a7f 100644
--- a/src/usr/hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.C
+++ b/src/usr/hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2015 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -22,7 +22,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: accessMBvpdL4BankDelete.C,v 1.4 2014/08/05 15:04:51 kahnevan Exp $
+// $Id: accessMBvpdL4BankDelete.C,v 1.5 2015/02/24 19:23:31 whs Exp $
/**
* @file accessMBvpdL4BankDelete.C
*
@@ -74,7 +74,7 @@ fapi::ReturnCode accessMBvpdL4BankDelete(
FAPI_ERR("accessMBvpdL4BankDelete:"
" less keyword data returned than expected %d < %zd",
l_bufSize, sizeof(l_l4BankDelete));
- const uint32_t & KEYWORD = sizeof(l_l4BankDelete);
+ const uint32_t & KEYWORD = fapi::MBVPD_KEYWORD_MX;
const uint32_t & RETURNED_SIZE = l_bufSize;
const fapi::Target & CHIP_TARGET = i_mbTarget;
FAPI_SET_HWP_ERROR(l_fapirc,RC_MBVPD_INSUFFICIENT_VPD_RETURNED);
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.C
index 59e2efdf8..b13e4f9af 100644
--- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.C
+++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.C
@@ -22,7 +22,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: getMBvpdAttr.C,v 1.4 2015/01/09 21:53:07 whs Exp $
+// $Id: getMBvpdAttr.C,v 1.5 2015/02/24 19:22:51 whs Exp $
/**
* @file getMBvpdAttr.C
*
@@ -156,6 +156,11 @@ fapi::ReturnCode getMBvpdAttr(const fapi::Target &i_mbaTarget,
break; // return with error
}
+ FAPI_DBG("getMBvpdAttr: attr=0x%08x, dimmType=%d "
+ "keyword=%d offset=%d outType=0x%04x default=%d ",
+ i_attr,l_dimmType,l_pAttrDef->iv_keyword,l_pAttrDef->iv_offset,
+ l_pAttrDef->iv_outputType,l_pAttrDef->iv_defaultValue );
+
// Either just return defaults or read keyword and return vpd data
// Mask off the special processing flags from the output type.
if (DEFAULT_VALUE ==
@@ -222,7 +227,7 @@ fapi::ReturnCode findDimmInfo (const fapi::Target & i_mbaTarget,
FAPI_ERR(" getMBvpdAttr: Get MBA position failed ");
break; // break out with fapirc
}
- FAPI_DBG("getMBvpdAttr: mba %s position=%d",
+ FAPI_DBG("findDimmInfo: mba %s position=%d",
i_mbaTarget.toEcmdString(),
o_pos);
@@ -230,10 +235,10 @@ fapi::ReturnCode findDimmInfo (const fapi::Target & i_mbaTarget,
l_fapirc = fapiGetParentChip (i_mbaTarget,o_mbTarget);
if (l_fapirc)
{
- FAPI_ERR("getMBvpdAttr: Finding the parent mb failed ");
+ FAPI_ERR("findDimmInfo: Finding the parent mb failed ");
break; // break out with fapirc
}
- FAPI_DBG("getMBvpdAttr: parent path=%s ",
+ FAPI_DBG("findDimmInfo: parent path=%s ",
o_mbTarget.toEcmdString() );
// Determine if ISDIMM or CDIMM
@@ -242,7 +247,7 @@ fapi::ReturnCode findDimmInfo (const fapi::Target & i_mbaTarget,
l_fapirc = fapiGetAssociatedDimms(i_mbaTarget, l_target_dimm_array);
if(l_fapirc)
{
- FAPI_ERR("getMBvpdAttr: Problem getting DIMMs of MBA");
+ FAPI_ERR("findDimmInfo: Problem getting DIMMs of MBA");
break; //return error
}
if(l_target_dimm_array.size() != 0)
@@ -251,26 +256,109 @@ fapi::ReturnCode findDimmInfo (const fapi::Target & i_mbaTarget,
l_fapirc = FAPI_ATTR_GET(ATTR_SPD_CUSTOM,&l_target_dimm_array[0],
l_customDimm);
if(l_fapirc) {
- FAPI_ERR(" getMBvpdAttr: ATTR_SPD_CUSTOM failed ");
+ FAPI_ERR("findDimmInfo: ATTR_SPD_CUSTOM failed ");
break; //return error
}
if (l_customDimm == fapi::ENUM_ATTR_SPD_CUSTOM_YES)
{
o_dimmType = CDIMM;
- FAPI_DBG("getMBvpdAttr: CDIMM TYPE!!!");
+ FAPI_DBG("findDimmInfo: CDIMM TYPE!!!");
}
else
{
o_dimmType = ISDIMM;
- FAPI_DBG("getMBvpdAttr: ISDIMM TYPE!!!");
+ FAPI_DBG("findDimmInfo: ISDIMM TYPE!!!");
}
}
else
{
o_dimmType = ISDIMM;
- FAPI_DBG("getMBvpdAttr: ISDIMM TYPE (dimm array size = 0)");
+ FAPI_DBG("findDimmInfo: ISDIMM TYPE (dimm array size = 0)");
+ }
+ }
+ while (0);
+
+ return l_fapirc;
+}
+
+// return version from keyword VZ or VD
+fapi::ReturnCode getVersion (const fapi::Target & i_mbaTarget,
+ const DimmType & i_dimmType,
+ VpdVersion & o_version)
+{
+ fapi::ReturnCode l_fapirc;
+ fapi::Target l_mbTarget;
+ fapi::MBvpdKeyword l_keyword = fapi::MBVPD_KEYWORD_VD; // try VD first
+ fapi::MBvpdRecord l_record = fapi::MBVPD_RECORD_SPDX; // default to SPDX
+ uint16_t l_versionBuf = 0;
+ uint32_t l_bufSize = sizeof(l_versionBuf);
+
+ do
+ {
+ o_version = VD_VER; // initialize to finding VD keyword
+
+ // find the Centaur memory buffer from the passed MBA
+ l_fapirc = fapiGetParentChip (i_mbaTarget,l_mbTarget);
+ if (l_fapirc)
+ {
+ FAPI_ERR("getVersion: Finding the parent mb failed ");
+ break; // break out with fapirc
+ }
+
+ if (CDIMM == i_dimmType)
+ {
+ l_record = fapi::MBVPD_RECORD_VSPD;
+ }
+ // try to get VD keyword from SPDX or VSPD
+ l_fapirc = fapiGetMBvpdField(l_record,
+ l_keyword,
+ l_mbTarget,
+ reinterpret_cast<uint8_t *>(&l_versionBuf),
+ l_bufSize);
+
+ // try record VINI keyword VZ (should work)
+ if (l_fapirc)
+ {
+ fapi::ReturnCode l_fapirc2;
+
+ o_version = VZ_VER; // VZ keyword
+ l_record = fapi::MBVPD_RECORD_VINI;
+ l_keyword = fapi::MBVPD_KEYWORD_VZ;
+ l_bufSize = sizeof(l_versionBuf);
+
+ l_fapirc2 = fapiGetMBvpdField(l_record,
+ l_keyword,
+ l_mbTarget,
+ reinterpret_cast<uint8_t *>(&l_versionBuf),
+ l_bufSize);
+ l_fapirc = l_fapirc2; //explicitly free previous error infor
+ }
+ if (l_fapirc)
+ {
+ FAPI_ERR("getVersion: Read of VD and VZ keyword failed");
+ break; // break out with fapirc
+ }
+
+ // Check that sufficient size was returned.
+ if (l_bufSize < sizeof(l_versionBuf))
+ {
+ FAPI_ERR("getVersion:"
+ " less keyword data returned than expected %d < %d",
+ l_bufSize, sizeof(l_versionBuf));
+ const uint32_t & KEYWORD = l_keyword;
+ const uint32_t & RETURNED_SIZE = l_bufSize;
+ const fapi::Target & CHIP_TARGET = l_mbTarget;
+ FAPI_SET_HWP_ERROR(l_fapirc,RC_MBVPD_INSUFFICIENT_VPD_RETURNED);
+ break; // break out with fapirc
}
+
+ //return value along with VD or VZ
+ o_version = static_cast<VpdVersion>(o_version |
+ static_cast<VpdVersion>(FAPI_BE16TOH(l_versionBuf)));
+
+ FAPI_DBG("getVersion: vpd version=0x%x keyword=%d",
+ o_version,l_keyword);
}
while (0);
@@ -282,23 +370,24 @@ fapi::ReturnCode findDimmInfo (const fapi::Target & i_mbaTarget,
// Vesions must be in decreasing order (highest first...)
// for a specific Dimm Type. The first match found, searching
// from row index 0 to the end, will be used.
-
fapi::ReturnCode findAttrDef (const fapi::Target & i_mbaTarget,
const DimmType & i_dimmType,
const AttributeId & i_attr,
const MBvpdAttrDef* & o_pAttrDef)
{
- fapi::ReturnCode l_fapirc;
+
+fapi::ReturnCode l_fapirc;
o_pAttrDef = NULL;
// find first row in the attribute defintion table for this attribute
- uint32_t l_version = ALL_VER; // invalid vpd value
+ VpdVersion l_version = INVALID_VER; // invalid vpd value
+
uint32_t i=0; //at this scope for the debug message at end
- for (; i <= g_MBVPD_ATTR_DEF_array_size; i++)
+ for (; i < g_MBVPD_ATTR_DEF_array_size; i++)
{
if ( (g_MBVPD_ATTR_DEF_array[i].iv_attrId == i_attr) &&
- ((i_dimmType == g_MBVPD_ATTR_DEF_array[i].iv_dimmType) ||
- (ALL_DIMM == g_MBVPD_ATTR_DEF_array[i].iv_dimmType)) )
+ ((ALL_DIMM == g_MBVPD_ATTR_DEF_array[i].iv_dimmType) ||
+ (i_dimmType == g_MBVPD_ATTR_DEF_array[i].iv_dimmType)) )
{
// most are expected to be the same for all Dimm Types and versions
@@ -307,24 +396,24 @@ fapi::ReturnCode findAttrDef (const fapi::Target & i_mbaTarget,
o_pAttrDef = &g_MBVPD_ATTR_DEF_array[i];
break; //use this row
}
- if (ALL_VER == l_version) // have not read version yet
+ if (INVALID_VER == l_version) // have not read version yet
{
// get vpd version (only when actually needed)
- FAPI_EXEC_HWP(l_fapirc,
- getMBvpdVersion,
- i_mbaTarget,
- l_version);
-
+ l_fapirc = getVersion (i_mbaTarget,
+ i_dimmType,
+ l_version);
if (l_fapirc)
{
- FAPI_ERR("getMBvpdAttr: getMBvpdVersion failed");
+ FAPI_ERR("findAttrDef: getMBvpdVersion failed");
break; // break out with fapirc
}
- FAPI_DBG("getMBvpdAttr: read vpd version = 0x%04x",
- l_version );
-
}
- if ((uint32_t)g_MBVPD_ATTR_DEF_array[i].iv_version <= l_version)
+ // If this row is for this version type (VD or VZ)
+ // and is equal or less than the version, then use it
+ if ((g_MBVPD_ATTR_DEF_array[i].iv_version &
+ (VpdVersion)(ALL_VER & l_version)) &&
+ ((g_MBVPD_ATTR_DEF_array[i].iv_version & VER_MASK) <=
+ (l_version & VER_MASK)) )
{
o_pAttrDef = &g_MBVPD_ATTR_DEF_array[i];
break; //use this row
@@ -340,16 +429,20 @@ fapi::ReturnCode findAttrDef (const fapi::Target & i_mbaTarget,
// Could be due to a table error, which shouldn't happen because
// every attribute has an ALL_DIMM ALL_VER entry.
// More likely due to an invalid attribute ID being passed.
- FAPI_ERR("getMBvpdAttr: attr ID not in table 0x%02x dimmType=%d",
+ FAPI_ERR("findAttrDef:"
+ " attr ID 0x%x not in table dimmType=%d version=%x",
i_attr,
- i_dimmType);
- const fapi::AttributeId & ATTR_ID = i_attr;
- FAPI_SET_HWP_ERROR(l_fapirc, RC_MBVPD_INVALID_ATTRIBUTE_ID);
+ i_dimmType,
+ l_version);
+ const fapi::AttributeId & ATTR_ID = i_attr;
+ const DimmType & DIMM_TYPE = i_dimmType;
+ const VpdVersion & VERSION = l_version;
+ FAPI_SET_HWP_ERROR(l_fapirc, RC_MBVPD_ATTRIBUTE_NOT_FOUND);
}
}
else
{
- FAPI_DBG("getMBvpdAttr: use attribute definition row=%d",i );
+ FAPI_DBG("findAttrDef: use attribute definition row=%d",i );
}
return l_fapirc;
@@ -370,7 +463,7 @@ fapi::ReturnCode readKeyword (const fapi::Target & i_mbTarget,
fapi::MBvpdKeyword l_keyword = i_pAttrDef->iv_keyword; //default for CDIMMs
fapi::MBvpdRecord l_record = MBVPD_RECORD_VSPD; //default for CDIMMs
- FAPI_DBG("getMBvpdAttr: Read keyword %d ",l_keyword);
+ FAPI_DBG("readKeyword: Read keyword %d ",l_keyword);
do
{
if (CDIMM != i_dimmType)
@@ -390,7 +483,7 @@ fapi::ReturnCode readKeyword (const fapi::Target & i_mbTarget,
}
else //table error, shouldn't happen
{
- FAPI_ERR("getMBvpdAttr: invalid keyword %d for dimmType=%d",
+ FAPI_ERR("readKeyword: invalid keyword %d for dimmType=%d",
l_keyword,
i_dimmType);
const fapi::AttributeId & ATTR_ID = i_pAttrDef->iv_attrId;
@@ -408,14 +501,14 @@ fapi::ReturnCode readKeyword (const fapi::Target & i_mbTarget,
l_bufsize);
if (l_fapirc)
{
- FAPI_ERR("getMBvpdAttr: Read of attr keyword failed");
+ FAPI_ERR("readKeyword: Read of attr keyword failed");
break; // break out with fapirc
}
// Check that sufficient keyword was returned.
if (l_bufsize < ATTR_KEYWORD_SIZE )
{
- FAPI_ERR("getMBvpdAttr:"
+ FAPI_ERR("readKeyword:"
" less keyword returned than expected %d < %d",
i_bufsize, ATTR_KEYWORD_SIZE);
const uint32_t & KEYWORD = l_keyword;
@@ -437,7 +530,7 @@ fapi::ReturnCode sizeMismatch (const size_t i_correctSize,
fapi::ReturnCode l_fapirc;
do
{
- FAPI_ERR("getMBvpdAttr:"
+ FAPI_ERR("sizeMismatch:"
" output variable size does not match expected %d != %d"
" for attr id=0x%08x",
i_correctSize, i_inputSize, i_attr);
@@ -459,7 +552,7 @@ fapi::ReturnCode returnDefault (const MBvpdAttrDef * i_pAttrDef,
fapi::ReturnCode l_fapirc;
uint16_t l_outputType = i_pAttrDef->iv_outputType & OUTPUT_TYPE_MASK;
- FAPI_DBG("getMBvpdAttr: default value outputType=0x%04x ",
+ FAPI_DBG("returnDefault: default value outputType=0x%04x ",
l_outputType);
// return default according to the attribute varible type
@@ -590,7 +683,7 @@ fapi::ReturnCode returnDefault (const MBvpdAttrDef * i_pAttrDef,
break ;
}
default: // Hard to do, but needs to be caught
- FAPI_ERR("getMBvpdAttrData: invalid output type 0x%04x for"
+ FAPI_ERR("returnDefault: invalid output type 0x%04x for"
" attribute ID 0x%08x",
i_pAttrDef->iv_outputType,
i_pAttrDef->iv_attrId);
@@ -643,7 +736,7 @@ fapi::ReturnCode returnValue (const MBvpdAttrDef* i_pAttrDef,
uint16_t l_outputType= i_pAttrDef->iv_outputType & OUTPUT_TYPE_MASK;
uint16_t l_special = i_pAttrDef->iv_outputType & SPECIAL_PROCESSING_MASK;
- FAPI_DBG("getMBvpdAttr: output offset=0%02x pos=%d outputType=0x%04x"
+ FAPI_DBG("returnValue: output offset=0%02x pos=%d outputType=0x%04x"
" special=0x%04x ",
l_attrOffset,i_pos,l_outputType,l_special);
@@ -869,7 +962,7 @@ fapi::ReturnCode returnValue (const MBvpdAttrDef* i_pAttrDef,
}
else
{
- FAPI_ERR("getMBvpdAttrData: invalid output type 0x%04x for"
+ FAPI_ERR("returnValue: invalid output type 0x%04x for"
" attribute ID 0x%08x UINT64_T",
i_pAttrDef->iv_outputType,
i_pAttrDef->iv_attrId);
@@ -884,7 +977,7 @@ fapi::ReturnCode returnValue (const MBvpdAttrDef* i_pAttrDef,
break ;
}
default: // Hard to do, but needs to be caught
- FAPI_ERR("getMBvpdAttrData: invalid output type 0x%04x for"
+ FAPI_ERR("returnValue: invalid output type 0x%04x for"
" attribute ID 0x%08x",
i_pAttrDef->iv_outputType,
i_pAttrDef->iv_attrId);
@@ -1445,12 +1538,12 @@ fapi::ReturnCode FindMRkeyword (const fapi::Target & i_mbTarget,
l_M0Bufsize);
if (l_fapirc)
{
- FAPI_ERR("getMBvpdAttrData: Read of M0 keyword failed");
+ FAPI_ERR("FindMRkeyword: Read of M0 keyword failed");
break; // break out with fapirc
}
if (l_M0_KEYWORD_SIZE > l_M0Bufsize)
{
- FAPI_ERR("getMBvpdAttr:"
+ FAPI_ERR("FindMRkeyword:"
" less M0 keyword returned than expected %d < %d",
l_M0Bufsize, l_M0_KEYWORD_SIZE);
const uint32_t & KEYWORD = fapi::MBVPD_KEYWORD_M0;
@@ -1465,7 +1558,7 @@ fapi::ReturnCode FindMRkeyword (const fapi::Target & i_mbTarget,
l_index);
if(l_fapirc)
{
- FAPI_ERR("getMBvpdAttrData: read of ISDIMM MBVPD Index failed");
+ FAPI_ERR("FindMRkeyword: read of ISDIMM MBVPD Index failed");
break;
}
if (l_M0_KEYWORD_SIZE < l_index)
@@ -1517,7 +1610,7 @@ fapi::ReturnCode FindMRkeyword (const fapi::Target & i_mbTarget,
while (0);
if (!l_fapirc)
{
- FAPI_DBG ("getMBvpdAttr: use MR keyword %d",o_keyword);
+ FAPI_DBG ("FindMRkeyword: use MR keyword %d",o_keyword);
}
return l_fapirc;
@@ -1549,7 +1642,7 @@ fapi::ReturnCode FindMTkeyword (const fapi::Target & i_mbTarget,
fapi::TARGET_STATE_PRESENT);
if(l_fapirc)
{
- FAPI_ERR("getMBvpdAttr: read of Associated Dimms failed");
+ FAPI_ERR("FindMTkeyword: read of Associated Dimms failed");
break;
}
@@ -1561,7 +1654,7 @@ fapi::ReturnCode FindMTkeyword (const fapi::Target & i_mbTarget,
l_mba_port);
if(l_fapirc)
{
- FAPI_ERR("getMBvpdAttr: read of ATTR_MBA_PORT failed");
+ FAPI_ERR("FindMTkeyword: read of ATTR_MBA_PORT failed");
break;
}
l_fapirc = FAPI_ATTR_GET(ATTR_MBA_DIMM,
@@ -1569,7 +1662,7 @@ fapi::ReturnCode FindMTkeyword (const fapi::Target & i_mbTarget,
l_mba_dimm);
if(l_fapirc)
{
- FAPI_ERR("getMBvpdAttr: read of ATTR_MBA_DIMM failed");
+ FAPI_ERR("FindMTkeyword: read of ATTR_MBA_DIMM failed");
break;
}
@@ -1578,7 +1671,7 @@ fapi::ReturnCode FindMTkeyword (const fapi::Target & i_mbTarget,
l_spd_dimm_ranks[l_mba_port][l_mba_dimm]);
if(l_fapirc)
{
- FAPI_ERR("getMBvpdAttr: read of ATTR_SPD_NUM_RANKS failed");
+ FAPI_ERR("FindMTkeyword: read of ATTR_SPD_NUM_RANKS failed");
break;
}
}
@@ -1610,7 +1703,7 @@ fapi::ReturnCode FindMTkeyword (const fapi::Target & i_mbTarget,
{
l_rankCopy = 1;
//throwing error for all empty
- FAPI_ERR("No dimm's found");
+ FAPI_ERR("FindMTkeyword: No dimm's found");
const uint8_t DIMM_P0S0 = l_spd_dimm_ranks[0][0];
const uint8_t DIMM_P0S1 = l_spd_dimm_ranks[0][1];
const uint8_t DIMM_P1S0 = l_spd_dimm_ranks[1][0];
@@ -1691,7 +1784,7 @@ fapi::ReturnCode FindMTkeyword (const fapi::Target & i_mbTarget,
while (0);
if (!l_fapirc)
{
- FAPI_DBG ("getMBvpdAttr: use MT keyword %d",o_keyword);
+ FAPI_DBG ("FindMTkeyword: use MT keyword %d",o_keyword);
}
return l_fapirc;
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttrData.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttrData.C
index 525792ff1..4b18e4038 100644
--- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttrData.C
+++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttrData.C
@@ -22,7 +22,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: getMBvpdAttrData.C,v 1.1 2014/12/11 13:39:02 whs Exp $
+// $Id: getMBvpdAttrData.C,v 1.2 2015/02/24 19:23:06 whs Exp $
/**
* @file getMBvpdAttrData.C
*
@@ -48,43 +48,64 @@ namespace getAttrData
// Attribute definition table
// ----------------------------------------------------------------------------
-// Attribute defintions
const MBvpdAttrDef g_MBVPD_ATTR_DEF_array [] =
{
-
-// Planar ISDIMM changes in V61 (ascii 11) and V63 (ascii 13)
- {ATTR_VPD_DIMM_RCD_IBT,ISDIMM,V13,MBVPD_KEYWORD_MT,34,UINT32_BY2_BY2|UINT8_DATA,0},
- {ATTR_VPD_DIMM_RCD_IBT,ISDIMM,VBASE,MBVPD_KEYWORD_MT,34,UINT32_BY2_BY2|DEFAULT_VALUE,0x64},
- {ATTR_VPD_DIMM_RCD_IBT,ALL_DIMM,ALL_VER,MBVPD_KEYWORD_MT,34,UINT32_BY2_BY2|DEFAULT_VALUE,0},
-
- {ATTR_VPD_DIMM_RCD_OUTPUT_TIMING,ISDIMM,V13,MBVPD_KEYWORD_MT,36,UINT8_BY2_BY2|BOTH_DIMMS,0},
- {ATTR_VPD_DIMM_RCD_OUTPUT_TIMING,ISDIMM,VBASE,MBVPD_KEYWORD_MT,35,UINT8_BY2_BY2|DEFAULT_VALUE,1},
- {ATTR_VPD_DIMM_RCD_OUTPUT_TIMING,ALL_DIMM,ALL_VER,MBVPD_KEYWORD_MT,36,UINT8_BY2_BY2|DEFAULT_VALUE,0},
-
- {ATTR_VPD_DRAM_WR_VREF,ISDIMM,V13,MBVPD_KEYWORD_MT,38,UINT32_BY2|UINT8_DATA|XLATE_RD_VREF,0},
+//----------------------------------------------------------------------------------
+// Attribute exceptions to use with SPDX or VSPD VD keyword
+// Note: Ideally, all new exception will be in this section and be for both
+// ISDIMMs and CDIMMMs
+//----------------------------------------------------------------------------------
+ {ATTR_VPD_DIMM_RCD_IBT,ALL_DIMM,VD_01,MBVPD_KEYWORD_MT,34,UINT32_BY2_BY2|UINT8_DATA,0},
+ {ATTR_VPD_DIMM_RCD_OUTPUT_TIMING,ALL_DIMM,VD_01,MBVPD_KEYWORD_MT,36,UINT8_BY2_BY2|BOTH_DIMMS,0},
+ {ATTR_VPD_DRAM_WR_VREF,ALL_DIMM,VD_01,MBVPD_KEYWORD_MT,38,UINT32_BY2|UINT8_DATA|XLATE_RD_VREF,0},
+
+//----------------------------------------------------------------------------------
+// Attribute exceptions to use with VINI VZ keyword
+// All entries should select either ISDIMM or CDIMM since both used the VZ keyword
+// Note: Ideally, there will be no more additions in this section as all future
+// DIMMs will use the VD keword
+//----------------------------------------------------------------------------------
+
+// Planar ISDIMM changes
+// Need to include these exceptions to support early Palmetto and Habanero without the VD keyword & VZ=13
+ {ATTR_VPD_DIMM_RCD_IBT,ISDIMM,VZ_13,MBVPD_KEYWORD_MT,34,UINT32_BY2_BY2|UINT8_DATA,0},
+ {ATTR_VPD_DIMM_RCD_OUTPUT_TIMING,ISDIMM,VZ_13,MBVPD_KEYWORD_MT,36,UINT8_BY2_BY2|BOTH_DIMMS,0},
+ // Create 3 reserved bytes in V13
+ {ATTR_VPD_DRAM_WR_VREF,ISDIMM,VZ_13,MBVPD_KEYWORD_MT,38,UINT32_BY2|UINT8_DATA|XLATE_RD_VREF,0},
+// Need to include these exceptions to support early Palmetto and Habanero with VZ=11 and 10
+ {ATTR_VPD_DIMM_RCD_IBT,ISDIMM,ALL_VZ,MBVPD_KEYWORD_MT,34,UINT32_BY2_BY2|DEFAULT_VALUE,0x64},
+ {ATTR_VPD_DIMM_RCD_OUTPUT_TIMING,ISDIMM,ALL_VZ,MBVPD_KEYWORD_MT,35,UINT8_BY2_BY2|DEFAULT_VALUE,1},
// CDIMM changes in V60 (ascii 10)
- {ATTR_VPD_TSYS_ADR,CDIMM,V10,MBVPD_KEYWORD_MR,49,UINT8_BY2|PORT00,0},
- {ATTR_VPD_TSYS_ADR,CDIMM,VBASE,MBVPD_KEYWORD_MR,51,UINT8_BY2|PORT00,0},
+// Need to include these exceptions to support pre DD 2.0 centaurs
+ {ATTR_VPD_TSYS_ADR,CDIMM,VZ_10,MBVPD_KEYWORD_MR,49,UINT8_BY2|PORT00,0},
+ {ATTR_VPD_TSYS_ADR,CDIMM,ALL_VZ,MBVPD_KEYWORD_MR,51,UINT8_BY2|PORT00,0},
- {ATTR_VPD_TSYS_DP18,CDIMM,V10,MBVPD_KEYWORD_MR,49,UINT8_BY2|PORT11,0},
- {ATTR_VPD_TSYS_DP18,CDIMM,VBASE,MBVPD_KEYWORD_MR,51,UINT8_BY2|PORT11,0},
+ {ATTR_VPD_TSYS_DP18,CDIMM,VZ_10,MBVPD_KEYWORD_MR,49,UINT8_BY2|PORT11,0},
+ {ATTR_VPD_TSYS_DP18,CDIMM,ALL_VZ,MBVPD_KEYWORD_MR,51,UINT8_BY2|PORT11,0},
- {ATTR_VPD_RLO,CDIMM,V10,MBVPD_KEYWORD_MT,60,UINT8_BY2|LOW_NIBBLE,0},
- {ATTR_VPD_RLO,CDIMM,VBASE,MBVPD_KEYWORD_MR,49,UINT8_BY2|LOW_NIBBLE,0},
+ {ATTR_VPD_RLO,CDIMM,VZ_10,MBVPD_KEYWORD_MT,60,UINT8_BY2|LOW_NIBBLE,0},
+ {ATTR_VPD_RLO,CDIMM,ALL_VZ,MBVPD_KEYWORD_MR,49,UINT8_BY2|LOW_NIBBLE,0},
- {ATTR_VPD_WLO,CDIMM,V10,MBVPD_KEYWORD_MT,60,UINT8_BY2|HIGH_NIBBLE,0},
- {ATTR_VPD_WLO,CDIMM,VBASE,MBVPD_KEYWORD_MR,49,UINT8_BY2|HIGH_NIBBLE,0},
+ {ATTR_VPD_WLO,CDIMM,VZ_10,MBVPD_KEYWORD_MT,60,UINT8_BY2|HIGH_NIBBLE,0},
+ {ATTR_VPD_WLO,CDIMM,ALL_VZ,MBVPD_KEYWORD_MR,49,UINT8_BY2|HIGH_NIBBLE,0},
- {ATTR_VPD_GPO,CDIMM,V10,MBVPD_KEYWORD_MT,61,UINT8_BY2,0},
- {ATTR_VPD_GPO,CDIMM,VBASE,MBVPD_KEYWORD_MR,50,UINT8_BY2,0},
+ {ATTR_VPD_GPO,CDIMM,VZ_10,MBVPD_KEYWORD_MT,61,UINT8_BY2,0},
+ {ATTR_VPD_GPO,CDIMM,ALL_VZ,MBVPD_KEYWORD_MR,50,UINT8_BY2,0},
+//----------------------------------------------------------------------------------
// Base Term Data definitions to be used if no other version exceptions
+// All entries to be ALL_DIMM ALL_VER
+// Note: No changes are expected in this section
+//----------------------------------------------------------------------------------
+// Base Term Data definitions to be used if no version exceptions
{ATTR_VPD_DRAM_RON,ALL_DIMM,ALL_VER,MBVPD_KEYWORD_MT,0,UINT8_BY2_BY2|XLATE_DRAM_RON,0},
{ATTR_VPD_DRAM_RTT_NOM,ALL_DIMM,ALL_VER,MBVPD_KEYWORD_MT,2,UINT8_BY2_BY2_BY4|XLATE_RTT_NOM,0},
{ATTR_VPD_DRAM_RTT_WR,ALL_DIMM,ALL_VER,MBVPD_KEYWORD_MT,10,UINT8_BY2_BY2_BY4|XLATE_RTT_WR,0},
{ATTR_VPD_ODT_RD,ALL_DIMM,ALL_VER,MBVPD_KEYWORD_MT,18,UINT8_BY2_BY2_BY4,0},
{ATTR_VPD_ODT_WR,ALL_DIMM,ALL_VER,MBVPD_KEYWORD_MT,26,UINT8_BY2_BY2_BY4,0},
+ {ATTR_VPD_DIMM_RCD_OUTPUT_TIMING,ALL_DIMM,ALL_VER,MBVPD_KEYWORD_MT,36,UINT8_BY2_BY2|DEFAULT_VALUE,0},
+ {ATTR_VPD_DIMM_RCD_IBT,ALL_DIMM,ALL_VER,MBVPD_KEYWORD_MT,34,UINT32_BY2_BY2|DEFAULT_VALUE,0},
{ATTR_VPD_CEN_RD_VREF,ALL_DIMM,ALL_VER,MBVPD_KEYWORD_MT,37,UINT32_BY2|UINT8_DATA|XLATE_RD_VREF,0},
{ATTR_VPD_DRAM_WR_VREF,ALL_DIMM,ALL_VER,MBVPD_KEYWORD_MT,38,UINT32_BY2|XLATE_WR_VREF,0},
{ATTR_VPD_DRAM_WRDDR4_VREF,ALL_DIMM,ALL_VER,MBVPD_KEYWORD_MT,42,UINT8_BY2,0},
@@ -105,7 +126,7 @@ const MBvpdAttrDef g_MBVPD_ATTR_DEF_array [] =
{ATTR_VPD_WLO,ALL_DIMM,ALL_VER,MBVPD_KEYWORD_MT,60,UINT8_BY2|HIGH_NIBBLE,0},
{ATTR_VPD_GPO,ALL_DIMM,ALL_VER,MBVPD_KEYWORD_MT,61,UINT8_BY2,0},
-// Base Phase Rotator definitions to be used if no other version exceptions
+// Base Phase Rotator definitions to be used if no version exceptions
{ATTR_VPD_CEN_PHASE_ROT_M0_CLK_P0,ALL_DIMM,ALL_VER,MBVPD_KEYWORD_MR,0,UINT8_BY2,0},
{ATTR_VPD_CEN_PHASE_ROT_M0_CLK_P1,ALL_DIMM,ALL_VER,MBVPD_KEYWORD_MR,1,UINT8_BY2,0},
{ATTR_VPD_CEN_PHASE_ROT_M1_CLK_P0,ALL_DIMM,ALL_VER,MBVPD_KEYWORD_MR,2,UINT8_BY2,0},
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.C
index 5f4a154dc..fda938c95 100644
--- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.C
+++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.C
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2013,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2015 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
@@ -20,7 +22,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: getMBvpdVersion.C,v 1.2 2014/02/12 22:14:44 mjjones Exp $
+// $Id: getMBvpdVersion.C,v 1.3 2015/02/24 19:23:56 whs Exp $
/**
* @file getMBvpdVersion.C
*
@@ -79,7 +81,7 @@ fapi::ReturnCode getMBvpdVersion(
FAPI_ERR("getMBvpdVersion:"
" less keyword data returned than expected %d < %d",
l_bufSize, sizeof(l_vpdVersion));
- const uint32_t & KEYWORD = sizeof(l_vpdVersion);
+ const uint32_t & KEYWORD = fapi::MBVPD_KEYWORD_VZ;
const uint32_t & RETURNED_SIZE = l_bufSize;
const fapi::Target & CHIP_TARGET = l_mbTarget;
FAPI_SET_HWP_ERROR(l_fapirc,RC_MBVPD_INSUFFICIENT_VPD_RETURNED);
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml b/src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml
index 47e0f1b77..5e27863d3 100644
--- a/src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml
+++ b/src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml
@@ -22,7 +22,7 @@
<!-- permissions and limitations under the License. -->
<!-- -->
<!-- IBM_PROLOG_END_TAG -->
-<!-- $Id: mvpd_errors.xml,v 1.22 2014/12/11 13:30:47 whs Exp $ -->
+<!-- $Id: mvpd_errors.xml,v 1.23 2015/02/24 19:25:00 whs Exp $ -->
<hwpErrors>
<!-- ********************************************************************* -->
<hwpError>
@@ -387,4 +387,18 @@
</callout>
</hwpError>
<!-- ********************************************************************* -->
+ <hwpError>
+ <rc>RC_MBVPD_ATTRIBUTE_NOT_FOUND</rc>
+ <description>
+ Attribute not found in attribute look up table
+ </description>
+ <ffdc>ATTR_ID</ffdc>
+ <ffdc>DIMM_TYPE</ffdc>
+ <ffdc>VERSION</ffdc>
+ <callout>
+ <procedure>CODE</procedure>
+ <priority>HIGH</priority>
+ </callout>
+ </hwpError>
+ <!-- ********************************************************************* -->
</hwpErrors>
OpenPOWER on IntegriCloud