summaryrefslogtreecommitdiffstats
path: root/src/usr/pnor
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
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')
-rw-r--r--src/usr/pnor/pnorrp.C8
-rw-r--r--src/usr/pnor/pnorrp.H6
-rw-r--r--src/usr/pnor/test/pnorrptest.H43
3 files changed, 43 insertions, 14 deletions
diff --git a/src/usr/pnor/pnorrp.C b/src/usr/pnor/pnorrp.C
index cfb7fbd07..0f212bce5 100644
--- a/src/usr/pnor/pnorrp.C
+++ b/src/usr/pnor/pnorrp.C
@@ -152,7 +152,6 @@ void* wait_for_message( void* unused )
PnorRP::PnorRP()
: iv_msgQ(NULL)
,iv_startupRC(0)
-,iv_shutdownUE(false)
{
TRACFCOMP(g_trac_pnor, "PnorRP::PnorRP> " );
@@ -580,12 +579,6 @@ void PnorRP::waitForMessage()
switch(message->type)
{
case( MSG_MM_RP_READ ):
- // do not allow reads in the shutdown path, only writes
- if( iv_shutdownUE )
- {
- status_rc = -EIO;
- break;
- }
l_errhdl = readFromDevice( dev_offset,
chip_select,
needs_ecc,
@@ -729,7 +722,6 @@ errlHndl_t PnorRP::readFromDevice( uint64_t i_offset,
// Also need to spawn a separate task to do the shutdown
// so that the regular PNOR task can service the writes
// that happen during shutdown.
- iv_shutdownUE = true;
o_fatalError = true;
INITSERVICE::doShutdown( PNOR::RC_ECC_UE, true );
}
diff --git a/src/usr/pnor/pnorrp.H b/src/usr/pnor/pnorrp.H
index d246360b0..8c2fb2abc 100644
--- a/src/usr/pnor/pnorrp.H
+++ b/src/usr/pnor/pnorrp.H
@@ -149,12 +149,6 @@ class PnorRP
std::map<uint64_t,FlashStats_t> iv_stats;
/**
- * Remember that we got a UE and we are shutting down
- */
- bool iv_shutdownUE;
-
-
- /**
* @brief Initialize the daemon, called by constructor
*/
void initDaemon();
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