diff options
author | Louis Stermole <stermole@us.ibm.com> | 2019-05-02 15:06:18 -0400 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2019-05-07 14:50:10 -0500 |
commit | ea434a2363ec824c5b746389c9f7a22d924c7a0a (patch) | |
tree | bfe8ea604ef2b3f22c2bc66929e996e860658b72 | |
parent | a2ee107c441a4aad0744897f3dbc0d883dbf6f4e (diff) | |
download | talos-hostboot-ea434a2363ec824c5b746389c9f7a22d924c7a0a.tar.gz talos-hostboot-ea434a2363ec824c5b746389c9f7a22d924c7a0a.zip |
Fix Explorer getRSP for endianness and buffer size
Add call to correct response data endianness
Fix number of bytes read from data buffer
Change-Id: I2dafb40b3a89826c1e3fede9c439b848404363a6
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/76887
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com>
Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/76902
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Tested-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r-- | src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C index 57464bb8a..4db9ebc12 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C @@ -533,11 +533,12 @@ fapi2::ReturnCode getRSP( if (o_rsp.response_length > 0) { // make sure expected size is a multiple of 8 - o_data.resize( o_rsp.response_length + - (8 - (o_rsp.response_length % 8)) ); + const uint32_t l_padding = ((o_rsp.response_length % 8) > 0) ? (8 - (o_rsp.response_length % 8)) : 0; + o_data.resize( o_rsp.response_length + l_padding ); FAPI_INF("Reading response data..."); FAPI_TRY( fapi2::getMMIO(i_target, EXPLR_IB_DATA_ADDR, BUFFER_TRANSACTION_SIZE, o_data) ); + FAPI_TRY( correctMMIOEndianForStruct(o_data) ); } else { |