diff options
4 files changed, 68 insertions, 135 deletions
diff --git a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C index ef66198b7..250c0377a 100644 --- a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C +++ b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C @@ -74,9 +74,6 @@ char * ThermalFilename = NULL; #endif bool ErrDataService::terminateOnCheckstop = true; -bool previousWasRecovered = false; -Timer previousEventTime; -const double LATENT_MCK_WINDOW = 2; // two seconds to determin latency RasServices thisServiceGenerator; //------------------------------------------------------------------------------ @@ -112,7 +109,6 @@ RasServices::~RasServices() void ErrDataService::Initialize() { - savedLatentSdc = false; iv_serviceActionCounter = 0; } @@ -140,45 +136,17 @@ void RasServices::setErrDataService(ErrDataService & i_ErrDataService) //------------------------------------------------------------------------------ void ErrDataService::SetErrorTod(ATTENTION_TYPE the_attention, - bool *is_latent, ServiceDataCollector & sdc) { - *is_latent = false; - latentMachineCheck = false; - Timer l_curEventTime; PlatServices::getCurrentTime(l_curEventTime); - - if(previousWasRecovered && (MACHINE_CHECK == the_attention)) - { - // check for latent machine check - if ( LATENT_MCK_WINDOW > (l_curEventTime - previousEventTime)) - { - *is_latent = true; - latentMachineCheck = true; - } - previousWasRecovered = false; // in case of multiple calls for same cstop - } - else if (RECOVERABLE == the_attention) - { - previousWasRecovered = true; - } - else - { - previousWasRecovered = false; - } - - previousEventTime = l_curEventTime; sdc.SetTOE(l_curEventTime); } void RasServices::SetErrorTod(ATTENTION_TYPE the_attention, - bool *is_latent, ServiceDataCollector & sdc) { - iv_ErrDataService->SetErrorTod(the_attention, - is_latent, - sdc); + iv_ErrDataService->SetErrorTod(the_attention, sdc); } //------------------------------------------------------------------------------ @@ -256,7 +224,8 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, HWSV::hwsvHCDBUpdate hcdbUpdate = HWSV::HWSV_HCDB_DO_UPDATE; - //Use this SDC unless determined in Check Stop processing to use a Latent, UE, or SUE saved SDC + // Use this SDC unless determined in Check Stop processing to use a UE, + // or SUE saved SDC sdc = i_sdc; GardAction::ErrorType prdGardErrType; @@ -300,63 +269,49 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, severityParm = ERRL_SEV_UNRECOVERABLE; - if // No special UE-SUE flags. - ((!sdc.IsUERE() ) && - (!sdc.IsSUE() ) ) + // Check for SUE-CS condition flags. + if ((!sdc.IsUERE() ) && + ( sdc.IsSUE() ) ) { - // If LtntMck and last recoverable Stored use it. - if ( latentMachineCheck && savedLatentSdc ) + //Read current sdc state flags from registry + errlHndl_t errorLog = UtilReg::read ( "prdf/RasServices", + &sdcSaveFlags, sz_uint8 ); + if (errorLog) { - gardErrType = HWAS::GARD_Func; - sdc = latentSdc; - causeAttnPreviouslyReported = true; + PRDF_ERR( PRDF_FUNC"Failure in SDC flag Registry read" ); + PRDF_COMMIT_ERRL(errorLog, ERRL_ACTION_REPORT); } - //else set no flags, use this sdc - } - else //This is a SUE-CS condition check flags. - if ((!sdc.IsUERE() ) && - ( sdc.IsSUE() ) ) - { - //Read current sdc state flags from registry - errlHndl_t errorLog = UtilReg::read ("prdf/RasServices", &sdcSaveFlags, sz_uint8); - if (errorLog) + else if (sdcSaveFlags & SDC_SAVE_UE_FLAG) //check if UE log stored + { // then use it. + bool l_rc = SdcRetrieve(SDC_SAVE_UE_FLAG, sdcBuffer); + if (l_rc) { - PRDF_ERR( PRDF_FUNC"Failure in SDC flag Registry read" ); - PRDF_COMMIT_ERRL(errorLog, ERRL_ACTION_REPORT); + PRDF_ERR( PRDF_FUNC"Failure in UE SDC Retrieve Function" ); } - else if (sdcSaveFlags & SDC_SAVE_UE_FLAG) //check if UE log stored then use it. + else { - bool l_rc = SdcRetrieve(SDC_SAVE_UE_FLAG, sdcBuffer); - if (l_rc) - { - PRDF_ERR( PRDF_FUNC"Failure in UE SDC Retrieve Function" ); - } - else - { - //set the sdc to the Saved SDC for UE - sdc = sdcBuffer; - gardErrType = HWAS::GARD_Func; - causeAttnPreviouslyReported = true; - } + //set the sdc to the Saved SDC for UE + sdc = sdcBuffer; + gardErrType = HWAS::GARD_Func; + causeAttnPreviouslyReported = true; } - else if (sdcSaveFlags & SDC_SAVE_SUE_FLAG ) //else check if SUE log stored then use it. + } + else if (sdcSaveFlags & SDC_SAVE_SUE_FLAG ) //else check if SUE log + { // stored then use it. + bool l_rc = SdcRetrieve(SDC_SAVE_SUE_FLAG, sdcBuffer); + if (l_rc) { - bool l_rc = SdcRetrieve(SDC_SAVE_SUE_FLAG, sdcBuffer); - if (l_rc) - { - PRDF_ERR( PRDF_FUNC"Failure in SUE SDC Retrieve Function" ); - } - else - { - //set the sdc to the Saved SDC for SUE - sdc = sdcBuffer; - gardErrType = HWAS::GARD_Func; - causeAttnPreviouslyReported = true; - } + PRDF_ERR( PRDF_FUNC"Failure in SUE SDC Retrieve Function" ); + } + else + { + //set the sdc to the Saved SDC for SUE + sdc = sdcBuffer; + gardErrType = HWAS::GARD_Func; + causeAttnPreviouslyReported = true; } - //else, set no flags, use this sdc } - //else Normal Mck, set no flags, use this sdc + } #endif // if not __HOSTBOOT_MODULE } //////////////////////////////////////////////////////////////// @@ -365,13 +320,6 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, else if (i_attnType == RECOVERABLE || i_attnType == UNIT_CS ) { #ifndef __HOSTBOOT_MODULE - // FIXME: I don't think Hostboot needs latent SDC and UE/SUE support - if (!sdc.IsUsingSavedSdc() ) // Don't save File if we are Re-Syncing an sdc - { - savedLatentSdc = true; //Save this SDC as Latent SDC - latentSdc = i_sdc; - } - if //Ue-Re RECOVERABLE condition. ((sdc.IsUERE() ) && (!sdc.IsSUE() ) && @@ -450,7 +398,7 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, gardState = HWSV::HWSV_DECONFIG_GARD; - // If gardErrType was determined during latent/UE/SUE processing for Check Stop, + // If gardErrType was determined during UE/SUE processing for Check Stop, // use that and not determine gardErrType from the sdc values. if (gardErrType != HWAS::GARD_Func) { @@ -491,7 +439,7 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, } else { - // gardErrType is GARD_Func, set in latent/UE/SUE processing for Check Stop. + // gardErrType is GARD_Func, set in UE/SUE processing for Check Stop. // If NoGard was specified in this switched sdc, then keep the NoGard if ( sdc.QueryGard() == GardAction::NoGard ) { @@ -1336,8 +1284,7 @@ void ErrDataService::printDebugTraces( ) i->callout.flatten(), tmp ); } - GardAction::ErrorType et = sdc.QueryGard(); - PRDF_DTRAC ("GardType: %s", GardAction::ToString( et ) ); + PRDF_DTRAC ("GardType: %s", GardAction::ToString( sdc.QueryGard() ) ); PRDF_DTRAC( "PRDTRACE: Flag Values" ); if( sdc.IsSUE() ) PRDF_DTRAC( "PRDTRACE: SUE Flag Set" ); diff --git a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.H b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.H index a9ac4b4c5..688ee064a 100644 --- a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.H +++ b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.H @@ -63,7 +63,6 @@ class ErrDataService */ inline ErrDataService() : loggingBufferFull(false), - savedLatentSdc(false), iv_serviceActionCounter(0), savedPrdReturnCode(0) {} @@ -91,15 +90,15 @@ class ErrDataService virtual errlHndl_t GenerateSrcPfa(ATTENTION_TYPE attn_type, ServiceDataCollector & sdc); /** - @brief Set the TOD of the current error and check for latent Machine check + @brief Set the TOD of the current error @param[in] the_attention (see iipsdbug.h) - @param[in,out] is_latent [true | false] @param[in,out] sdc @pre None. @post Error timestamped with TOD, latency state modifed @note Uses the SPC interface to get the TOD */ - virtual void SetErrorTod(ATTENTION_TYPE the_attention,bool *is_latent,ServiceDataCollector & sdc); + virtual void SetErrorTod( ATTENTION_TYPE the_attention, + ServiceDataCollector & sdc ); /** @brief Query if logging buffer full - indicates attention flooding @@ -204,15 +203,12 @@ class ErrDataService private: bool loggingBufferFull; - bool latentMachineCheck; - bool savedLatentSdc; uint32_t iv_serviceActionCounter; int32_t savedPrdReturnCode; ServiceDataCollector sdc; - ServiceDataCollector latentSdc; static bool terminateOnCheckstop; @@ -247,15 +243,15 @@ public: virtual void setErrDataService(ErrDataService & i_ErrDataService); /** - @brief Set the TOD of the current error and check for latent Machine check + @brief Set the TOD of the current error and check for Machine check @param[in] the_attention (see iipsdbug.h) - @param[in,out] is_latent [true | false] @param[in,out] sdc @pre None. @post Error timestamped with TOD, latency state modifed @note Uses the SPC interface to get the TOD */ - virtual void SetErrorTod(ATTENTION_TYPE the_attention,bool *is_latent,ServiceDataCollector & sdc); + virtual void SetErrorTod( ATTENTION_TYPE the_attention, + ServiceDataCollector & sdc ); /** @brief Query if logging buffer full - indicates attention flooding diff --git a/src/usr/diag/prdf/common/framework/service/xspprdService.h b/src/usr/diag/prdf/common/framework/service/xspprdService.h index bb734ca59..43fcf7d61 100755 --- a/src/usr/diag/prdf/common/framework/service/xspprdService.h +++ b/src/usr/diag/prdf/common/framework/service/xspprdService.h @@ -29,11 +29,8 @@ // Description: Service interface for PRD // Usage: // ServiceGenerator serv_generator -// bool latent_machine_check_flag = false; // ATTENTION_TYPE attentionType = MACHINE_CHECK; (see iipsdbug.h) // -// ///// Set time + see if latent machine check -// serv_generator.SetErrorTod(attentionType, &latent_machine_check_flag); // // ///// Query for flooding condition // if(serv_generator.QueryLoggingBufferFull()) @@ -130,16 +127,16 @@ public: virtual void setErrDataService(ErrDataService & i_errDataService)=0; /** - Set the TOD of the current error and check for latent Machine check + Set the TOD of the current error <ul> <br><b>Parameter: </b> the_attention (see iipsdbug.h) - <br><b>Returns: </b> is_latent [true | false] <br><b>Requirements:</b> None. <br><b>Promises: </b> Error timestamped with TOD, latency state modifed <br><b>Notes: </b> Uses the SPC interface to get the TOD </ul><br> */ - virtual void SetErrorTod(ATTENTION_TYPE the_attention,bool *is_latent,ServiceDataCollector & sdc)=0; + virtual void SetErrorTod( ATTENTION_TYPE the_attention, + ServiceDataCollector & sdc)=0; /** Query if logging buffer full - indicates attention flooding diff --git a/src/usr/diag/prdf/common/prdfMain_common.C b/src/usr/diag/prdf/common/prdfMain_common.C index b2d262ff8..f11bec2b7 100755 --- a/src/usr/diag/prdf/common/prdfMain_common.C +++ b/src/usr/diag/prdf/common/prdfMain_common.C @@ -163,7 +163,6 @@ errlHndl_t main( ATTENTION_VALUE_TYPE i_attentionType, if(g_prd_errlHndl != NULL) rc = PRD_NOT_INITIALIZED; } - bool latent_check_stop = false; ServiceDataCollector serviceData; STEP_CODE_DATA_STRUCT sdc; sdc.service_data = &serviceData; @@ -210,39 +209,33 @@ errlHndl_t main( ATTENTION_VALUE_TYPE i_attentionType, serviceData.SetAttentionType(i_attentionType); - // Check to see if this is a latent machine check.- capture time of day - serviceGenerator.SetErrorTod( i_attentionType, &latent_check_stop, - serviceData ); + // capture time of day + serviceGenerator.SetErrorTod( i_attentionType, serviceData ); if(serviceGenerator.QueryLoggingBufferFull()) { serviceData.SetFlooding(); } - // If the checkstop is latent than Service Generator Will use the scd - // from the last call to PRD - no further analysis needed. - if (!latent_check_stop) + int32_t analyzeRc = systemPtr->Analyze(sdc, i_attentionType); + // flush Cache to free up the memory + RegDataCache::getCachedRegisters().flush(); + ScanFacility & l_scanFac = ScanFacility::Access(); + //delete all the wrapper register objects since these were created + //just for plugin code + l_scanFac.ResetPluginRegister(); + SystemSpecific::postAnalysisWorkarounds(sdc); + if(analyzeRc != SUCCESS && g_prd_errlHndl == NULL) { - int32_t analyzeRc = systemPtr->Analyze(sdc, i_attentionType); - // flush Cache to free up the memory - RegDataCache::getCachedRegisters().flush(); - ScanFacility & l_scanFac = ScanFacility::Access(); - //delete all the wrapper register objects since these were created - //just for plugin code - l_scanFac.ResetPluginRegister(); - SystemSpecific::postAnalysisWorkarounds(sdc); - if(analyzeRc != SUCCESS && g_prd_errlHndl == NULL) - { - // We have a bad RC, but no error log - Fill out SDC and have - // service generator make one - (serviceData.GetErrorSignature())->setErrCode( - (uint16_t)analyzeRc ); - serviceData.SetCallout(SP_CODE); - serviceData.SetServiceCall(); - // mk438901 a We don't want to gard unless we have a good - // return code - serviceData.Gard(GardAction::NoGard); - } + // We have a bad RC, but no error log - Fill out SDC and have + // service generator make one + (serviceData.GetErrorSignature())->setErrCode( + (uint16_t)analyzeRc ); + serviceData.SetCallout(SP_CODE); + serviceData.SetServiceCall(); + // We don't want to gard unless we have a good + // return code + serviceData.Gard(GardAction::NoGard); } } |