Skip to content

Commit

Permalink
Fix EFD processor indexing error
Browse files Browse the repository at this point in the history
Change-Id: Idcdf0dcc490d941212ec884fa3b80f30be216fee
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/87797
Dev-Ready: Mark Pizzutillo <mark.pizzutillo@ibm.com>
Reviewed-by: RYAN P KING <rpking@us.ibm.com>
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>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com>
Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/87801
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
  • Loading branch information
markypizz authored and dcrowell77 committed Dec 2, 2019
1 parent 7e3eaed commit 1ac7a33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/import/generic/memory/lib/data_engine/data_engine_utils.H
Expand Up @@ -215,8 +215,8 @@ inline fapi2::ReturnCode update_data(const std::shared_ptr<efd::base_decoder>& i
const auto l_ocmb = i_efd_data->get_ocmb_target();

// mss::index of rank number will % 4 (RANKS_PER_DIMM) to get us the corresponding dimm
const size_t l_dimm_index = mss::index(i_efd_data->get_rank());
const auto l_dimm_rank = i_efd_data->get_rank() % mss::MAX_RANK_PER_DIMM; // TK HARDCODE TEST REMOVE ME!
const auto l_dimm_index = i_efd_data->get_rank() / mss::MAX_RANK_PER_DIMM;
const auto l_dimm_rank = i_efd_data->get_rank() % mss::MAX_RANK_PER_DIMM;

FAPI_ASSERT( l_dimm_index < X,
fapi2::MSS_OUT_OF_BOUNDS_INDEXING()
Expand Down
2 changes: 1 addition & 1 deletion src/import/generic/memory/lib/utils/index.H
Expand Up @@ -91,7 +91,7 @@ inline void sort_targets_by_index(std::vector<fapi2::Target<T>>& io_targets)
}

///
/// @brief Return an attribute array index from a rank number
/// @brief Return a dimm rank / attribute array index from a port rank number
/// @param[in] i_rank uint64_t a rank number DIMM0 {0, 1, 2, 3} DIMM1 {0, 1, 2, 3}
/// @return size_t the attribute array index.
///
Expand Down

0 comments on commit 1ac7a33

Please sign in to comment.