diff options
author | Jacob Harvey <jlharvey@us.ibm.com> | 2017-10-04 14:20:07 -0500 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2017-11-10 09:38:48 -0500 |
commit | e0cdfdda35d69af5cab08d081a6d8be108584109 (patch) | |
tree | df15adbfc2b9bd4425f289c43ee267e30edf99b6 /src/import/chips/p9/procedures/hwp/memory | |
parent | 5fa02a909075081da87ea537d13cb7a61e543176 (diff) | |
download | talos-hostboot-e0cdfdda35d69af5cab08d081a6d8be108584109.tar.gz talos-hostboot-e0cdfdda35d69af5cab08d081a6d8be108584109.zip |
Create xlate equality function for dimm kind
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>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/lib/dimm/kind.H | 18 | ||||
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/lib/mc/xlate.C | 2 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/kind.H b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/kind.H index 048ec591d..fd2604061 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/dimm/kind.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/dimm/kind.H @@ -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)); + } }; } diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mc/xlate.C b/src/import/chips/p9/procedures/hwp/memory/lib/mc/xlate.C index 5d8486f3d..ed291f248 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/mc/xlate.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/mc/xlate.C @@ -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. |