summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C
diff options
context:
space:
mode:
authorStephen Glancy <sglancy@us.ibm.com>2017-10-26 09:18:53 -0500
committerChristian R. Geddes <crgeddes@us.ibm.com>2017-11-01 15:40:46 -0400
commit1cf8acef718aeb4901878a02cab41859727757bc (patch)
treef05416fdbc513f2e1274e82a4c1fff2762f868fe /src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C
parent5b272bf3f2322a16d2d0577066f6894b81f3f1b0 (diff)
downloadtalos-hostboot-1cf8acef718aeb4901878a02cab41859727757bc.tar.gz
talos-hostboot-1cf8acef718aeb4901878a02cab41859727757bc.zip
Fixes broadcast mode memdiags crash
Does three things: 1) Adds a switch to disable BC mode in memdiags 2) Adds a check for valid addressing in memdiags 3) Disables broadcast mode on a DD1 part Change-Id: Ia79c9247bdeb157ed2277afb9cb52a5f25c1c032 CQ:SW406221 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48876 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> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Louis Stermole <stermole@us.ibm.com> Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com> Dev-Ready: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48879 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C')
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C60
1 files changed, 44 insertions, 16 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C b/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C
index 1569d31b1..267b69573 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.C
@@ -79,7 +79,8 @@ namespace mcbist
/// @return FAPI2_RC_SUCCSS iff ok
///
template< >
-fapi2::ReturnCode load_maint_pattern( const fapi2::Target<TARGET_TYPE_MCBIST>& i_target, const pattern& i_pattern,
+fapi2::ReturnCode load_maint_pattern( const fapi2::Target<TARGET_TYPE_MCBIST>& i_target,
+ const pattern& i_pattern,
const bool i_invert )
{
// Init the fapi2 return code
@@ -733,25 +734,52 @@ const mss::states is_broadcast_capable(const std::vector<fapi2::Target<fapi2::TA
template< >
const mss::states is_broadcast_capable(const fapi2::Target<fapi2::TARGET_TYPE_MCBIST>& i_target)
{
- // Steps to determine if this MCBIST is broadcastable
- // 1) Check the number of DIMM's on each MCA - true only if they all match
- // 2) Check that all of the DIMM kinds are equal - if the are, then we can do broadcast mode
- // 3) if both 1 and 2 are true, then broadcast capable, otherwise false
+ // First off, check if we need to disable broadcast mode due to a chip size bug
+ // Note: the bug check is decidedly more complicated than the EC check, but we'll just disable BC mode out of safety concerns
+ // Better to go slow and steady and initialize the chip properly than to go fast and leave the memory initialized poorly
+ if( mss::chip_ec_feature_mcbist_end_of_rank(i_target) )
+ {
+ FAPI_INF("%s A chip bug prevents broadcast mode. Chip is not brodcast capable", mss::c_str(i_target));
+ return mss::states::NO;
+ }
+
+ // If BC mode is disabled in the MRW, then it's disabled here
+ uint8_t l_bc_mode_enable = 0;
+ FAPI_TRY(mss::mrw_memdiags_bcmode(l_bc_mode_enable));
+
+ if( l_bc_mode_enable == fapi2::ENUM_ATTR_MSS_MRW_MEMDIAGS_BCMODE_DISABLE )
+ {
+ FAPI_INF("%s MRW attribute has broadcast mode disabled", mss::c_str(i_target));
+ return mss::states::NO;
+ }
+
+ // Now that we are guaranteed to have a chip that could run broadcast mode, do the following steps to check whether our config is broadcast capable:
+ {
+ // Steps to determine if this MCBIST is broadcastable
+ // 1) Check the number of DIMM's on each MCA - true only if they all match
+ // 2) Check that all of the DIMM kinds are equal - if they are, then we can do broadcast mode
+ // 3) if both 1 and 2 are true, then broadcast capable, otherwise false
- // 1) Check the number of DIMM's on each MCA - if they don't match, then no
- const auto l_mca_check = is_broadcast_capable(mss::find_targets<fapi2::TARGET_TYPE_MCA>(i_target));
+ // 1) Check the number of DIMM's on each MCA - if they don't match, then no
+ const auto l_mca_check = is_broadcast_capable(mss::find_targets<fapi2::TARGET_TYPE_MCA>(i_target));
- // 2) Check that all of the DIMM kinds are equal - if the are, then we can do broadcast mode
- const auto l_dimms = mss::find_targets<fapi2::TARGET_TYPE_DIMM>(i_target);
- const auto l_dimm_kinds = mss::dimm::kind::vector(l_dimms);
- const auto l_dimm_kind_check = is_broadcast_capable(l_dimm_kinds);
+ // 2) Check that all of the DIMM kinds are equal - if they are, then we can do broadcast mode
+ const auto l_dimms = mss::find_targets<fapi2::TARGET_TYPE_DIMM>(i_target);
+ const auto l_dimm_kinds = mss::dimm::kind::vector(l_dimms);
+ const auto l_dimm_kind_check = is_broadcast_capable(l_dimm_kinds);
- // 3) if both 1/2 are true, then broadcastable, otherwise false
- const auto l_capable = (l_mca_check == mss::states::YES && l_dimm_kind_check == mss::states::YES) ?
- mss::states::YES : mss::states::NO;
+ // 3) if both 1/2 are true, then broadcastable, otherwise false
+ const auto l_capable = ((l_mca_check == mss::states::YES) && (l_dimm_kind_check == mss::states::YES)) ?
+ mss::states::YES : mss::states::NO;
- FAPI_INF("%s %s broadcast capable", mss::c_str(i_target), (l_capable == mss::states::YES) ? "is" : "is not");
- return l_capable;
+ FAPI_INF("%s %s broadcast capable", mss::c_str(i_target), (l_capable == mss::states::YES) ? "is" : "is not");
+ return l_capable;
+ }
+
+fapi_try_exit:
+ FAPI_ERR("%s failed to get an MRW attribute, an egregious error. Returning NOT broadcast capable",
+ mss::c_str(i_target));
+ return mss::states::NO;
}
///
OpenPOWER on IntegriCloud