summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Phan <cphan@us.ibm.com>2014-01-28 15:22:27 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-02-05 16:00:23 -0600
commitfa7ce559605c11105889f40af3b71d6c73e3957f (patch)
treeefa35b35d51223d875015e93d1afbc43f5235657
parentc9e49a109f1f381d8bae380e925f7bb592cc977a (diff)
downloadtalos-hostboot-fa7ce559605c11105889f40af3b71d6c73e3957f.tar.gz
talos-hostboot-fa7ce559605c11105889f40af3b71d6c73e3957f.zip
MDIA: Force minimal pattern tests for memdiags running in Simics
Change-Id: I77bfe3f39e68ad779e187aebbf850373337f47c3 RTC: 96013 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/8407 Tested-by: Jenkins Server Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r--src/usr/diag/mdia/mdia.C5
-rw-r--r--src/usr/diag/mdia/mdiaglobals.H7
-rw-r--r--src/usr/diag/mdia/mdiamba.C19
3 files changed, 23 insertions, 8 deletions
diff --git a/src/usr/diag/mdia/mdia.C b/src/usr/diag/mdia/mdia.C
index fc6c1f19b..aea2bce05 100644
--- a/src/usr/diag/mdia/mdia.C
+++ b/src/usr/diag/mdia/mdia.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2013 */
+/* COPYRIGHT International Business Machines Corp. 2012,2014 */
/* */
/* p1 */
/* */
@@ -36,6 +36,7 @@
#include "mdiasm.H"
#include "mdiasmimpl.H"
#include <util/singleton.H>
+#include <util/misc.H>
#include <targeting/common/targetservice.H>
using namespace TARGETING;
@@ -72,6 +73,8 @@ errlHndl_t runStep(const TargetHandleList & i_targetList)
globals.mfgPolicy |=
MNFG_FLAG_BIT_MNFG_ENABLE_EXHAUSTIVE_PATTERN_TEST;
}
+
+ globals.simicsRunning = Util::isSimicsRunning();
}
// 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 447af968b..94e186925 100644
--- a/src/usr/diag/mdia/mdiaglobals.H
+++ b/src/usr/diag/mdia/mdiaglobals.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2013 */
+/* COPYRIGHT International Business Machines Corp. 2012,2014 */
/* */
/* p1 */
/* */
@@ -48,6 +48,11 @@ struct Globals
* @brief user interface policy
*/
uint64_t userPolicy;
+
+ /**
+ * @brief flag to indicate running in simics env
+ */
+ bool simicsRunning;
};
}
#endif
diff --git a/src/usr/diag/mdia/mdiamba.C b/src/usr/diag/mdia/mdiamba.C
index 3ac8280a8..ebb4587e5 100644
--- a/src/usr/diag/mdia/mdiamba.C
+++ b/src/usr/diag/mdia/mdiamba.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2013 */
+/* COPYRIGHT International Business Machines Corp. 2012,2014 */
/* */
/* p1 */
/* */
@@ -45,7 +45,12 @@ errlHndl_t getMbaDiagnosticMode(
do
{
- if(MNFG_FLAG_BIT_MNFG_ENABLE_EXHAUSTIVE_PATTERN_TEST
+ if(i_globals.simicsRunning)
+ {
+ o_mode = ONE_PATTERN;
+ }
+
+ else if(MNFG_FLAG_BIT_MNFG_ENABLE_EXHAUSTIVE_PATTERN_TEST
& i_globals.mfgPolicy)
{
o_mode = NINE_PATTERNS;
@@ -64,8 +69,9 @@ errlHndl_t getMbaDiagnosticMode(
}
// Only need to check hw changed state attributes
- // when not already set to exhaustive
- if( NINE_PATTERNS != o_mode )
+ // when not already set to exhaustive and not in simics
+ if(( NINE_PATTERNS != o_mode ) &&
+ ( ! i_globals.simicsRunning ))
{
if(isHWStateChanged(i_mba))
{
@@ -75,8 +81,9 @@ errlHndl_t getMbaDiagnosticMode(
} while(0);
- MDIA_FAST("getMbaDiagnosticMode: mba: %x, o_mode: 0x%x",
- get_huid(i_mba), o_mode);
+ MDIA_FAST("getMbaDiagnosticMode: mba: %x, o_mode: 0x%x, "
+ "simics: %d",
+ get_huid(i_mba), o_mode, i_globals.simicsRunning);
return 0;
}
OpenPOWER on IntegriCloud