summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2014-07-21 11:10:20 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-09-17 11:18:41 -0500
commit714d99c2991338cb15b5a5aa83990f5e27877b3c (patch)
tree6317450ccdb9e126ee8a86b5d2513a7241575f44
parentca058e4bb56272a5f7b228d547a11664ff256acc (diff)
downloadtalos-hostboot-714d99c2991338cb15b5a5aa83990f5e27877b3c.tar.gz
talos-hostboot-714d99c2991338cb15b5a5aa83990f5e27877b3c.zip
PRD: Cleaned up more obsolete RasServices functions
Change-Id: Iba9bd66fca7e1b81780f50140d6d0e266284d9aa Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/12400 Tested-by: Jenkins Server Reviewed-by: Christopher T. Phan <cphan@us.ibm.com> Reviewed-by: Prem Shanker Jha <premjha2@in.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13425
-rw-r--r--src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C29
-rw-r--r--src/usr/diag/prdf/common/framework/service/prdfRasServices_common.H126
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/service/xspprdService.h63
-rwxr-xr-xsrc/usr/diag/prdf/common/prdfMain_common.C8
-rwxr-xr-xsrc/usr/diag/prdf/test/prdfsimRasServices.H37
5 files changed, 74 insertions, 189 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 f60a6c9fa..28b5198e0 100644
--- a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C
+++ b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C
@@ -69,7 +69,6 @@ using namespace PlatServices;
// Local Globals
//------------------------------------------------------------------------------
-bool ErrDataService::terminateOnCheckstop = true;
RasServices thisServiceGenerator;
//------------------------------------------------------------------------------
@@ -131,34 +130,6 @@ void RasServices::setErrDataService(ErrDataService & i_ErrDataService)
//------------------------------------------------------------------------------
-void ErrDataService::SetErrorTod(ATTENTION_TYPE the_attention,
- ServiceDataCollector & sdc)
-{
- Timer l_curEventTime;
- PlatServices::getCurrentTime(l_curEventTime);
- sdc.SetTOE(l_curEventTime);
-}
-
-void RasServices::SetErrorTod(ATTENTION_TYPE the_attention,
- ServiceDataCollector & sdc)
-{
- iv_ErrDataService->SetErrorTod(the_attention, sdc);
-}
-
-//------------------------------------------------------------------------------
-
-void ErrDataService ::SaveRcForSrc(int32_t the_rc)
-{
- savedPrdReturnCode = the_rc;
-}
-
-void RasServices::SaveRcForSrc(int32_t the_rc)
-{
- iv_ErrDataService->SaveRcForSrc(the_rc);
-}
-
-//------------------------------------------------------------------------------
-
errlHndl_t RasServices::GenerateSrcPfa( ATTENTION_TYPE i_attnType,
ServiceDataCollector & i_sdc,
bool & o_initiateHwudump,
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 14f561966..e1c650e98 100644
--- a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.H
+++ b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.H
@@ -59,7 +59,6 @@ class ErrDataService
*/
inline ErrDataService() :
iv_serviceActionCounter(0),
- savedPrdReturnCode(0),
iv_errl(NULL)
{}
@@ -74,45 +73,23 @@ class ErrDataService
virtual void Initialize();
/**
- @brief Create an SRC, PFA data, and Error log for the ServiceData provided
- @param[in] attn_type (see iipsdbug.h)
- @param[in,out] sdc (see iipServiceData.h)
- @param[out] o_initiateHwudump whether or not to initiate hwudump
- @param[out] o_dumpTrgt The DUMP target
- @param[out] o_dumpErrl The DUMP error handle
- @param[out] o_dumpErrlActions DUMP error action flags
- @return Error Log - Null if successfully committed
- @pre SetErrorTod()?
- @post Error log(s) build and logged, SRC built, etc.
- @exception None.
- @note
+ * @brief Creates an SRC, PFA data, and error log from the SDC provided.
+ * @param i_attnType Analysis attention type.
+ * @param i_sdc Target SDC.
+ * @param o_initiateHwudump whether or not to initiate hwudump
+ * @param o_dumpTrgt The DUMP target
+ * @param o_dumpErrl The DUMP error handle
+ * @param o_dumpErrlActions DUMP error action flags
+ * @return A non-NULL error log indicates a system termination is required.
+ * Otherwise, PRD will commit the error log generated.
+ * @pre The Time of Error must be set in the given SDC.
*/
- virtual errlHndl_t GenerateSrcPfa(ATTENTION_TYPE attn_type,
- ServiceDataCollector & sdc,
- bool & o_initiateHwudump,
- TARGETING::TargetHandle_t & o_dumpTrgt,
- errlHndl_t & o_dumpErrl,
- uint32_t & o_dumpErrlActions );
-
- /**
- @brief Set the TOD of the current error
- @param[in] the_attention (see iipsdbug.h)
- @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,
- ServiceDataCollector & sdc );
-
- /**
- @brief Save a return code for inclusion in the SRC (something failed)
- @param[in] a return code
- @return none.
- @pre None.
- @post Rc stored
- */
- virtual void SaveRcForSrc(int32_t the_rc);
+ virtual errlHndl_t GenerateSrcPfa( ATTENTION_TYPE i_attnType,
+ ServiceDataCollector & i_sdc,
+ bool & o_initiateHwudump,
+ TARGETING::TargetHandle_t & o_dumpTrgt,
+ errlHndl_t & o_dumpErrl,
+ uint32_t & o_dumpErrlActions );
/**
@brief Add the Service Data Collector Capture Data to the User Data of the Error Log.
@@ -125,11 +102,6 @@ class ErrDataService
*/
static void AddCapData( CaptureData & i_cd, errlHndl_t i_errHdl);
- static void SetTerminateOnCheckstop(bool setting)
- {
- terminateOnCheckstop = setting;
- }
-
/**
* @brief Add trace data to file for Manufacturing.
* @param i_esig Error signature.
@@ -287,12 +259,8 @@ class ErrDataService
uint32_t iv_serviceActionCounter;
- int32_t savedPrdReturnCode;
-
ServiceDataCollector sdc;
- static bool terminateOnCheckstop;
-
errlHndl_t iv_errl;
};
@@ -325,50 +293,24 @@ public:
*/
virtual void setErrDataService(ErrDataService & i_ErrDataService);
- /**
- @brief Set the TOD of the current error and check for Machine check
- @param[in] the_attention (see iipsdbug.h)
- @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,
- ServiceDataCollector & sdc );
-
- /**
- @brief Save a return code for inclusion in the SRC (something failed)
- @param[in] a return code
- @return none.
- @pre None.
- @post Rc stored
- */
- virtual void SaveRcForSrc(int32_t the_rc);
-
- /**
- @brief Create an SRC, PFA data, and Error log for the ServiceData provided
- @param[in] attn_type (see iipsdbug.h)
- @param[in,out] sdc (see iipServiceData.h)
- @param[out] o_initiateHwudump whether or not to initiate hwudump
- @param[out] o_dumpTrgt The DUMP target.
- @param[out] o_dumpErrl The DUMP error handle
- @param[out] o_dumpErrlActions DUMP error action flags
- @return Error Log - Null if successfully committed
- @pre SetErrorTod()?
- @post Error log(s) build and logged, SRC built, etc.
- @exception None.
- */
- virtual errlHndl_t GenerateSrcPfa( ATTENTION_TYPE attn_type,
- ServiceDataCollector & sdc,
- bool & o_initiateHwudump,
- TARGETING::TargetHandle_t & o_dumpTrgt,
- errlHndl_t & o_dumpErrl,
- uint32_t & o_dumpErrlActions );
-
- static void SetTerminateOnCheckstop(bool setting)
- {
- ErrDataService::SetTerminateOnCheckstop(setting);
- }
+ /**
+ * @brief Creates an SRC, PFA data, and error log from the SDC provided.
+ * @param i_attnType Analysis attention type.
+ * @param i_sdc Target SDC.
+ * @param o_initiateHwudump whether or not to initiate hwudump
+ * @param o_dumpTrgt The DUMP target
+ * @param o_dumpErrl The DUMP error handle
+ * @param o_dumpErrlActions DUMP error action flags
+ * @return A non-NULL error log indicates a system termination is required.
+ * Otherwise, PRD will commit the error log generated.
+ * @pre The Time of Error must be set in the given SDC.
+ */
+ virtual errlHndl_t GenerateSrcPfa( ATTENTION_TYPE i_attnType,
+ ServiceDataCollector & i_sdc,
+ bool & o_initiateHwudump,
+ TARGETING::TargetHandle_t & o_dumpTrgt,
+ errlHndl_t & o_dumpErrl,
+ uint32_t & o_dumpErrlActions );
/**
* @brief Create initial error log for analyze( attn analysis) code flow.
diff --git a/src/usr/diag/prdf/common/framework/service/xspprdService.h b/src/usr/diag/prdf/common/framework/service/xspprdService.h
index 6513a5b6f..ba8d45dd7 100755
--- a/src/usr/diag/prdf/common/framework/service/xspprdService.h
+++ b/src/usr/diag/prdf/common/framework/service/xspprdService.h
@@ -33,9 +33,6 @@
// ServiceGenerator serv_generator
// ATTENTION_TYPE attentionType = MACHINE_CHECK; (see iipsdbug.h)
//
-// ///// Save a bad return code to be in th SRC
-// serv_generator.SaveRcForSrc((int32_t)analyzeRc);
-//
// ServiceDataCollector serviceData;
// // serviceData = results from PRD Analysis;
// ///// Make an SRC for PRD
@@ -123,48 +120,24 @@ public:
*/
virtual void setErrDataService(ErrDataService & i_errDataService)=0;
- /**
- Set the TOD of the current error
- <ul>
- <br><b>Parameter: </b> the_attention (see iipsdbug.h)
- <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,
- ServiceDataCollector & sdc)=0;
-
- /**
- Save a return code for inclusion in the SRC (something failed)
- <ul>
- <br><b>Parameters: </b> a return code
- <br><b>Returns: </b> none.
- <br><b>Requirements:</b> None.
- <br><b>Promises: </b> Rc stored
- </ul><br>
- */
- virtual void SaveRcForSrc(int32_t the_rc)=0;
-
- /**
- @brief Create an SRC, PFA data, and Error log for the ServiceData provided
- @param[in] attn_type (see iipsdbug.h)
- @param[in,out] sdc (see iipServiceData.h)
- @param[out] o_initiateHwudump whether or not to initiate hwudump
- @param[out] o_dumpTrgt The DUMP target.
- @param[out] o_dumpErrl The DUMP error handle
- @param[out] o_dumpErrlActions DUMP error action flags
- @return Error Log - Null if successfully committed
- @pre SetErrorTod()?
- @post Error log(s) build and logged, SRC built, etc.
- @exception None.
- */
- virtual errlHndl_t GenerateSrcPfa(ATTENTION_TYPE attn_type,
- ServiceDataCollector & sdc,
- bool & o_initiateHwudump,
- TARGETING::TargetHandle_t & o_dumpTrgt,
- errlHndl_t & o_dumpErrl,
- uint32_t & o_dumpErrlActions )=0;
+ /**
+ * @brief Creates an SRC, PFA data, and error log from the SDC provided.
+ * @param i_attnType Analysis attention type.
+ * @param i_sdc Target SDC.
+ * @param o_initiateHwudump whether or not to initiate hwudump
+ * @param o_dumpTrgt The DUMP target
+ * @param o_dumpErrl The DUMP error handle
+ * @param o_dumpErrlActions DUMP error action flags
+ * @return A non-NULL error log indicates a system termination is required.
+ * Otherwise, PRD will commit the error log generated.
+ * @pre The Time of Error must be set in the given SDC.
+ */
+ virtual errlHndl_t GenerateSrcPfa( ATTENTION_TYPE i_attnType,
+ ServiceDataCollector & i_sdc,
+ bool & o_initiateHwudump,
+ TARGETING::TargetHandle_t & o_dumpTrgt,
+ errlHndl_t & o_dumpErrl,
+ uint32_t & o_dumpErrlActions ) = 0;
/**
* @brief Create initial error log for analyze( attn analysis) code flow.
diff --git a/src/usr/diag/prdf/common/prdfMain_common.C b/src/usr/diag/prdf/common/prdfMain_common.C
index d375c2b9d..8d27e53c8 100755
--- a/src/usr/diag/prdf/common/prdfMain_common.C
+++ b/src/usr/diag/prdf/common/prdfMain_common.C
@@ -247,8 +247,10 @@ errlHndl_t main( ATTENTION_VALUE_TYPE i_attentionType,
serviceData.SetAttentionType(i_attentionType);
- // capture time of day
- serviceGenerator.SetErrorTod( i_attentionType, serviceData );
+ // Set the time in which PRD handled the error.
+ Timer timeOfError;
+ PlatServices::getCurrentTime( timeOfError );
+ serviceData.SetTOE( timeOfError );
int32_t analyzeRc = systemPtr->Analyze(sdc, i_attentionType);
// flush Cache to free up the memory
@@ -298,8 +300,6 @@ errlHndl_t main( ATTENTION_VALUE_TYPE i_attentionType,
PlatServices::milliSleep( 0, 20 );
}
- RasServices::SetTerminateOnCheckstop(true);
-
retErrl = g_prd_errlHndl.release();
} // system scope lock ends ------------------------------------------
diff --git a/src/usr/diag/prdf/test/prdfsimRasServices.H b/src/usr/diag/prdf/test/prdfsimRasServices.H
index 7de593985..4c4257831 100755
--- a/src/usr/diag/prdf/test/prdfsimRasServices.H
+++ b/src/usr/diag/prdf/test/prdfsimRasServices.H
@@ -51,25 +51,24 @@ class SimErrDataService: public ErrDataService
*/
inline virtual ~SimErrDataService() {}
- /**
- @brief Create an SRC, PFA data, and Error log for the ServiceData provided
- @param[in] attn_type (see iipsdbug.h)
- @param[in,out] sdc (see iipServiceData.h)
- @param[out] o_initiateHwudump whether or not to initiate hwudump
- @param[out] o_dumpTrgt The DUMP target.
- @param[out] o_dumpErrl The DUMP error handle
- @param[out] o_dumpErrlActions DUMP error action flags
- @return Error Log - Null if successfully committed
- @pre SetErrorTod()?
- @post Error log(s) build and logged, SRC built, etc.
- @exception None.
- */
- virtual errlHndl_t GenerateSrcPfa(ATTENTION_TYPE attn_type,
- ServiceDataCollector & sdc,
- bool & o_initiateHwudump,
- TARGETING::TargetHandle_t & o_dumpTrgt,
- errlHndl_t & o_dumpErrl,
- uint32_t & o_dumpErrlActions );
+ /**
+ * @brief Creates an SRC, PFA data, and error log from the SDC provided.
+ * @param i_attnType Analysis attention type.
+ * @param i_sdc Target SDC.
+ * @param o_initiateHwudump whether or not to initiate hwudump
+ * @param o_dumpTrgt The DUMP target
+ * @param o_dumpErrl The DUMP error handle
+ * @param o_dumpErrlActions DUMP error action flags
+ * @return A non-NULL error log indicates a system termination is required.
+ * Otherwise, PRD will commit the error log generated.
+ * @pre The Time of Error must be set in the given SDC.
+ */
+ virtual errlHndl_t GenerateSrcPfa( ATTENTION_TYPE i_attnType,
+ ServiceDataCollector & i_sdc,
+ bool & o_initiateHwudump,
+ TARGETING::TargetHandle_t & o_dumpTrgt,
+ errlHndl_t & o_dumpErrl,
+ uint32_t & o_dumpErrlActions );
private: // functions
OpenPOWER on IntegriCloud