summaryrefslogtreecommitdiffstats
path: root/src/usr/pnor/test/pnorrptest.H
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2013-10-30 10:46:36 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-11-07 14:21:50 -0600
commitd61671f0c49af3bcb27ab4bc64eba1f8a9830e56 (patch)
tree0d632638af56be67d0a0ca496eaac4c51d7dfdf6 /src/usr/pnor/test/pnorrptest.H
parent0c9b4576a852e815aa9980bf3d7dc9fdf2ce37a1 (diff)
downloadtalos-hostboot-d61671f0c49af3bcb27ab4bc64eba1f8a9830e56.tar.gz
talos-hostboot-d61671f0c49af3bcb27ab4bc64eba1f8a9830e56.zip
Allow subsequent PNOR operations after ECC errors
Change-Id: I4e66a383e088fa767849de3a1fb49800dd29a4d1 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/6965 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/pnor/test/pnorrptest.H')
-rw-r--r--src/usr/pnor/test/pnorrptest.H43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/usr/pnor/test/pnorrptest.H b/src/usr/pnor/test/pnorrptest.H
index d48ec491c..71766fea0 100644
--- a/src/usr/pnor/test/pnorrptest.H
+++ b/src/usr/pnor/test/pnorrptest.H
@@ -248,6 +248,49 @@ class PnorRpTest : public CxxTest::TestSuite
}
}
+ //Enable this to test the UE handling, not turning on by default
+ // because it causes a shutdown
+#if 0
+ TRACFCOMP(g_trac_pnor, "PnorRpTest::test_ECC: Attempting UE" );
+ // flush the page to make sure it gets out to the device
+ totals++;
+ rc = mm_remove_pages( RELEASE, dataptr, PAGESIZE );
+ if( rc )
+ {
+ TRACFCOMP( g_trac_pnor, "PnorRpTest::test_ECC> ERROR : error on RELEASE 2: rc=%X", rc );
+ TS_FAIL( "PnorRpTest::test_ECC> ERROR : error on RELEASE 2" );
+ fails++;
+ }
+ // generate data with CEs
+ chip_data_ptr = chip_data;
+ for (int i = 0; i < 9; i++)
+ {
+ memcpy( &data_ecc, chip_data_ptr, sizeof(uint64_t) );
+ uint64_t bad_data = data_ecc ^ (1ul << i) ^ (1ul << 9);
+ memcpy( chip_data_ptr, &bad_data, sizeof(uint64_t) );
+ chip_data_ptr += 9;
+ }
+ // write the bad data to the chip directly
+ totals++;
+ errhdl = deviceWrite(TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL,
+ chip_data,
+ l_size,
+ DEVICE_PNOR_ADDRESS(0, TEST_PHYS_OFFSET));
+ if( errhdl )
+ {
+ TS_FAIL("PnorRpTest::test_ECC: PNORDD deviceWrite() 2 failed! Error committed.");
+ ERRORLOG::errlCommit(errhdl,PNOR_COMP_ID);
+ fails++;
+ }
+ uint32_t tmp2 = 0;
+ totals++;
+ memcpy( &tmp2, dataptr, sizeof(uint32_t) );
+ TRACFCOMP(g_trac_pnor, "PnorRpTest::test_ECC: UE all done - should never see this!!" );
+ fails++;
+ TS_FAIL("PnorRpTest::test_ECC: UE did not kill the task!.");
+#endif
+
+
TRACFCOMP(g_trac_pnor, "PnorRpTest::test_ECC> %d/%d fails", fails, total );
};
OpenPOWER on IntegriCloud