diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2014-03-26 07:55:39 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-03-27 08:18:17 -0500 |
commit | ca721de0e1d3ce6da95ccece6053e157eaace012 (patch) | |
tree | 52ac43f3529adfb770cf0cc1a0eb44e54312fc92 /src/usr/pnor | |
parent | 5d6f777ca2e1c2e426564135bc24b0b94cd3067d (diff) | |
download | talos-hostboot-ca721de0e1d3ce6da95ccece6053e157eaace012.tar.gz talos-hostboot-ca721de0e1d3ce6da95ccece6053e157eaace012.zip |
PNOR ECC error to reduce task-crash log sev.
Change-Id: I2d5d41ccb641bdde67df1d4556d57cd4cc8e1228
CQ: SW249695
Backport: release-fips810
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9888
Tested-by: Jenkins Server
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/pnor')
-rw-r--r-- | src/usr/pnor/pnorrp.C | 14 | ||||
-rw-r--r-- | src/usr/pnor/pnorrp.H | 8 | ||||
-rw-r--r-- | src/usr/pnor/test/pnorrptest.H | 2 |
3 files changed, 13 insertions, 11 deletions
diff --git a/src/usr/pnor/pnorrp.C b/src/usr/pnor/pnorrp.C index e31499c7c..f9f1b5d62 100644 --- a/src/usr/pnor/pnorrp.C +++ b/src/usr/pnor/pnorrp.C @@ -368,7 +368,7 @@ errlHndl_t PnorRP::readTOC() TRACUCOMP(g_trac_pnor, "PnorRP::readTOC>" ); errlHndl_t l_errhdl = NULL; uint8_t* tocBuffer = NULL; - bool fatal_error = false; + uint64_t fatal_error = 0; bool TOC_0_failed = false; do{ @@ -644,7 +644,7 @@ void PnorRP::waitForMessage() bool needs_ecc = false; int rc = 0; uint64_t status_rc = 0; - bool fatal_error = false; + uint64_t fatal_error = 0; while(1) { @@ -675,7 +675,7 @@ void PnorRP::waitForMessage() needs_ecc, user_addr, fatal_error ); - if( l_errhdl || fatal_error ) + if( l_errhdl || ( 0 != fatal_error ) ) { status_rc = -EIO; /* I/O error */ } @@ -741,8 +741,10 @@ void PnorRP::waitForMessage() /* Expected Response: * data[0] = virtual address requested * data[1] = rc (0 or negative errno value) + * extra_data = Specific reason code. */ message->data[1] = status_rc; + message->extra_data = reinterpret_cast<void*>(fatal_error); rc = msg_respond( iv_msgQ, message ); if( rc ) { @@ -764,12 +766,12 @@ errlHndl_t PnorRP::readFromDevice( uint64_t i_offset, uint64_t i_chip, bool i_ecc, void* o_dest, - bool& o_fatalError ) + uint64_t& o_fatalError ) { TRACUCOMP(g_trac_pnor, "PnorRP::readFromDevice> i_offset=0x%X, i_chip=%d", i_offset, i_chip ); errlHndl_t l_errhdl = NULL; uint8_t* ecc_buffer = NULL; - o_fatalError = false; + o_fatalError = 0; do { @@ -819,7 +821,7 @@ 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. - o_fatalError = true; + o_fatalError = PNOR::RC_ECC_UE; INITSERVICE::doShutdown( PNOR::RC_ECC_UE, true ); } // found an error so we need to fix something diff --git a/src/usr/pnor/pnorrp.H b/src/usr/pnor/pnorrp.H index a1e463973..baafab9f3 100644 --- a/src/usr/pnor/pnorrp.H +++ b/src/usr/pnor/pnorrp.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -178,8 +178,8 @@ class PnorRP * @param[in] i_chip Which PNOR chip * @param[in] i_ecc true=apply ECC after reading * @param[out] o_dest Buffer to copy data into - * @param[out] o_fatalError true=fatal error encountered, but no - * log could be created + * @param[out] o_fatalError non-zero=fatal error encountered, but no + * log could be created. Value is the internal RC. * * @return Error from device */ @@ -187,7 +187,7 @@ class PnorRP uint64_t i_chip, bool i_ecc, void* o_dest, - bool& o_fatalError ); + uint64_t& o_fatalError ); /** * @brief Write 1 logical page of data to the PNOR device diff --git a/src/usr/pnor/test/pnorrptest.H b/src/usr/pnor/test/pnorrptest.H index 0ad5fc348..32f3c1dc2 100644 --- a/src/usr/pnor/test/pnorrptest.H +++ b/src/usr/pnor/test/pnorrptest.H @@ -508,7 +508,7 @@ class PnorRpTest : public CxxTest::TestSuite { TRACFCOMP(g_trac_pnor, "PnorRpTest::test_TOC Start" ); - bool fatal_error = false; + uint64_t fatal_error = 0; uint64_t offset = 0; uint8_t* tocHeader = new uint8_t[PAGESIZE]; uint8_t* tocEntry = new uint8_t[PAGESIZE]; |