diff options
author | Louis Stermole <stermole@us.ibm.com> | 2019-06-25 14:45:26 -0400 |
---|---|---|
committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2019-07-09 10:21:12 -0500 |
commit | 035e5f85fe8b3f1936f74c5fa424d6bf214ab67f (patch) | |
tree | 4390a9940fc114cf9410aa4a6d30d0acc8a328ae /src/import/chips/ocmb/explorer/procedures/hwp/memory | |
parent | d6bd1b69780193308c0a8156d2c7e86f0d76ccfe (diff) | |
download | talos-hostboot-035e5f85fe8b3f1936f74c5fa424d6bf214ab67f.tar.gz talos-hostboot-035e5f85fe8b3f1936f74c5fa424d6bf214ab67f.zip |
Fixes for p9a_mss_eff_config_thermal
Add setting of ATTR_EXP_MEM_WATT_TARGET
Use default slope/intercept when attribute has zero decoded value
Add check for if the power limit is greater than the intercept
Fix some trace string formatters for double variables
Change-Id: If44ee81248563a1ca8612099a19950b349dd4914
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79485
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@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: Mark Pizzutillo <mark.pizzutillo@ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com>
Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79502
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: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/chips/ocmb/explorer/procedures/hwp/memory')
3 files changed, 15 insertions, 6 deletions
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_mss_eff_config_thermal.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_mss_eff_config_thermal.C index 2c343be27..a261faa19 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_mss_eff_config_thermal.C +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_mss_eff_config_thermal.C @@ -142,6 +142,7 @@ extern "C" FAPI_TRY(mss::attr::set_total_pwr_slope(l_port, l_slope)); FAPI_TRY(mss::attr::set_total_pwr_intercept(l_port, l_intercept)); FAPI_TRY(mss::attr::set_dimm_thermal_limit(l_port, l_limit)); + FAPI_TRY(mss::attr::set_mem_watt_target(l_port, l_limit)); FAPI_INF( "PMIC current curve slope is %d, intercept is %d, limit is %d for %s", l_slope[0], l_intercept[0], l_limit[0], mss::c_str(l_port)); diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_decoder.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_decoder.C index 3770d62bb..709a1989f 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_decoder.C +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_decoder.C @@ -215,14 +215,17 @@ fapi2::ReturnCode get_power_attrs (const mss::throttle_type i_throttle_type, const auto l_dimm_pos = mss::index (l_dimm); mss::dimm::kind<> l_kind (l_dimm); mss::power_thermal::decoder<> l_decoder(l_kind); + fapi2::buffer<uint64_t> l_attr_value; FAPI_TRY( l_decoder.generate_encoding(), "%s Error in get_power_attrs", mss::c_str(l_dimm) ); // The first entry into these arrays must be valid // If we don't find any values, the attributes aren't found so go with some defaults - if (i_slope.empty() || i_slope[0] == 0) + l_attr_value = i_slope[0]; + + if (i_slope.empty() || !l_attr_value.getBit<TT::POWER_LIMIT_START, TT::POWER_LENGTH>()) { - FAPI_INF("%s ATTR_MSS_MRW_OCMB_PWR_SLOPE not found!!", mss::c_str(l_dimm)); + FAPI_INF("%s ATTR_MSS_MRW_OCMB_PWR_SLOPE not found or has zero values", mss::c_str(l_dimm)); o_slope[l_dimm_pos] = (i_throttle_type == mss::throttle_type::POWER) ? TT::POWER_SLOPE : TT::TOTAL_SLOPE; @@ -237,9 +240,11 @@ fapi2::ReturnCode get_power_attrs (const mss::throttle_type i_throttle_type, (i_throttle_type == mss::throttle_type::POWER) ? l_decoder.iv_vddr_slope : l_decoder.iv_total_slope; } - if (i_intercept.empty() || i_intercept[0] == 0) + l_attr_value = i_intercept[0]; + + if (i_intercept.empty() || !l_attr_value.getBit<TT::POWER_LIMIT_START, TT::POWER_LENGTH>()) { - FAPI_INF("%s ATTR_MSS_MRW_OCMB_PWR_INTERCEPT not found!!", mss::c_str(l_dimm)); + FAPI_INF("%s ATTR_MSS_MRW_OCMB_PWR_INTERCEPT not found or has zero values", mss::c_str(l_dimm)); o_intercept[l_dimm_pos] = (i_throttle_type == mss::throttle_type::POWER) ? TT::POWER_INT : TT::TOTAL_INT; @@ -254,9 +259,11 @@ fapi2::ReturnCode get_power_attrs (const mss::throttle_type i_throttle_type, (i_throttle_type == mss::throttle_type::POWER) ? l_decoder.iv_vddr_intercept : l_decoder.iv_total_intercept; } - if (i_thermal_power_limit.empty() || i_thermal_power_limit[0] == 0) + l_attr_value = i_thermal_power_limit[0]; + + if (i_thermal_power_limit.empty() || !l_attr_value.getBit<TT::THERMAL_START, TT::THERMAL_LENGTH>()) { - FAPI_INF("%s ATTR_MSS_MRW_OCMB_THERMAL_MEMORY_POWER_LIMIT not found!!", mss::c_str(l_dimm)); + FAPI_INF("%s ATTR_MSS_MRW_OCMB_THERMAL_MEMORY_POWER_LIMIT not found or has zero values", mss::c_str(l_dimm)); // The unit of limit and intercept is cA but limit is dA in mss::throttle_type::POWER // So we need to transfer them to the same unit diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_throttle_traits.H b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_throttle_traits.H index d782ce050..21e003434 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_throttle_traits.H +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/power_thermal/exp_throttle_traits.H @@ -123,6 +123,7 @@ class throttle_traits<mss::mc_type::EXPLORER> POWER_SLOPE_LENGTH = 12, POWER_INTERCEPT_START = 52, POWER_INTERCEPT_LENGTH = 12, + POWER_LENGTH = 32, }; //Positions and lengths of the encodings |