diff options
Diffstat (limited to 'src/usr')
-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 |
4 files changed, 34 insertions, 12 deletions
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]; |