summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_freq.C
diff options
context:
space:
mode:
authorLouis Stermole <stermole@us.ibm.com>2019-12-16 10:16:07 -0500
committerDaniel M Crowell <dcrowell@us.ibm.com>2020-01-29 15:05:28 -0600
commit6b29b3829fc9ff676662c4e520c13ded41d070fd (patch)
tree2a6ad0b08c4d97d6e1d5111b9135f4ebb8ca9eaf /src/import/chips/p9a/procedures/hwp/memory/p9a_mss_freq.C
parent1a19ea2ae50c02e3cc76004fb9b8a79f6b8f7182 (diff)
downloadtalos-hostboot-6b29b3829fc9ff676662c4e520c13ded41d070fd.tar.gz
talos-hostboot-6b29b3829fc9ff676662c4e520c13ded41d070fd.zip
Change p9a_mss_freq to work on PROC_CHIP target
Previously p9a_mss_freq ran on the MEM_PORT target, even though the freq domain is at the PROC_CHIP level. This change will allow DDIMMs to be binned to the same freq across the domain. Also removes a lot of FAPI_INF messages to reduce UT log size. Change-Id: I7d4e2ee8897fdd62c0672d96cc1731c7a14643dd Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/88736 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> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Dev-Ready: Louis Stermole <stermole@us.ibm.com> Reviewed-by: Mark Pizzutillo <mark.pizzutillo@ibm.com> Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/89672 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>
Diffstat (limited to 'src/import/chips/p9a/procedures/hwp/memory/p9a_mss_freq.C')
-rw-r--r--src/import/chips/p9a/procedures/hwp/memory/p9a_mss_freq.C39
1 files changed, 22 insertions, 17 deletions
diff --git a/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_freq.C b/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_freq.C
index 91b4fdbe3..4e8db7142 100644
--- a/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_freq.C
+++ b/src/import/chips/p9a/procedures/hwp/memory/p9a_mss_freq.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2018,2019 */
+/* Contributors Listed Below - COPYRIGHT 2018,2020 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -54,37 +54,42 @@
/// @param[in] i_target port target
/// @return FAPI2_RC_SUCCESS iff ok
///
-fapi2::ReturnCode p9a_mss_freq( const fapi2::Target<fapi2::TARGET_TYPE_MEM_PORT>& i_target )
+fapi2::ReturnCode p9a_mss_freq( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target )
{
mss::display_git_commit_info("p9a_mss_freq");
// If there are no DIMM, we can just get out.
- if (mss::count_dimm(i_target) == 0)
+ if (mss::count_dimm(mss::find_targets<fapi2::TARGET_TYPE_MEM_PORT>(i_target)) == 0)
{
FAPI_INF("Seeing no DIMM on %s, no freq to set", mss::c_str(i_target));
return fapi2::FAPI2_RC_SUCCESS;
}
// We will first set pre-eff_config attribes
- for(const auto& d : mss::find_targets<fapi2::TARGET_TYPE_DIMM>(i_target))
+ // Note that we have to go through the MEM_PORT to get to the DIMM targets because of the
+ // target hierarchy in Axone
+ for(const auto& p : mss::find_targets<fapi2::TARGET_TYPE_MEM_PORT>(i_target))
{
- std::vector<uint8_t> l_raw_spd;
- FAPI_TRY(mss::spd::get_raw_data(d, l_raw_spd));
+ for(const auto& d : mss::find_targets<fapi2::TARGET_TYPE_DIMM>(p))
{
- // Gets the SPD facade
- fapi2::ReturnCode l_rc(fapi2::FAPI2_RC_SUCCESS);
- mss::spd::facade l_spd_decoder(d, l_raw_spd, l_rc);
+ std::vector<uint8_t> l_raw_spd;
+ FAPI_TRY(mss::spd::get_raw_data(d, l_raw_spd));
+ {
+ // Gets the SPD facade
+ fapi2::ReturnCode l_rc(fapi2::FAPI2_RC_SUCCESS);
+ mss::spd::facade l_spd_decoder(d, l_raw_spd, l_rc);
- // Checks that the facade was setup correctly
- FAPI_TRY( l_rc, "Failed to initialize SPD facade for %s", mss::spd::c_str(d) );
+ // Checks that the facade was setup correctly
+ FAPI_TRY( l_rc, "Failed to initialize SPD facade for %s", mss::spd::c_str(d) );
- // Set pre-eff_config SPD driven attributes
- FAPI_TRY( (mss::gen::attr_engine<mss::proc_type::AXONE, mss::pre_data_init_fields>::set(l_spd_decoder)),
- "Failed gen::attr_engine<mss::proc_type::AXONE, mss::pre_data_init_fields>::set on %s", mss::spd::c_str(d) );
+ // Set pre-eff_config SPD driven attributes
+ FAPI_TRY( (mss::gen::attr_engine<mss::proc_type::AXONE, mss::pre_data_init_fields>::set(l_spd_decoder)),
+ "Failed gen::attr_engine<mss::proc_type::AXONE, mss::pre_data_init_fields>::set on %s", mss::spd::c_str(d) );
- // Set pre_eff_config attributes derived from other attributes
- FAPI_TRY( (mss::gen::attr_engine<mss::proc_type::AXONE, mss::generic_metadata_fields>::set(d)),
- "Failed gen::attr_engine<mss::proc_type::AXONE, mss::generic_metadata_fields>::set on %s", mss::spd::c_str(d) );
+ // Set pre_eff_config attributes derived from other attributes
+ FAPI_TRY( (mss::gen::attr_engine<mss::proc_type::AXONE, mss::generic_metadata_fields>::set(d)),
+ "Failed gen::attr_engine<mss::proc_type::AXONE, mss::generic_metadata_fields>::set on %s", mss::spd::c_str(d) );
+ }
}
}
OpenPOWER on IntegriCloud