diff options
| author | Bill Schwartz <whs@us.ibm.com> | 2014-02-07 17:54:33 -0600 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-02-13 14:18:19 -0600 |
| commit | b27f3afb24e832217c5bffccd57fe8c9cc76a081 (patch) | |
| tree | e48682fdde1b491a8dc9a11581ac555e5c419c2b /src/usr/hwpf/hwp/mvpd_accessors | |
| parent | ecfc6a3a5aa975d7c72b940f5a5c1d969dfb6712 (diff) | |
| download | blackbird-hostboot-b27f3afb24e832217c5bffccd57fe8c9cc76a081.tar.gz blackbird-hostboot-b27f3afb24e832217c5bffccd57fe8c9cc76a081.zip | |
ATTR_VPD_CKE_PWR_MAP uint32_t [2] to uint64_t
Attribute ATTR_VPD_CKE_PWR_MAP has changed from uint32_t [2] to uint64_t.
Update HWP Accessor getMBvpdTermData to match return type.
Change-Id: I7191a495b23fac6897639c36a706f030046bbf6c
RTC: 97264
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/8697
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: Brian H. Horton <brianh@linux.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/getMBvpdTermData.C | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C index 365986955..c5e612eab 100644 --- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C +++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: getMBvpdTermData.C,v 1.6 2013/10/31 18:03:28 whs Exp $ +// $Id: getMBvpdTermData.C,v 1.8 2014/02/10 19:57:04 whs Exp $ /** * @file getMBvpdTermData.C * @@ -457,18 +457,23 @@ fapi::ReturnCode getMBvpdTermData( } break; } - // return the uint16_t [2] attributes from the MT keyword buffer - // return the uint32_t [2] attributes from the MT keyword buffer + // return the uint64_t attributes from the MT keyword buffer // need to consider endian since they are word fields 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[l_attrOffset]; - (*l_pVal)[l_port] = FAPI_BE32TOH(*l_pWord); - } + uint64_t (* l_pVal) = (uint64_t (*))o_pVal; + + uint32_t * l_pWord = (uint32_t *)&l_pMtBuffer-> + mb_mba[l_pos].mba_port[0].port_attr[l_attrOffset]; + uint32_t l_port0 = FAPI_BE32TOH(*l_pWord); + + l_pWord = (uint32_t *)&l_pMtBuffer-> + mb_mba[l_pos].mba_port[1].port_attr[l_attrOffset]; + uint32_t l_port1 = FAPI_BE32TOH(*l_pWord); + + (*l_pVal) = ( ((static_cast<uint64_t>(l_port0))<<32) | + (static_cast<uint64_t>(l_port1)) ); + break; } // return the uint16_t [2] attributes from the MT keyword buffer |

