Skip to content

Commit

Permalink
Create xlate equality function for dimm kind
Browse files Browse the repository at this point in the history
Change-Id: Ia2c85d7afa9872a49dd470ec5061b2f99f992db9
CQ: SW404201
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/47169
Dev-Ready: JACOB L. HARVEY <jlharvey@us.ibm.com>
Reviewed-by: STEPHEN GLANCY <sglancy@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: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/47173
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: William G. Hoffa <wghoffa@us.ibm.com>
  • Loading branch information
JacobHarvey authored and wghoffa committed Nov 10, 2017
1 parent 5fa02a9 commit e0cdfdd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions src/import/chips/p9/procedures/hwp/memory/lib/dimm/kind.H
Expand Up @@ -228,6 +228,24 @@ class kind
uint8_t iv_stack_type;
uint8_t iv_hybrid;
uint8_t iv_hybrid_memory_type;

///
/// @brief equal_config
/// @param[in] i_input_compare the i_kind to compare against
/// @return bool true iff the two kind are of the same kind for xlate purposes
/// @warning this does not compare the targets (iv_target,), mfgid, prim_stack_type nor hybrid type
///
inline bool equal_config(const kind& i_input_compare) const
{
return ((iv_master_ranks == i_input_compare.iv_master_ranks) &&
(iv_total_ranks == i_input_compare.iv_total_ranks) &&
(iv_dram_density == i_input_compare.iv_dram_density) &&
(iv_dram_width == i_input_compare.iv_dram_width) &&
(iv_dram_generation == i_input_compare.iv_dram_generation) &&
(iv_dimm_type == i_input_compare.iv_dimm_type) &&
(iv_rows == i_input_compare.iv_rows) &&
(iv_size == i_input_compare.iv_size));
}
};

}
Expand Down
2 changes: 1 addition & 1 deletion src/import/chips/p9/procedures/hwp/memory/lib/mc/xlate.C
Expand Up @@ -1926,7 +1926,7 @@ fapi2::ReturnCode setup_xlate_map_helper( std::vector<dimm::kind>& io_dimm_kinds
// Find the proper set function based on this DIMM kind.
const auto l_setup = std::find_if( xlate_map.begin(), xlate_map.end(), [k](const xlate_setup & x) -> bool
{
return x.iv_kind == k;
return x.iv_kind.equal_config(k);
} );

// If we didn't find it, raise a stink.
Expand Down

0 comments on commit e0cdfdd

Please sign in to comment.