diff options
author | Bill Schwartz <whs@us.ibm.com> | 2015-04-07 14:28:32 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-04-09 22:11:11 -0500 |
commit | b13486920ba90ada1975271a6dd3e61cd8b96a66 (patch) | |
tree | 0431139f1a879a584d21cabedb597b6c86aa0823 /src/usr/hwpf | |
parent | 3cbc81b7e004d0434fc6679a8d37716ff1e7d675 (diff) | |
download | talos-hostboot-b13486920ba90ada1975271a6dd3e61cd8b96a66.tar.gz talos-hostboot-b13486920ba90ada1975271a6dd3e61cd8b96a66.zip |
Fix ATTR_VPD_DIMM_RCD_IBT
For UINT32_BY2_BY2, need to increment to next vpd data by size of UINT8_DATA,
UINT16_DATA, or UINT32_DATA
Change-Id: Idb61cdaa2923a1fef8ee8e3d18de5241e873aa1a
RTC:117485
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16918
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Elizabeth Liner <eliner@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf')
-rw-r--r-- | src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.C | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.C index 7be8ed20b..c13e06510 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.5 2015/02/24 19:22:51 whs Exp $ +// $Id: getMBvpdAttr.C,v 1.6 2015/04/07 20:21:37 whs Exp $ /** * @file getMBvpdAttr.C * @@ -928,13 +928,25 @@ fapi::ReturnCode returnValue (const MBvpdAttrDef* i_pAttrDef, } uint16_t l_dataSpecial = SPECIAL_DATA_MASK & l_special; + uint8_t l_vpdIncrement = 4; //default to 4 byte vpd field + if (UINT8_DATA == l_dataSpecial) + { + l_vpdIncrement = 1; // vpd is only 1 byte + } + else if (UINT16_DATA == l_dataSpecial) + { + l_vpdIncrement = 2; // vpd is 2 bytes + } + for (uint8_t l_port=0; l_port<2;l_port++) { + uint8_t l_vpdOffset = 0; for (uint8_t l_j=0; l_j<NUM_DIMMS; l_j++) { uint32_t l_value = getUint32 (l_dataSpecial, &(i_pBuffer-> - mb_mba[i_pos].mba_port[l_port].port_attr[l_attrOffset])); + mb_mba[i_pos].mba_port[l_port].port_attr[l_attrOffset+l_vpdOffset])); (*(UINT32_BY2_BY2_t*)o_pVal)[l_port][l_j] = l_value; + l_vpdOffset += l_vpdIncrement; } } break; |