summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures
diff options
context:
space:
mode:
authorJacob Harvey <jlharvey@us.ibm.com>2017-07-26 16:24:31 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-08-05 21:24:45 -0400
commit64a57a5c7426804af30ddfe98f442a0b67c6ab3c (patch)
tree7337f57488a04fe92ef995d14b3168750a09c242 /src/import/chips/p9/procedures
parentd88bd7ff02db7dce43825ef31ae70153d5f7d0ee (diff)
downloadtalos-hostboot-64a57a5c7426804af30ddfe98f442a0b67c6ab3c.tar.gz
talos-hostboot-64a57a5c7426804af30ddfe98f442a0b67c6ab3c.zip
Add in check for no DIMMs under MCS
Change-Id: I987cd2f9c8380435da54c1a3549ab3e3d5ee398d Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43714 Reviewed-by: STEPHEN GLANCY <sglancy@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: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Louis Stermole <stermole@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43723 Reviewed-by: Hostboot Team <hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures')
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/throttle.C24
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/p9_mss_bulk_pwr_throttles.C5
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config.C9
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config_thermal.C10
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/p9_mss_utils_to_throttle.C8
-rw-r--r--src/import/chips/p9/procedures/xml/error_info/p9_memory_mss_eff_config_thermal.xml13
6 files changed, 37 insertions, 32 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/throttle.C b/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/throttle.C
index be742b07b..3e7c51500 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/throttle.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/power_thermal/throttle.C
@@ -672,6 +672,11 @@ fapi2::ReturnCode update_runtime_throttles( const std::vector< fapi2::Target<fap
{
for (const auto& l_mcs : i_targets)
{
+ if (mss::count_dimm(l_mcs) == 0)
+ {
+ continue;
+ }
+
uint16_t l_run_slot [PORTS_PER_MCS] = {};
uint16_t l_run_port [PORTS_PER_MCS] = {};
uint16_t l_calc_slot [PORTS_PER_MCS] = {};
@@ -720,21 +725,20 @@ fapi2::ReturnCode set_runtime_m_and_watt_limit( const std::vector< fapi2::Target
uint32_t l_count_dimms_vec = 0;
uint32_t l_watt_target = 0;
- FAPI_TRY( mrw_vmem_regulator_power_limit_per_dimm_ddr4(l_vmem_power_limit_dimm));
- FAPI_TRY( mrw_mem_m_dram_clocks(l_m_clocks));
- FAPI_TRY( mrw_max_number_dimms_possible_per_vmem_regulator(l_max_dimms));
-
for (const auto& l_mcs : i_targets)
{
l_count_dimms_vec += mss::count_dimm(l_mcs);
}
- //Let's make sure we have some DIMMs installed or else we get a divide by zero
- FAPI_ASSERT( l_count_dimms_vec != 0,
- fapi2::MSS_EMPTY_VECTOR_PASSED_TO_EFF_CONFIG_THERMAL()
- .set_DIMM_COUNT(l_count_dimms_vec)
- .set_MCS_COUNT(i_targets.size()),
- "No DIMMS installed on vector of MCS");
+ if ( l_count_dimms_vec == 0)
+ {
+ FAPI_INF("No DIMMs found. Can't calculate WATT_TARGET");
+ return fapi2::FAPI2_RC_SUCCESS;
+ }
+
+ FAPI_TRY( mrw_vmem_regulator_power_limit_per_dimm_ddr4(l_vmem_power_limit_dimm));
+ FAPI_TRY( mrw_mem_m_dram_clocks(l_m_clocks));
+ FAPI_TRY( mrw_max_number_dimms_possible_per_vmem_regulator(l_max_dimms));
//Now calculate the watt target
//Calculate max power available / number of dimms configured on the VDDR rail
diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_bulk_pwr_throttles.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_bulk_pwr_throttles.C
index 0357a92ed..a74e51ba0 100644
--- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_bulk_pwr_throttles.C
+++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_bulk_pwr_throttles.C
@@ -66,6 +66,11 @@ extern "C"
for ( const auto& l_mcs : i_targets)
{
+ if (mss::count_dimm (l_mcs) == 0)
+ {
+ continue;
+ }
+
uint16_t l_slot [mss::PORTS_PER_MCS] = {};
uint16_t l_port [mss::PORTS_PER_MCS] = {};
uint32_t l_power [mss::PORTS_PER_MCS] = {};
diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config.C
index 40ccd52b0..4d43c83f3 100644
--- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config.C
+++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config.C
@@ -50,6 +50,7 @@
#include <lib/shared/mss_kind.H>
#include <lib/dimm/eff_dimm.H>
#include <lib/eff_config/plug_rules.H>
+#include <lib/utils/count_dimm.H>
///
/// @brief Configure the attributes for each controller
@@ -60,6 +61,12 @@
fapi2::ReturnCode p9_mss_eff_config( const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target,
const bool i_decode_spd_only )
{
+ if ( mss::count_dimm(i_target) == 0 )
+ {
+ FAPI_INF("No DIMMs found on %s... Skipping p9_mss_eff_config", mss::c_str(i_target));
+ return fapi2::FAPI2_RC_SUCCESS;
+ }
+
fapi2::ReturnCode l_rc;
std::vector< std::shared_ptr<mss::spd::decoder> > l_factory_caches;
// Caches
@@ -84,8 +91,6 @@ fapi2::ReturnCode p9_mss_eff_config( const fapi2::Target<fapi2::TARGET_TYPE_MCS>
for( const auto& l_cache : l_factory_caches )
{
-
-
std::shared_ptr<mss::eff_dimm> l_eff_dimm;
FAPI_TRY( mss::eff_dimm::eff_dimm_factory( l_cache, l_eff_dimm));
diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config_thermal.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config_thermal.C
index 4c1ca1cff..716d80f8f 100644
--- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config_thermal.C
+++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_eff_config_thermal.C
@@ -79,11 +79,6 @@ extern "C"
FAPI_TRY( mss::mrw_thermal_memory_power_limit (l_tthermal_power_limit.data()) );
FAPI_TRY( mss::power_thermal::set_runtime_m_and_watt_limit(i_targets));
- FAPI_ASSERT( i_targets.size() != 0,
- fapi2::MSS_EMPTY_VECTOR_PASSED_TO_EFF_CONFIG_THERMAL()
- .set_MCS_COUNT(0),
- "Empty vector passed into p9_mss_eff_config_thermal procedure");
-
for (size_t i = 0; i < mss::power_thermal::SIZE_OF_POWER_CURVES_ATTRS; ++i)
{
for (const auto l_cur : l_tslope)
@@ -169,6 +164,11 @@ extern "C"
//Set VDDR+VPP power curve values
for ( const auto& l_mcs : i_targets )
{
+ if (mss::count_dimm(l_mcs) == 0)
+ {
+ continue;
+ }
+
FAPI_TRY( mss::power_thermal::get_power_attrs(l_mcs,
l_slope,
l_intercept,
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 b35e7fde9..76117735b 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
@@ -73,6 +73,11 @@ extern "C"
for( const auto& l_mcs : i_targets )
{
+ if (mss::count_dimm(l_mcs) == 0)
+ {
+ continue;
+ }
+
uint32_t l_input_databus_util [mss::PORTS_PER_MCS] = {};
uint32_t l_max_databus_util = {};
uint32_t l_dram_clocks = 0;
@@ -94,9 +99,8 @@ extern "C"
l_input_databus_util[mss::index(l_mca)]);
const auto l_port_num = mss::index(l_mca );
- const auto l_count = mss::count_dimm(l_mca);
- if (l_count == 0)
+ if (mss::count_dimm(l_mca) == 0)
{
continue;
}
diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_memory_mss_eff_config_thermal.xml b/src/import/chips/p9/procedures/xml/error_info/p9_memory_mss_eff_config_thermal.xml
index fbe43aa6f..a17025176 100644
--- a/src/import/chips/p9/procedures/xml/error_info/p9_memory_mss_eff_config_thermal.xml
+++ b/src/import/chips/p9/procedures/xml/error_info/p9_memory_mss_eff_config_thermal.xml
@@ -190,19 +190,6 @@
</callout>
</hwpError>
- <hwpError>
- <rc>RC_MSS_EMPTY_VECTOR_PASSED_TO_EFF_CONFIG_THERMAL</rc>
- <description>
- There are either no DIMMS or no MCS in the vector passed into the memory power thermal functions
- </description>
- <ffdc>MCS_COUNT</ffdc>
- <ffdc>DIMM_COUNT</ffdc>
- <callout>
- <procedure>CODE</procedure>
- <priority>HIGH</priority>
- </callout>
- </hwpError>
-
<hwpError>
<rc>RC_MSS_OUTPUT_OVERFLOW_CALC_UTIL</rc>
<description>
OpenPOWER on IntegriCloud