diff options
author | Bill Schwartz <whs@us.ibm.com> | 2015-02-17 08:24:11 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-02-24 16:21:33 -0600 |
commit | e56b9afb738e9aea6af2589fd1f56d3d2ba77f5d (patch) | |
tree | 4a945adcfe5fc5b59a97b845f800e2ef3f10fd14 /src/usr/hwpf/test | |
parent | 9a3694c400f8c50da58459d0fbd91e3dc7a2ef28 (diff) | |
download | blackbird-hostboot-e56b9afb738e9aea6af2589fd1f56d3d2ba77f5d.tar.gz blackbird-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/test')
-rw-r--r-- | src/usr/hwpf/test/hwpMBvpdAccessorTest.H | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/src/usr/hwpf/test/hwpMBvpdAccessorTest.H b/src/usr/hwpf/test/hwpMBvpdAccessorTest.H index 723c97633..f7512469c 100644 --- a/src/usr/hwpf/test/hwpMBvpdAccessorTest.H +++ b/src/usr/hwpf/test/hwpMBvpdAccessorTest.H @@ -1146,35 +1146,49 @@ public: #endif TS_TRACE( "testGetTermData entry" ); - // ensure attribute look up table is in proper version order + // ensure attributes are in proper version order for (uint32_t i=0; - i <= fapi::getAttrData::g_MBVPD_ATTR_DEF_array_size; i++) + i < fapi::getAttrData::g_MBVPD_ATTR_DEF_array_size; i++) { fapi::AttributeId l_attrId = - fapi::getAttrData::g_MBVPD_ATTR_DEF_array[i].iv_attrId; + fapi::getAttrData::g_MBVPD_ATTR_DEF_array[i].iv_attrId; fapi::getAttrData::DimmType l_dimmType = - fapi::getAttrData::g_MBVPD_ATTR_DEF_array[i].iv_dimmType; + fapi::getAttrData::g_MBVPD_ATTR_DEF_array[i].iv_dimmType; fapi::getAttrData::VpdVersion l_version = - fapi::getAttrData::g_MBVPD_ATTR_DEF_array[i].iv_version; + fapi::getAttrData::g_MBVPD_ATTR_DEF_array[i].iv_version; // from this piont to the end of the table, for this attribute - // dimm type pair, the version should be less in value. + // dimm type and version type (VZ or VD), + // the version should be less in value. // Otherwise, an intended match will not be found - for (uint32_t j=i; - j <= fapi::getAttrData::g_MBVPD_ATTR_DEF_array_size; j++) + fapi::getAttrData::VpdVersion l_verType = + (fapi::getAttrData::VpdVersion) + (l_version & fapi::getAttrData::ALL_VER); + l_version = (fapi::getAttrData::VpdVersion) + (l_version & fapi::getAttrData::VER_MASK); + + for (uint32_t j=i+1; + j < fapi::getAttrData::g_MBVPD_ATTR_DEF_array_size; j++) { if ( (l_attrId == - fapi::getAttrData::g_MBVPD_ATTR_DEF_array[j].iv_attrId) && - (l_dimmType == - fapi::getAttrData::g_MBVPD_ATTR_DEF_array[j].iv_dimmType) && + fapi::getAttrData::g_MBVPD_ATTR_DEF_array[j].iv_attrId) && + (l_verType & + fapi::getAttrData::g_MBVPD_ATTR_DEF_array[j].iv_version & + fapi::getAttrData::ALL_VER) && + ((l_dimmType == + fapi::getAttrData::g_MBVPD_ATTR_DEF_array[j].iv_dimmType) || + ( fapi::getAttrData::ALL_DIMM == + fapi::getAttrData::g_MBVPD_ATTR_DEF_array[j].iv_dimmType)) && (l_version < - fapi::getAttrData::g_MBVPD_ATTR_DEF_array[j].iv_version)) + (fapi::getAttrData::g_MBVPD_ATTR_DEF_array[j].iv_version & + fapi::getAttrData::VER_MASK))) { TS_FAIL( "testGetTermData table error: " " attr 0x%08x dimm %d row %d version 0x%04x <" " row %d version 0x%04x", l_attrId,l_dimmType,i,l_version, j, - fapi::getAttrData::g_MBVPD_ATTR_DEF_array[j].iv_version); + (fapi::getAttrData::g_MBVPD_ATTR_DEF_array[j].iv_version & + fapi::getAttrData::VER_MASK)); } } } |