diff options
author | Andre Marin <aamarin@us.ibm.com> | 2017-02-21 00:43:35 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-03-03 16:08:22 -0500 |
commit | 6db2b8386af99416a5ad8782927d2891c6467336 (patch) | |
tree | ab694ec6be47bf32e1ac54d6209b5e53d9f80187 /src/import/chips/p9/procedures/hwp/memory/lib/spd | |
parent | d78ccfcd4bdac3fc3ae94ac5b3e260b85deb46cd (diff) | |
download | talos-hostboot-6db2b8386af99416a5ad8782927d2891c6467336.tar.gz talos-hostboot-6db2b8386af99416a5ad8782927d2891c6467336.zip |
Simplify spd factory mapping to share among controllers
Also happened to address RTC 163150 and RTC:152390
with this refactoring.
Change-Id: I72b92215063f270ccabe3732034ffaf4242de2ea
Original-Change-Id: Iaba29d96f577c74bda7c3b147c16749eb1d861e5
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36766
Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: Brian R. Silver <bsilver@us.ibm.com>
Reviewed-by: JACOB L. HARVEY <jlharvey@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: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/37418
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Tested-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory/lib/spd')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/lib/spd/spd_factory.C | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/spd/spd_factory.C b/src/import/chips/p9/procedures/hwp/memory/lib/spd/spd_factory.C index b6d605133..77a1d6a29 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/spd/spd_factory.C +++ b/src/import/chips/p9/procedures/hwp/memory/lib/spd/spd_factory.C @@ -774,7 +774,7 @@ fapi_try_exit: /// /// @brief Creates factory object & SPD data caches /// @param[in] i_target controller target -/// @param[out] o_factory_caches map of factory objects with a dimm position key +/// @param[out] o_factory_caches vector of factory objects /// @param[in] i_pDecoder custom decoder to populate cache (ignored for this specialization) /// @return FAPI2_RC_SUCCESS if okay /// @note This specialization is suited for creating a cache with platform @@ -782,7 +782,7 @@ fapi_try_exit: /// template<> fapi2::ReturnCode populate_decoder_caches( const fapi2::Target<TARGET_TYPE_MCS>& i_target, - std::map<uint32_t, std::shared_ptr<decoder> >& o_factory_caches, + std::vector< std::shared_ptr<decoder> >& o_factory_caches, const std::shared_ptr<decoder>& i_pDecoder) { // Input decoder for this version of populating cache would get overriden @@ -807,8 +807,8 @@ fapi2::ReturnCode populate_decoder_caches( const fapi2::Target<TARGET_TYPE_MCS>& FAPI_TRY( factory(l_dimm, l_spd, l_pDecoder), "%s. Failed SPD factory, could not instantiate decoder object", mss::c_str(i_target) ); - // Populate spd caches maps based on dimm pos - o_factory_caches.emplace( std::make_pair( pos(l_dimm), l_pDecoder ) ); + // Populate spd caches + o_factory_caches.push_back( l_pDecoder ); } // Populate some of the DIMM attributes early. This allows the following code to make @@ -825,7 +825,7 @@ fapi_try_exit: /// /// @brief Creates factory object & SPD data caches /// @param[in] i_target the dimm target -/// @param[out] o_factory_caches map of factory objects with a dimm position key +/// @param[out] o_factory_caches vector of factory objects /// @param[in] i_pDecoder custom decoder to populate cache (nullptr default) /// @return FAPI2_RC_SUCCESS if okay /// @note This specialization is suited for creating a cache with custom @@ -833,7 +833,7 @@ fapi_try_exit: /// template<> fapi2::ReturnCode populate_decoder_caches( const fapi2::Target<TARGET_TYPE_DIMM>& i_target, - std::map<uint32_t, std::shared_ptr<decoder> >& o_factory_caches, + std::vector< std::shared_ptr<decoder> >& o_factory_caches, const std::shared_ptr<decoder>& i_pDecoder) { if(i_pDecoder == nullptr) @@ -845,7 +845,7 @@ fapi2::ReturnCode populate_decoder_caches( const fapi2::Target<TARGET_TYPE_DIMM> // Custom decoder provided (usually done for testing) // Populate custom spd caches maps one dimm at a time - o_factory_caches.emplace( std::make_pair( pos(i_target), i_pDecoder ) ); + o_factory_caches.push_back( i_pDecoder ); // Populate some of the DIMM attributes early. This allows the following code to make // decisions based on DIMM information. Expressly done after the factory has decided on the SPD version |