summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/memory/lib/eff_config
diff options
context:
space:
mode:
authorBrian Silver <bsilver@us.ibm.com>2016-09-16 15:40:56 -0500
committerChristian R. Geddes <crgeddes@us.ibm.com>2016-09-29 18:02:17 -0400
commitab836fdcdf6a576d28821196c54cc7bf4e366428 (patch)
treea7ca055ea17a544a9c239e6f31c36bc4614a1078 /src/import/chips/p9/procedures/hwp/memory/lib/eff_config
parent439845c3ba52a509875ef439c66fe59c9bbabb28 (diff)
downloadtalos-hostboot-ab836fdcdf6a576d28821196c54cc7bf4e366428.tar.gz
talos-hostboot-ab836fdcdf6a576d28821196c54cc7bf4e366428.zip
Add an attribute to avoid the plug rules in partial good scenarios
Update test cases to verify attribute Change-Id: Ia94999cdb67e4745a9fb41bd0542b2e03b4bfa40 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29867 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: JACOB L. HARVEY <jlharvey@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Louis Stermole <stermole@us.ibm.com> Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29871 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory/lib/eff_config')
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/eff_config/plug_rules.C36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/plug_rules.C b/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/plug_rules.C
index fb6ce8347..f164aef2c 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/plug_rules.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/eff_config/plug_rules.C
@@ -179,6 +179,16 @@ fapi2::ReturnCode check_rank_config(const fapi2::Target<TARGET_TYPE_MCA>& i_targ
// We need to keep trak of current_err ourselves as the FAPI_ASSERT_NOEXIT macro doesn't.
fapi2::current_err = FAPI2_RC_SUCCESS;
+ // The user can avoid plug rules with an attribute. This is handy in partial good scenarios
+ uint8_t l_ignore_plug_rules = 0;
+ FAPI_TRY( mss::ignore_plug_rules(mss::find_target<TARGET_TYPE_MCS>(i_target), l_ignore_plug_rules) );
+
+ if (fapi2::ENUM_ATTR_MSS_IGNORE_PLUG_RULES_YES == l_ignore_plug_rules)
+ {
+ FAPI_INF("attribute set to ignore plug rules");
+ return FAPI2_RC_SUCCESS;
+ }
+
// If we have one DIMM, make sure it's in slot 0 and we're done.
if (i_kinds.size() == 1)
{
@@ -252,6 +262,9 @@ fapi2::ReturnCode check_rank_config(const fapi2::Target<TARGET_TYPE_MCA>& i_targ
return fapi2::current_err;
}
+
+fapi_try_exit:
+ return fapi2::current_err;
}
} // close namespace plug_rule
@@ -283,6 +296,16 @@ fapi2::ReturnCode eff_config::enforce_plug_rules(const fapi2::Target<fapi2::TARG
// the another 45m to find the next DIMM, etc.
fapi2::ReturnCodes l_rc = FAPI2_RC_SUCCESS;
+ // The user can avoid plug rules with an attribute. This is handy in partial good scenarios
+ uint8_t l_ignore_plug_rules = 0;
+ FAPI_TRY( mss::ignore_plug_rules(i_target, l_ignore_plug_rules) );
+
+ if (fapi2::ENUM_ATTR_MSS_IGNORE_PLUG_RULES_YES == l_ignore_plug_rules)
+ {
+ FAPI_INF("attribute set to ignore plug rules");
+ return FAPI2_RC_SUCCESS;
+ }
+
// We enforce DIMM type mixing per MCS
l_rc = (plug_rule::dimm_type_mixing(l_dimm_kinds) == FAPI2_RC_SUCCESS) ? l_rc : FAPI2_RC_INVALID_PARAMETER;
@@ -293,6 +316,9 @@ fapi2::ReturnCode eff_config::enforce_plug_rules(const fapi2::Target<fapi2::TARG
}
return l_rc;
+
+fapi_try_exit:
+ return fapi2::current_err;
}
///
@@ -318,6 +344,16 @@ fapi2::ReturnCode eff_config::enforce_plug_rules(const fapi2::Target<fapi2::TARG
// decoded and are valid before VPD was asked for.)
const auto l_dimm_kinds = mss::dimm::kind::vector(l_dimms);
+ // The user can avoid plug rules with an attribute. This is handy in partial good scenarios
+ uint8_t l_ignore_plug_rules = 0;
+ FAPI_TRY( mss::ignore_plug_rules(mss::find_target<TARGET_TYPE_MCS>(i_target), l_ignore_plug_rules) );
+
+ if (fapi2::ENUM_ATTR_MSS_IGNORE_PLUG_RULES_YES == l_ignore_plug_rules)
+ {
+ FAPI_INF("attribute set to ignore plug rules");
+ return FAPI2_RC_SUCCESS;
+ }
+
// Note that we do limited rank config checking here. Most of the checking is done via VPD decoding,
// meaning that if the VPD decoded the config then there's only a few rank related issues we need
// to check here.
OpenPOWER on IntegriCloud