diff options
author | Brian Stegmiller <bjs@us.ibm.com> | 2017-02-03 15:12:44 -0600 |
---|---|---|
committer | Zane C. Shelley <zshelle@us.ibm.com> | 2017-02-10 17:34:21 -0500 |
commit | 1753fc3f77aa83a16aa4f5424608fecd95fd43a5 (patch) | |
tree | 2055b8dcdd9c0c8fc0d6081414d5f45acbf4e1d3 /src/usr/diag/prdf/common/plat | |
parent | 97610753ce7d2ef3a4a22994ca717c068dff5e65 (diff) | |
download | talos-hostboot-1753fc3f77aa83a16aa4f5424608fecd95fd43a5.tar.gz talos-hostboot-1753fc3f77aa83a16aa4f5424608fecd95fd43a5.zip |
PRD: RE-UE/CS-SUE association design for P9
Change-Id: I2aa26f374fd2d94acbe0aa42ee6d5a5064401dab
RTC: 157762
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35932
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36083
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/common/plat')
-rwxr-xr-x | src/usr/diag/prdf/common/plat/prdfRasServices_common.C | 263 | ||||
-rw-r--r-- | src/usr/diag/prdf/common/plat/prdfRasServices_common.H | 35 |
2 files changed, 12 insertions, 286 deletions
diff --git a/src/usr/diag/prdf/common/plat/prdfRasServices_common.C b/src/usr/diag/prdf/common/plat/prdfRasServices_common.C index 393e5249f..3c6d3b2ee 100755 --- a/src/usr/diag/prdf/common/plat/prdfRasServices_common.C +++ b/src/usr/diag/prdf/common/plat/prdfRasServices_common.C @@ -130,7 +130,6 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, #else uint8_t sdcSaveFlags = SDC_NO_SAVE_FLAGS; size_t sz_uint8 = sizeof(uint8_t); - uint8_t sdcBuffer[sdcBufferSize]; //buffer to use for SDC flatten #endif epubProcedureID thisProcedureID; @@ -143,123 +142,6 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, uint16_t PRD_Reason_Code = 0; //************************************************************** - // Initial set up by Attention Type - //************************************************************** - - //////////////////////////////////////////////////////////////// - // Machine Check ATTN (CHECKSTOP) - //////////////////////////////////////////////////////////////// - if (i_attnType == MACHINE_CHECK) - { - #ifdef __HOSTBOOT_MODULE - - // Do nothing. Saved SDCs only supported on FSP. - - #ifdef __HOSTBOOT_RUNTIME - PRDF_ERR( PRDF_FUNC "HBRT should NOT have any CS attns!" ); - #endif - - #else - - // Check for SUE-CS condition flags. - if ((!io_sdc.IsUERE() ) && - ( io_sdc.IsSUE() ) ) - { - //Read current SDC state flags from registry - errlHndl_t errorLog = UtilReg::read ( "prdf/RasServices", - &sdcSaveFlags, sz_uint8 ); - if (errorLog) - { - PRDF_ERR( PRDF_FUNC "Failure in SDC flag Registry read" ); - PRDF_COMMIT_ERRL(errorLog, ERRL_ACTION_REPORT); - } - 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 UE SDC Retrieve Function" ); - } - else - { - ServiceDataCollector origSdc = io_sdc; // Save original SDC - io_sdc = sdcBuffer; // Set the new SDC - - // Add the original signature to the new SDC's - // multi-signature list. - io_sdc.AddSignatureList( *(origSdc.GetErrorSignature()) ); - - // This is a checkstop attention so some values will need - // to be overridden. - - io_sdc.setPrimaryAttnType( origSdc.getPrimaryAttnType() ); - - if ( origSdc.Terminate() ) - io_sdc.setFlag(ServiceDataCollector::TERMINATE); - } - } - 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) - { - PRDF_ERR( PRDF_FUNC "Failure in SUE SDC Retrieve Function" ); - } - else - { - ServiceDataCollector origSdc = io_sdc; // Save original SDC - io_sdc = sdcBuffer; // Set the new SDC - - // Add the original signature to the new SDC's - // multi-signature list. - io_sdc.AddSignatureList( *(origSdc.GetErrorSignature()) ); - - // This is a checkstop attention so some values will need - // to be overridden. - - io_sdc.setPrimaryAttnType( origSdc.getPrimaryAttnType() ); - - if ( origSdc.Terminate() ) - io_sdc.setFlag(ServiceDataCollector::TERMINATE); - } - } - } - - #endif // if not __HOSTBOOT_HOSTBOOT - } - //////////////////////////////////////////////////////////////// - // Recoverable ATTN or Unit CheckStop - //////////////////////////////////////////////////////////////// - else if (i_attnType == RECOVERABLE || i_attnType == UNIT_CS ) - { -#ifndef __HOSTBOOT_MODULE - if //Ue-Re RECOVERABLE condition. - ((io_sdc.IsUERE() ) && - (!io_sdc.IsSUE() ) && - (!io_sdc.IsUsingSavedSdc() ) ) // Don't save File if we are Re-Syncing an SDC - { - bool l_rc = SdcSave(SDC_SAVE_UE_FLAG, io_sdc); - if (l_rc) - { - PRDF_ERR( PRDF_FUNC "Failure in UE SDC Save Function" ); - } - } - else if //Sue-Re RECOVERABLE condition. - ((!io_sdc.IsUERE() ) && - (io_sdc.IsSUE() ) && - (!io_sdc.IsUsingSavedSdc() ) ) // Don't save File if we are Re-Syncing an SDC - - { - bool l_rc = SdcSave(SDC_SAVE_SUE_FLAG, io_sdc); - if (l_rc) - { - PRDF_ERR( PRDF_FUNC "Failure in SUE SDC Save Function" ); - } - } -#endif // if not __HOSTBOOT_MODULE - } - - //************************************************************** // Callout loop to set up Reason code and SRC word 9 //************************************************************** @@ -435,6 +317,17 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, // overridden. iv_errl->setSev( errlSev ); + // Add procedure callout for SUE attentions. The intent is to make sure the + // customer looks for other service actions before replacing parts for this + // attention. + if ( io_sdc.IsSUE() ) + { + PRDF_HW_ADD_PROC_CALLOUT(EPUB_PRC_SUE_PREVERROR, + MRU_HIGH, + iv_errl, + errlSev); + } + //-------------------------------------------------------------------------- // Get the global gard policy. //-------------------------------------------------------------------------- @@ -946,140 +839,6 @@ void ErrDataService::AddCapData( CaptureData & i_cd, errlHndl_t i_errHdl) //------------------------------------------------------------------------------ -#ifndef __HOSTBOOT_MODULE - -bool ErrDataService::SdcSave( sdcSaveFlagsEnum i_saveFlag, - ServiceDataCollector & i_saveSdc ) -{ - #define PRDF_FUNC "SdcRetrieve() " - errlHndl_t errorLog = NULL; - bool rc = false; - uint8_t sdcSaveFlags = SDC_NO_SAVE_FLAGS; - size_t sz_uint8 = sizeof(uint8_t); - const char * UeSdcKeys[] = {"fstp/P1_Root","prdf/UeSdcDataPath"}; - const char * SueSdcKeys[] = {"fstp/P1_Root","prdf/SueSdcDataPath"}; - char * SdcFilename = NULL; - uint32_t l_size = 0; - - do - { - //Need path to the File - if (i_saveFlag == SDC_SAVE_UE_FLAG) - errorLog = UtilReg::path(UeSdcKeys,2,NULL,SdcFilename,l_size); - else if (i_saveFlag == SDC_SAVE_SUE_FLAG) - errorLog = UtilReg::path(SueSdcKeys,2,NULL,SdcFilename,l_size); - else - { - //Should not get here - code error - PRDF_ERR( PRDF_FUNC "Failure - incorrect SDC save flag" ); - rc = true; - break; - } - if (errorLog) - { - PRDF_ERR( PRDF_FUNC "Failure in getting SDC file path" ); - PRDF_COMMIT_ERRL(errorLog, ERRL_ACTION_REPORT); - rc = true; - break; - } - - rc = SdcWrite(SdcFilename, i_saveSdc); - if (rc) - { - break; - } - - //Read current SDC state flags from registry - errorLog = UtilReg::read ("prdf/RasServices", &sdcSaveFlags, sz_uint8); - if (errorLog) - { - PRDF_ERR( PRDF_FUNC "Failure in SDC flag Registry read" ); - PRDF_COMMIT_ERRL(errorLog, ERRL_ACTION_REPORT); - rc = true; - break; - } - - //Update Sdc registry flag - sdcSaveFlags = (sdcSaveFlags | i_saveFlag); - errorLog = UtilReg::write ("prdf/RasServices", &sdcSaveFlags, sz_uint8); - if (errorLog) - { - PRDF_ERR( PRDF_FUNC "Failure in SDC flag Registry write" ); - PRDF_COMMIT_ERRL(errorLog, ERRL_ACTION_REPORT); - rc = true; - break; - } - - - } - while(0); - - if (SdcFilename != NULL) - { //need to free the pathname - free(SdcFilename); - SdcFilename = NULL; - } - - return rc; - - #undef PRDF_FUNC -} - -//------------------------------------------------------------------------------ - -bool ErrDataService::SdcRetrieve(sdcSaveFlagsEnum i_saveFlag, void * o_buffer) -{ - #define PRDF_FUNC "SdcRetrieve() " - errlHndl_t errorLog = NULL; - bool rc = false; - const char * UeSdcKeys[] = {"fstp/P1_Root","prdf/UeSdcDataPath"}; - const char * SueSdcKeys[] = {"fstp/P1_Root","prdf/SueSdcDataPath"}; - char * SdcFilename = NULL; - uint32_t l_size = 0; - - do - { - //Need path to the File - if (i_saveFlag == SDC_SAVE_UE_FLAG) - errorLog = UtilReg::path(UeSdcKeys,2,NULL,SdcFilename,l_size); - else if (i_saveFlag == SDC_SAVE_SUE_FLAG) - errorLog = UtilReg::path(SueSdcKeys,2,NULL,SdcFilename,l_size); - else - { - //Should not get here - code error - PRDF_ERR(PRDF_FUNC "Failure - incorrect SDC save flag" ); - rc = true; - break; - } - if (errorLog) - { - PRDF_ERR( PRDF_FUNC "Failure in getting SDC file path" ); - PRDF_COMMIT_ERRL(errorLog, ERRL_ACTION_REPORT); - rc = true; - break; - } - - rc = SdcRead (SdcFilename, o_buffer); - - - } - while(0); - - if (SdcFilename != NULL) - { //need to free the pathname - free(SdcFilename); - SdcFilename = NULL; - } - - return rc; - - #undef PRDF_FUNC -} - -#endif // if not __HOSTBOOT_MODULE - -//------------------------------------------------------------------------------ - void ErrDataService::deallocateDimms( const SDC_MRU_LIST & i_mruList ) { #define PRDF_FUNC "[ErrDataService::deallocateDimms] " diff --git a/src/usr/diag/prdf/common/plat/prdfRasServices_common.H b/src/usr/diag/prdf/common/plat/prdfRasServices_common.H index 094e9aff4..6aa0055d4 100644 --- a/src/usr/diag/prdf/common/plat/prdfRasServices_common.H +++ b/src/usr/diag/prdf/common/plat/prdfRasServices_common.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -48,8 +48,6 @@ enum sdcSaveFlagsEnum { SDC_NO_SAVE_FLAGS = 0x00, SDC_ANALYSIS_SAVE_FLAG = 0x08, - SDC_SAVE_UE_FLAG = 0x02, - SDC_SAVE_SUE_FLAG = 0x01 }; class ErrDataService @@ -139,37 +137,6 @@ class ErrDataService /** @brief Disable assignment. */ ErrDataService & operator=(const ErrDataService &); - #ifndef __HOSTBOOT_MODULE - - /** - @brief Write the Flattened SDC to a File to save for later use. Will also - immediate sync the File to the Redundant FSP. Update Registry - value with UE or SUE save status. Note, the Registry is immediately - synced to the Redundand FSP automatically. - @param[in] sdcSaveFlagsEnum - @param[in,out] sdc (see iipServiceData.h) - @return return FALSE if success and TRUE if failure - @pre None. - @post None. - @exception None. - @note - */ - bool SdcSave(sdcSaveFlagsEnum i_saveFlag, ServiceDataCollector & i_saveSdc); - - /** - @brief Read the Flattened SDC File based on the sdc Save Flag input. - @param[in] sdcSaveFlagsEnum - @param[in,out] buffer data is output to - @return return FALSE if success and TRUE if failure - @pre None. - @post None. - @exception None. - @note - */ - bool SdcRetrieve(sdcSaveFlagsEnum i_saveFlag, void * o_buffer); - - #endif // end if not __HOSTBOOT_MODULE - /** * @brief Initializes the PFA data. * @param i_sdc The service data collector. |