diff options
author | Chris Phan <cphan@us.ibm.com> | 2013-09-13 14:02:24 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-09-18 15:45:43 -0500 |
commit | e884dd55d9411dff27c22088911e2075b5e60bef (patch) | |
tree | 64b4b9695a7be8be4c2e032681482ab01bf5ff1f | |
parent | 47a8df22b64392fd0142c20f986a0723d9b0cb6b (diff) | |
download | talos-hostboot-e884dd55d9411dff27c22088911e2075b5e60bef.tar.gz talos-hostboot-e884dd55d9411dff27c22088911e2075b5e60bef.zip |
MDIA: set diag mode to init only when in MPIPL
Change-Id: I4a54e14fddd0178206008f801fdd4a74a15784dc
RTC: 84546
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6154
Tested-by: Jenkins Server
Reviewed-by: BENJAMIN J. WEISENBECK <bweisenb@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r-- | src/usr/diag/mdia/mdia.C | 3 | ||||
-rw-r--r-- | src/usr/diag/mdia/mdiaglobals.H | 49 | ||||
-rw-r--r-- | src/usr/diag/mdia/mdiamba.C | 65 |
3 files changed, 71 insertions, 46 deletions
diff --git a/src/usr/diag/mdia/mdia.C b/src/usr/diag/mdia/mdia.C index 9b646b0cd..2a983afac 100644 --- a/src/usr/diag/mdia/mdia.C +++ b/src/usr/diag/mdia/mdia.C @@ -67,6 +67,9 @@ errlHndl_t runStep(const TargetHandleList & i_targetList) globals.mfgPolicy |= MNFG_FLAG_BIT_MNFG_ENABLE_EXHAUSTIVE_PATTERN_TEST; } + + uint8_t isMpipl = top->getAttr<ATTR_IS_MPIPL_HB>(); + globals.mpipl = (isMpipl ? true:false); } // get the workflow for each target mba passed in. diff --git a/src/usr/diag/mdia/mdiaglobals.H b/src/usr/diag/mdia/mdiaglobals.H index 84fc39035..fd670aade 100644 --- a/src/usr/diag/mdia/mdiaglobals.H +++ b/src/usr/diag/mdia/mdiaglobals.H @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/usr/diag/mdia/mdiaglobals.H $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2012 -// -// p1 -// -// Object Code Only (OCO) source materials -// Licensed Internal Code Source Materials -// IBM HostBoot Licensed Internal Code -// -// The source code for this program is not published or other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/diag/mdia/mdiaglobals.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ #ifndef __MDIA__MDIAGLOBALS_H #define __MDIA__MDIAGLOBALS_H @@ -48,6 +48,11 @@ struct Globals * @brief user interface policy */ uint64_t userPolicy; + + /** + * @brief memory preserving ipl flag + */ + bool mpipl; }; } #endif diff --git a/src/usr/diag/mdia/mdiamba.C b/src/usr/diag/mdia/mdiamba.C index 90c79de74..74e6dc8c0 100644 --- a/src/usr/diag/mdia/mdiamba.C +++ b/src/usr/diag/mdia/mdiamba.C @@ -43,34 +43,46 @@ errlHndl_t getMbaDiagnosticMode( { o_mode = INIT_ONLY; - if(MNFG_FLAG_BIT_MNFG_ENABLE_EXHAUSTIVE_PATTERN_TEST - & i_globals.mfgPolicy) - { - o_mode = NINE_PATTERNS; - } - - else if(MNFG_FLAG_BIT_MNFG_ENABLE_STANDARD_PATTERN_TEST - & i_globals.mfgPolicy) + do { - o_mode = FOUR_PATTERNS; - } + // Can't do any pattern testing in MPIPL since + // that may cause customers data corruption + if(i_globals.mpipl) + { + o_mode = SCRUB_ONLY; + break; + } - else if(MNFG_FLAG_BIT_MNFG_ENABLE_MINIMUM_PATTERN_TEST - & i_globals.mfgPolicy) - { - o_mode = ONE_PATTERN; - } + if(MNFG_FLAG_BIT_MNFG_ENABLE_EXHAUSTIVE_PATTERN_TEST + & i_globals.mfgPolicy) + { + o_mode = NINE_PATTERNS; + } - // Only need to check hw changed state attributes - // when not already set to standard or exhaustive - if(!((FOUR_PATTERNS == o_mode) || - (NINE_PATTERNS == o_mode))) - { - if(isHWStateChanged(i_mba)) + else if(MNFG_FLAG_BIT_MNFG_ENABLE_STANDARD_PATTERN_TEST + & i_globals.mfgPolicy) { o_mode = FOUR_PATTERNS; } - } + + else if(MNFG_FLAG_BIT_MNFG_ENABLE_MINIMUM_PATTERN_TEST + & i_globals.mfgPolicy) + { + o_mode = ONE_PATTERN; + } + + // Only need to check hw changed state attributes + // when not already set to standard or exhaustive + if(!((FOUR_PATTERNS == o_mode) || + (NINE_PATTERNS == o_mode))) + { + if(isHWStateChanged(i_mba)) + { + o_mode = FOUR_PATTERNS; + } + } + + } while(0); MDIA_FAST("getMbaDiagnosticMode: mba: %x, o_mode: 0x%x", get_huid(i_mba), o_mode); @@ -144,8 +156,13 @@ errlHndl_t getMbaWorkFlow( o_wf.push_back(ANALYZE_IPL_MNFG_CE_STATS); } - // clear HW changed state attribute - o_wf.push_back(CLEAR_HW_CHANGED_STATE); + // only clear HW changed state attribute + // after any pattern test + if(SCRUB_ONLY != i_mode) + { + o_wf.push_back(CLEAR_HW_CHANGED_STATE); + } + return 0; } |