summaryrefslogtreecommitdiffstats
path: root/src/import
diff options
context:
space:
mode:
authorTsung Yeung <tyeung@us.ibm.com>2018-03-27 15:46:38 -0400
committerChristian R. Geddes <crgeddes@us.ibm.com>2019-04-10 12:14:25 -0500
commit468349f5827ca43a9d54b202c8bc86f349d3ae00 (patch)
treef2753807f98a20b79007b014a8b7fa1112e40e91 /src/import
parent763efd13a3311d19ae69dfdce4bd8683c18d5f25 (diff)
downloadtalos-hostboot-468349f5827ca43a9d54b202c8bc86f349d3ae00.tar.gz
talos-hostboot-468349f5827ca43a9d54b202c8bc86f349d3ae00.zip
Includes NVDIMM in workaround for self-time refresh
Change-Id: I2a896739fdc24b62b7c464edcc1c26d16e78f300 Original-Change-Id: I02b7be92d91aacd78188de6dc7b2c428701fa794 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56333 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+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: Louis Stermole <stermole@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/75751 Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Tested-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import')
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mca_workarounds.C30
1 files changed, 24 insertions, 6 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mca_workarounds.C b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mca_workarounds.C
index af3fc9d54..6bc8eaa64 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mca_workarounds.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/mca_workarounds.C
@@ -61,19 +61,37 @@ bool check_str_non_tsv_parity_workaround(const fapi2::Target<fapi2::TARGET_TYPE_
const uint64_t i_idle_power_control)
{
const auto l_less_than_dd2 = chip_ec_nimbus_lt_2_0(i_target);
+ uint8_t l_hybrid[MAX_DIMM_PER_PORT] = {};
+ uint8_t l_stack_type[MAX_DIMM_PER_PORT] = {};
+ bool l_tsv = false;
+ bool l_str_enabled = false;
+ bool l_is_nvdimm = false;
+
+ // Figure out if any hybrid memory is plugged
+ FAPI_TRY(mss::eff_hybrid(i_target, l_hybrid));
+
+ // If hybrid memory is plugged, what kind?
+ // Checking the first dimm here is enough as the plug rules
+ // only allow single drop for NVDIMM
+ if (l_hybrid[0] == fapi2::ENUM_ATTR_EFF_HYBRID_IS_HYBRID)
+ {
+ uint8_t l_hybrid_mem_type[MAX_DIMM_PER_PORT] = {};
+ FAPI_TRY(mss::eff_hybrid_memory_type(i_target, l_hybrid_mem_type));
+ l_is_nvdimm = (l_hybrid_mem_type[0] == fapi2::ENUM_ATTR_EFF_HYBRID_MEMORY_TYPE_NVDIMM);
+ }
// If either STR is enabled, STR is enabled for the whole system
// Per the power thermal team, we only need to check PD_AND_STR and PD_AND_STR_CLK_STOP
- const bool l_str_enabled = (i_power_control == fapi2::ENUM_ATTR_MSS_MRW_POWER_CONTROL_REQUESTED_PD_AND_STR ||
- i_power_control == fapi2::ENUM_ATTR_MSS_MRW_POWER_CONTROL_REQUESTED_PD_AND_STR_CLK_STOP) ||
- (i_idle_power_control == fapi2::ENUM_ATTR_MSS_MRW_IDLE_POWER_CONTROL_REQUESTED_PD_AND_STR ||
- i_idle_power_control == fapi2::ENUM_ATTR_MSS_MRW_IDLE_POWER_CONTROL_REQUESTED_PD_AND_STR_CLK_STOP);
+ // If nvdimm is plugged, STR is also needed
+ l_str_enabled = (i_power_control == fapi2::ENUM_ATTR_MSS_MRW_POWER_CONTROL_REQUESTED_PD_AND_STR ||
+ i_power_control == fapi2::ENUM_ATTR_MSS_MRW_POWER_CONTROL_REQUESTED_PD_AND_STR_CLK_STOP) ||
+ (i_idle_power_control == fapi2::ENUM_ATTR_MSS_MRW_IDLE_POWER_CONTROL_REQUESTED_PD_AND_STR ||
+ i_idle_power_control == fapi2::ENUM_ATTR_MSS_MRW_IDLE_POWER_CONTROL_REQUESTED_PD_AND_STR_CLK_STOP) ||
+ l_is_nvdimm;
// Now checks whether the DIMM's are TSV
// Note: eff_config plug rules will require that the whole MCA either have TSV or non-TSV DIMMs
// As such, it is fine to just check DIMM0 for if it is a TSV DIMM or not
- uint8_t l_stack_type[MAX_DIMM_PER_PORT] = {};
- bool l_tsv = false;
FAPI_TRY(mss::eff_prim_stack_type(i_target, l_stack_type));
// If DIMM0 is a TSV, set to true (DIMM0 has to exist and needs to equal DIMM0 if it's 3DS)
OpenPOWER on IntegriCloud