summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPrem Shanker Jha <premjha2@in.ibm.com>2013-08-21 01:24:54 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-09-22 13:25:59 -0500
commit83e47c8df68c5736a8bb080d0a250df77c82f935 (patch)
tree9f1f5eac015f59754f0a4ab15359079a43a3f1e2 /src
parentfebedf95b66560310d0580598cd9cc2934578c9f (diff)
downloadtalos-hostboot-83e47c8df68c5736a8bb080d0a250df77c82f935.tar.gz
talos-hostboot-83e47c8df68c5736a8bb080d0a250df77c82f935.zip
PRD: Additional RasServices refactoring
RTC:63892 Change-Id: I792f0f47bfa1950b1d9e3cb5c590d72af632dc38 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/5911 Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Tested-by: Jenkins Server Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13459 Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C96
-rw-r--r--src/usr/diag/prdf/common/framework/service/prdfRasServices_common.H7
-rw-r--r--src/usr/diag/prdf/framework/service/prdfRasServices.C10
-rw-r--r--src/usr/diag/prdf/prdfErrlUtil.H8
-rw-r--r--src/usr/diag/prdf/prdfGlobal.H6
5 files changed, 57 insertions, 70 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 451fe6884..e44fe80bc 100644
--- a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C
+++ b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C
@@ -130,7 +130,6 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType,
HWAS::GARD_ErrorType gardErrType = HWAS::GARD_NULL;
HWAS::DeconfigEnum deconfigState = HWAS::NO_DECONFIG;
- bool ReturnELog = false;
bool ForceTerminate = false;
bool iplDiagMode = false;
bool deferDeconfig = false;
@@ -152,8 +151,6 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType,
PRDF_ERR( PRDF_FUNC"Hostboot should NOT have any system checkstop!" );
#else
- ReturnELog = true;
-
severityParm = ERRL_SEV_UNRECOVERABLE;
// Check for SUE-CS condition flags.
@@ -629,7 +626,6 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType,
pfaData.errlActions = actionFlag;
}
-
// Needed to move the errl add user data sections here because of some updates
// of the data required in the Aysnc section for the SMA dual reporting fix.
@@ -661,73 +657,53 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType,
PRDF_COLLECT_TRACE(iv_errl, 768);
//**************************************************************
- // Commit the eror log.
+ // Commit the error log.
// This will also perform Gard and Deconfig actions.
// Do the Unit Dumps if needed.
//**************************************************************
- if (io_sdc.IsDontCommitErrl() && !io_sdc.IsUnitCS() && (MACHINE_CHECK != i_attnType) )
+
+ if ( io_sdc.IsDontCommitErrl() && !io_sdc.IsUnitCS() &&
+ (MACHINE_CHECK != pfaData.priAttnType) )
{
- delete iv_errl;
- iv_errl = NULL;
+ // User did not want this error log committed, so delete it.
+ delete iv_errl; iv_errl = NULL;
}
- else if ( !ReturnELog && !ForceTerminate && !io_sdc.Terminate() )
+ else
{
- // Handle any unit checkstop conditions, if needed (i.e. runtime
- // deconfiguration, dump/FFDC collection, etc.
- if ( io_sdc.IsUnitCS() && !io_sdc.IsUsingSavedSdc() )
+ // Add the MNFG trace information.
+ MnfgTrace( io_sdc.GetErrorSignature(), pfaData );
+
+ // If this is not a terminating condition, commit the error log. If the
+ // error log is not committed, the error log will be passed back to
+ // PRDF::main() and eventually ATTN.
+ if ( MACHINE_CHECK != pfaData.priAttnType && !ForceTerminate &&
+ !pfaData.TERMINATE )
{
- handleUnitCS( io_sdc, o_dumpTrgt, o_initiateHwudump );
- }
-
- // Commit the Error log
- // Need to move below here since we'll need
- // to pass iv_errl to PRDF_HWUDUMP
- // for FSP specific SRC handling in the future
- MnfgTrace( esig, pfaData );
-
- if ( true == o_initiateHwudump )
- {
- // the dump log will be deleted later in PRDF::main
- // after the hwudump is initiated there.
- o_dumpErrl = iv_errl;
- iv_errl = NULL;
- o_dumpErrlActions = actionFlag;
- PRDF_TRAC( PRDF_FUNC"for target: 0x%08x, i_errl: 0x%08x, "
- "i_errlActions: 0x%08x", getHuid(o_dumpTrgt),
- ERRL_GETRC_SAFE(o_dumpErrl), o_dumpErrlActions );
- }
- else
- {
- PRDF_HW_COMMIT_ERRL( iv_errl, actionFlag );
- if ( NULL != iv_errl )
+ // Handle any unit checkstop conditions, if needed (i.e. runtime
+ // deconfiguration, dump/FFDC collection, etc.
+ if ( io_sdc.IsUnitCS() && !io_sdc.IsUsingSavedSdc() )
{
- // Just commit the log.
- uint32_t dumpPlid = 0;
- PRDF_GET_PLID(iv_errl, dumpPlid);
-
- uint32_t l_rc = 0;
- PRDF_GET_RC(iv_errl, l_rc);
-
- uint16_t l_reasonCode = 0;
- PRDF_GET_REASONCODE(iv_errl, l_reasonCode);
-
- PRDF_INF( PRDF_FUNC"Committing error log: PLID=%.8X, "
- "ReasonCode=%.8X, RC=%.8X, actions=%.4X",
- dumpPlid, l_reasonCode, l_rc, actionFlag );
+ handleUnitCS( io_sdc, o_dumpTrgt, o_initiateHwudump );
+ }
- PRDF_COMMIT_ERRL(iv_errl, actionFlag);
+ if ( true == o_initiateHwudump )
+ {
+ // the dump log will be deleted later in PRDF::main
+ // after the hwudump is initiated there.
+ o_dumpErrl = iv_errl;
+ iv_errl = NULL;
+ o_dumpErrlActions = actionFlag;
+ PRDF_TRAC( PRDF_FUNC"for target: 0x%08x, i_errl: 0x%08x, "
+ "i_errlActions: 0x%08x", getHuid(o_dumpTrgt),
+ ERRL_GETRC_SAFE(o_dumpErrl), o_dumpErrlActions );
+ }
+ else
+ {
+ // Commit the error log.
+ commitErrLog( iv_errl, pfaData );
}
}
}
- // If the Error Log is not committed (as due to a Terminate condtion),
- // the Error Log will be returned to PRDMain
- else
- {
-
- MnfgTrace( esig, pfaData );
-
- PRDF_DTRAC( PRDF_FUNC"generating a terminating, or MP Fatal SRC" );
- }
#ifndef __HOSTBOOT_MODULE
errlHndl_t reg_errl = UtilReg::read ("prdf/RasServices", &sdcSaveFlags, sz_uint8);
@@ -968,6 +944,8 @@ bool ErrDataService::SdcSave( sdcSaveFlagsEnum i_saveFlag,
#undef PRDF_FUNC
}
+//------------------------------------------------------------------------------
+
bool ErrDataService::SdcRetrieve(sdcSaveFlagsEnum i_saveFlag, void * o_buffer)
{
#define PRDF_FUNC "SdcRetrieve() "
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 fdaa225f1..620a52c09 100644
--- a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.H
+++ b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.H
@@ -244,6 +244,13 @@ class ErrDataService
*/
void handleNxUnitCS( TARGETING::TargetHandle_t i_nxTarget );
+ /**
+ * @brief commits error log based on platform.
+ * @param io_errl reference to error log handle.
+ * @param i_pfaData Pfa struct
+ */
+ void commitErrLog( errlHndl_t & io_errl, const PfaData & i_pfaData );
+
private:
uint32_t iv_serviceActionCounter;
diff --git a/src/usr/diag/prdf/framework/service/prdfRasServices.C b/src/usr/diag/prdf/framework/service/prdfRasServices.C
index 2b03dff26..7f3d838d8 100644
--- a/src/usr/diag/prdf/framework/service/prdfRasServices.C
+++ b/src/usr/diag/prdf/framework/service/prdfRasServices.C
@@ -152,5 +152,15 @@ void ErrDataService::handleNxUnitCS( TargetHandle_t i_nxTarget )
// No-op in Hostboot
}
+//------------------------------------------------------------------------------
+
+void ErrDataService::commitErrLog( errlHndl_t & io_errl,
+ const PfaData & i_pfaData )
+
+{
+ errlCommit( io_errl, PRDF_COMP_ID );
+ io_errl = NULL;
+}
+
} // end namespace PRDF
diff --git a/src/usr/diag/prdf/prdfErrlUtil.H b/src/usr/diag/prdf/prdfErrlUtil.H
index 2f6c4cbe1..4729f76b5 100644
--- a/src/usr/diag/prdf/prdfErrlUtil.H
+++ b/src/usr/diag/prdf/prdfErrlUtil.H
@@ -203,14 +203,6 @@
#define PRDF_RECONFIG_LOOP(o_deconfigEnum)
/**
- * @brief Interface to request a Hardware Unit dump collection
- */
-// FIXME:RTC: 65609 will address this issue.
-// need to implement in Hostboot
-#define PRDF_HWUDUMP( i_errl, i_content, i_huid ) \
- SUCCESS
-
-/**
* @brief Interface to indicate errlog that hostboot need to do a
* soft terminate.
*/
diff --git a/src/usr/diag/prdf/prdfGlobal.H b/src/usr/diag/prdf/prdfGlobal.H
index f62f40458..5a075f34c 100644
--- a/src/usr/diag/prdf/prdfGlobal.H
+++ b/src/usr/diag/prdf/prdfGlobal.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2002,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2014 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
@@ -73,8 +75,6 @@
/**
* @brief Interface to deconfig target at Runtime (Not valid in Hostboot)
*/
-// FIXME:RTC: 65609 will address this issue.
-// need to implement in Hostboot
#define PRDF_RUNTIME_DECONFIG( i_pTarget, i_errl, i_dmp ) \
SUCCESS
OpenPOWER on IntegriCloud