diff options
author | Andre Marin <aamarin@us.ibm.com> | 2016-04-19 20:15:17 -0500 |
---|---|---|
committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2016-10-25 14:27:13 -0400 |
commit | aa0aea35f6bf4b8b67273b991e233738b694acbb (patch) | |
tree | f481eaed55279ba07d6523144d99e40c2f35d43e /src/import/chips/p9/procedures | |
parent | b6fdb223c2d667b87b0a47be26afe56100433097 (diff) | |
download | talos-hostboot-aa0aea35f6bf4b8b67273b991e233738b694acbb.tar.gz talos-hostboot-aa0aea35f6bf4b8b67273b991e233738b694acbb.zip |
Fix throttle procedure & MSS attribute clean up
Change-Id: I957c3301ef36cfec8674e51eb394c1b34492e0f4
Original-Change-Id: I7b545b65aaf9cdfea08ab2c5142898f5c971a74b
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23486
Tested-by: Jenkins Server
Tested-by: Hostboot CI
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: JACOB L. HARVEY <jlharvey@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Brian R. Silver <bsilver@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31752
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/p9_mss_utils_to_throttle.C | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_utils_to_throttle.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_utils_to_throttle.C index bca9c1bc1..3182388de 100644 --- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_utils_to_throttle.C +++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_utils_to_throttle.C @@ -52,26 +52,27 @@ extern "C" fapi2::ReturnCode p9_mss_utils_to_throttle( const fapi2::Target<TARGET_TYPE_MCS>& i_target ) { uint8_t l_databus_util[mss::PORTS_PER_MCS][mss::MAX_DIMM_PER_PORT] = {0}; - uint32_t l_dram_clocks[mss::PORTS_PER_MCS][mss::MAX_DIMM_PER_PORT] = {0}; - uint32_t l_num_commands_allowed[mss::PORTS_PER_MCS][mss::MAX_DIMM_PER_PORT] = 0; + uint32_t l_dram_clocks = 0; + uint32_t l_num_commands_allowed[mss::PORTS_PER_MCS][mss::MAX_DIMM_PER_PORT] = {}; FAPI_TRY( mss::databus_util(i_target, &l_databus_util[0][0]) ); - FAPI_TRY( mss::mrw_mem_m_dram_clocks(fapi2::Target<TARGET_TYPE_SYSTEM>(), &l_dram_clocks[0][0]) ); + FAPI_TRY( mss::mrw_mem_m_dram_clocks(l_dram_clocks) ); for( const auto& l_mca : i_target.getChildren<TARGET_TYPE_MCA>() ) { - l_port_num = mss::index(l_mca); + const auto l_port_num = mss::index(l_mca); - for( const auto& l_dimm : i_target.getChildren<TARGET_TYPE_DIMM>() ) + for( const auto& l_dimm : l_mca.getChildren<TARGET_TYPE_DIMM>() ) { - l_dimm_num = mss::index(l_dimm); + const auto l_dimm_num = mss::index(l_dimm); - l_num_commands_allowed = mss::commands_allowed_over_clock_window(l_databus_util[l_port_num][l_dimm_num], - l_dram_clocks[l_port_num][l_dimm_num]); + l_num_commands_allowed[l_port_num][l_dimm_num] = mss::commands_allowed_over_clock_window( + l_databus_util[l_port_num][l_dimm_num], + l_dram_clocks); } } - FAPI_ATTR_SET(fapi2::ATTR_MSS_THROTTLED_N_COMMANDS, i_target, l_num_commands_allowed) + FAPI_ATTR_SET(fapi2::ATTR_MSS_THROTTLED_N_COMMANDS, i_target, l_num_commands_allowed); FAPI_INF("End utils_to_throttle"); fapi_try_exit: |