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 | |
| 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>
| -rw-r--r-- | src/kernel/msghandler.C | 5 | ||||
| -rw-r--r-- | src/usr/initservice/baseinitsvc/initservice.C | 22 | ||||
| -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 |
5 files changed, 37 insertions, 14 deletions
diff --git a/src/kernel/msghandler.C b/src/kernel/msghandler.C index 4530ed6b6..3b21de98d 100644 --- a/src/kernel/msghandler.C +++ b/src/kernel/msghandler.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -56,6 +56,7 @@ void MessageHandler::sendMessage(msg_sys_types_t i_type, void* i_key, m->type = i_type; m->data[0] = reinterpret_cast<uint64_t>(i_key); m->data[1] = reinterpret_cast<uint64_t>(i_data); + m->extra_data = NULL; m->__reserved__async = 1; // Create pending response object. @@ -191,7 +192,7 @@ int MessageHandler::recvMessage(msg_t* i_msg) while(task_t* end_task = endTaskList.remove()) { - TaskManager::endTask(end_task, NULL, TASK_STATUS_CRASHED); + TaskManager::endTask(end_task, i_msg->extra_data, TASK_STATUS_CRASHED); } // Release memory for message (created from sendMsg). diff --git a/src/usr/initservice/baseinitsvc/initservice.C b/src/usr/initservice/baseinitsvc/initservice.C index fb5e1b5da..2b1db6b35 100644 --- a/src/usr/initservice/baseinitsvc/initservice.C +++ b/src/usr/initservice/baseinitsvc/initservice.C @@ -261,6 +261,16 @@ errlHndl_t InitService::startTask( INITSERVICE::BASE_INITSVC_MOD_ID, INITSERVICE::WAIT_TASK_FAILED, l_tidretrc, l_childsts, hbSwError); + + // If the task crashed, then the l_childerrl is either NULL or + // contains an RC indicating that the issue causing the child + // to crash has already been reported. Therefore, reduce the + // severity to informational. + if ((l_childsts == TASK_STATUS_CRASHED) && + (NULL != l_childerrl)) + { + l_errl->setSev(ERRORLOG::ERRL_SEV_INFORMATIONAL); + } break; } // endif tidretrc @@ -380,6 +390,16 @@ errlHndl_t InitService::executeFn( INITSERVICE::WAIT_FN_FAILED, l_tidretrc, l_childsts, hbSwError); + // If the task crashed, then the l_childerrl is either NULL or + // contains an RC indicating that the issue causing the child + // to crash has already been reported. Therefore, reduce the + // severity to informational. + if ((l_childsts == TASK_STATUS_CRASHED) && + (NULL != l_childerrl)) + { + l_errl->setSev(ERRORLOG::ERRL_SEV_INFORMATIONAL); + } + TRACFCOMP(g_trac_initsvc, "ERROR : task_wait_tid(0x%x). '%s', l_tidretrc=0x%x, l_childsts=0x%x", l_tidlnchrc, @@ -542,7 +562,7 @@ void InitService::init( void *io_ptr ) HWAS::RC_SYSAVAIL_INSUFFICIENT_HW); l_shutdownStatus = HWAS::RC_SYSAVAIL_INSUFFICIENT_HW; } - else + else { // Set the shutdown status to be the plid to force a TI l_shutdownStatus = l_errl->plid(); 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]; |

