From 77a99242f79dbe5aaf47b950f070ccaeaa58d240 Mon Sep 17 00:00:00 2001 From: Andre Marin Date: Tue, 29 May 2018 08:37:46 -0500 Subject: Remove Nimbus dependencies from the SPD decoder Created a new pre_data_engine to set preliminary data needed before eff_config. Moved SPD to attribute mapping to eff_dimm structure and away from the SPD decoder to make it reusable for future memory controllers. Updated bugs in unit tests. Added SPD factory classes. This is only needed for Axone. Change-Id: Ief0a479ee1c7a4dab852ffb18b595564c0125e35 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/58611 Tested-by: FSP CI Jenkins Dev-Ready: ANDRE A. MARIN Tested-by: Jenkins Server Tested-by: HWSV CI Tested-by: Hostboot CI Reviewed-by: STEPHEN GLANCY Reviewed-by: Louis Stermole Reviewed-by: Jennifer A. Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/59470 Reviewed-by: Daniel M. Crowell Tested-by: Daniel M. Crowell --- .../chips/p9/procedures/hwp/memory/p9_mss_freq.C | 28 ++++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'src/import/chips/p9/procedures/hwp/memory/p9_mss_freq.C') diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_freq.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_freq.C index c767e87b7..e01918cd7 100644 --- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_freq.C +++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_freq.C @@ -45,8 +45,7 @@ #include // mss lib -#include -#include +#include #include #include #include @@ -55,6 +54,7 @@ #include #include #include +#include using fapi2::TARGET_TYPE_MCS; using fapi2::TARGET_TYPE_MCA; @@ -79,7 +79,7 @@ extern "C" // So for now, iterate over all the MCBIST. This isn't great as we do this work // twice for every MC. However, attribute access is cheap so this will suffice for // the time being. - const auto& l_mcbist = mss::find_target(i_target); + const auto l_mcbist = mss::find_target(i_target); std::vector< std::vector > l_min_dimm_freq(mss::MCS_PER_MC, std::vector (mss::PORTS_PER_MCS, 0) ); std::vector l_supported_freqs; @@ -93,6 +93,21 @@ extern "C" return FAPI2_RC_SUCCESS; } + // We will first set pre-eff_config attributes + for( const auto& d : mss::find_targets(l_mcbist)) + { + std::vector l_raw_spd; + FAPI_TRY(mss::spd::get_raw_data(d, l_raw_spd)); + + { + fapi2::ReturnCode l_rc(fapi2::FAPI2_RC_SUCCESS); + mss::spd::facade l_spd_decoder(d, l_raw_spd, l_rc); + + FAPI_TRY(l_rc, "Failed to initialize SPD facade for %s", mss::spd::c_str(d)); + FAPI_TRY(mss::set_pre_init_attrs(d, l_spd_decoder)); + } + } + // Get supported freqs for this MCBIST FAPI_TRY( mss::supported_freqs(l_mcbist, l_supported_freqs) ); @@ -105,15 +120,14 @@ extern "C" for (const auto& l_mca : mss::find_targets(l_mcs) ) { const auto l_mca_index = mss::index(l_mca); - std::vector< std::shared_ptr > l_factory_caches; fapi2::ReturnCode l_rc; // Get cached decoder - FAPI_TRY( mss::spd::populate_decoder_caches(l_mca, l_factory_caches), - "%s. Failed to populate decoder cache", mss::c_str(l_mca) ); + std::vector< mss::spd::facade > l_spd_facades; + FAPI_TRY( get_spd_decoder_list(l_mca, l_spd_facades) ); // Instantiation of class that calculates CL algorithm - mss::cas_latency l_cas_latency( l_mca, l_factory_caches, l_supported_freqs, l_rc ); + mss::cas_latency l_cas_latency( l_mca, l_spd_facades, l_supported_freqs, l_rc ); FAPI_TRY( l_rc, "%s. Failed to initialize cas_latency ctor", mss::c_str(l_mca) ); -- cgit v1.2.1