diff options
author | Brian Silver <bsilver@us.ibm.com> | 2016-09-16 15:40:56 -0500 |
---|---|---|
committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2016-09-29 18:02:17 -0400 |
commit | ab836fdcdf6a576d28821196c54cc7bf4e366428 (patch) | |
tree | a7ca055ea17a544a9c239e6f31c36bc4614a1078 /src/import/chips | |
parent | 439845c3ba52a509875ef439c66fe59c9bbabb28 (diff) | |
download | talos-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')
3 files changed, 73 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. diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mss_attribute_accessors.H b/src/import/chips/p9/procedures/hwp/memory/lib/mss_attribute_accessors.H index c8979fa71..f0e498b66 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/mss_attribute_accessors.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/mss_attribute_accessors.H @@ -16680,6 +16680,28 @@ fapi_try_exit: return fapi2::current_err; } +/// +/// @brief ATTR_MSS_IGNORE_PLUG_RULES getter +/// @param[in] const ref to the TARGET_TYPE_MCS +/// @param[out] uint8_t& reference to store the value +/// @note Generated by gen_accessors.pl generateParameters (NODIM A) +/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK +/// @note Set to IGNORE if you want to ignore the plug rules. Sometimes this is needed in +/// a partial-good +/// configuration +/// +inline fapi2::ReturnCode ignore_plug_rules(const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target, uint8_t& o_value) +{ + + FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_MSS_IGNORE_PLUG_RULES, i_target, o_value) ); + return fapi2::current_err; + +fapi_try_exit: + FAPI_ERR("failed accessing ATTR_MSS_IGNORE_PLUG_RULES: 0x%lx (target: %s)", + uint64_t(fapi2::current_err), mss::c_str(i_target)); + return fapi2::current_err; +} + /// /// @brief ATTR_EFF_DRAM_GEN getter diff --git a/src/import/chips/p9/procedures/xml/attribute_info/memory_mcs_attributes.xml b/src/import/chips/p9/procedures/xml/attribute_info/memory_mcs_attributes.xml index 63f4fc411..2b69e4374 100644 --- a/src/import/chips/p9/procedures/xml/attribute_info/memory_mcs_attributes.xml +++ b/src/import/chips/p9/procedures/xml/attribute_info/memory_mcs_attributes.xml @@ -3013,4 +3013,19 @@ <mssAccessorName>eff_dram_txs</mssAccessorName> </attribute> + <attribute> + <id>ATTR_MSS_IGNORE_PLUG_RULES</id> + <targetType>TARGET_TYPE_MCS</targetType> + <description> + Set to IGNORE if you want to ignore the plug rules. Sometimes + this is needed in a partial-good configuration + </description> + <initToZero></initToZero> + <valueType>uint8</valueType> + <writeable/> + <enum>NO = 0, YES = 1</enum> + <mssUnits> bool </mssUnits> + <mssAccessorName>ignore_plug_rules</mssAccessorName> + </attribute> + </attributes> |