summaryrefslogtreecommitdiffstats
path: root/src/usr/diag
diff options
context:
space:
mode:
authorSachin Gupta <sgupta2m@in.ibm.com>2014-12-07 23:35:33 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-02-27 23:52:17 -0600
commit23cb6de617346dfbecebf64e67a0202915170829 (patch)
treeec5b0e6e24be473f7fa96ce90f6471578cefe472 /src/usr/diag
parent64b4d0061a5d02c5664ee30401208b5a76d4030f (diff)
downloadtalos-hostboot-23cb6de617346dfbecebf64e67a0202915170829.tar.gz
talos-hostboot-23cb6de617346dfbecebf64e67a0202915170829.zip
ATTN : Support for checkstop analysis.
Change-Id: I7a8c1b974d0d3d16ea2d92b997a9bb7e71ea0ac7 RTC: 119543 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/14769 Tested-by: Jenkins Server Reviewed-by: Prem Shanker Jha <premjha2@in.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: Christopher T. Phan <cphan@us.ibm.com> Reviewed-by: Bilicon Patil <bilpatil@in.ibm.com> Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/diag')
-rw-r--r--src/usr/diag/attn/common/attnprd.C23
-rw-r--r--src/usr/diag/attn/ipl/attn.C9
-rw-r--r--src/usr/diag/attn/ipl/attnsvc.C69
-rw-r--r--src/usr/diag/attn/ipl/attnsvc.H19
4 files changed, 113 insertions, 7 deletions
diff --git a/src/usr/diag/attn/common/attnprd.C b/src/usr/diag/attn/common/attnprd.C
index 3fcce006b..1111c14ed 100644
--- a/src/usr/diag/attn/common/attnprd.C
+++ b/src/usr/diag/attn/common/attnprd.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014 */
+/* Contributors Listed Below - COPYRIGHT 2014,2015 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -40,6 +40,13 @@
#include <util/singleton.H>
#include <errl/errlmanager.H>
+// Custom compile configs
+#include <config.h>
+
+#if !defined(__HOSTBOOT_RUNTIME) && defined(CONFIG_ENABLE_CHECKSTOP_ANALYSIS)
+ #include <prdf/prdfMain_ipl.H>
+#endif
+
using namespace std;
using namespace PRDF;
using namespace TARGETING;
@@ -77,7 +84,19 @@ errlHndl_t PrdImpl::callPrd(const AttentionList & i_attentions)
// requirement that the highest priority attention
// appear first in the argument list is satisfied.
- err = PRDF::main(attnList.front().attnType, attnList);
+ // Checkstop can only be handled in next IPL session. Call
+ // separate function to handle CS.
+ #if !defined(__HOSTBOOT_RUNTIME) && \
+ defined(CONFIG_ENABLE_CHECKSTOP_ANALYSIS)
+ if( MACHINE_CHECK == attnList.front().attnType )
+ {
+ err = PRDF::analyzeCheckStop(attnList.front().attnType, attnList);
+ }
+ else
+ #endif
+ {
+ err = PRDF::main(attnList.front().attnType, attnList);
+ }
}
return err;
diff --git a/src/usr/diag/attn/ipl/attn.C b/src/usr/diag/attn/ipl/attn.C
index 181c7ce34..2b0c7b950 100644
--- a/src/usr/diag/attn/ipl/attn.C
+++ b/src/usr/diag/attn/ipl/attn.C
@@ -119,6 +119,7 @@ errlHndl_t checkForCSAttentions()
if ( !validData )
{
// Nothing to do, exit quietly.
+ ATTN_SLOW("No PNOR data found, nothing to analyze.");
break;
}
@@ -126,7 +127,13 @@ errlHndl_t checkForCSAttentions()
FileRegSvc fileRegs;
fileRegs.installScomImpl();
- // TODO: RTC 119543 Process the checkstop attention
+ // Process the checkstop attention
+ errl = Singleton<Service>::instance().processCheckstop();
+ if ( NULL != errl )
+ {
+ firData.addFfdc( errl );
+ errlCommit( errl, ATTN_COMP_ID );
+ }
// Uninstall File scom implementation.
Singleton<ScomImpl>::instance().installScomImpl();
diff --git a/src/usr/diag/attn/ipl/attnsvc.C b/src/usr/diag/attn/ipl/attnsvc.C
index 51fb87603..fb66a5aea 100644
--- a/src/usr/diag/attn/ipl/attnsvc.C
+++ b/src/usr/diag/attn/ipl/attnsvc.C
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/usr/diag/attn/hostboot/attnsvc.C $ */
+/* $Source: src/usr/diag/attn/ipl/attnsvc.C $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014 */
+/* Contributors Listed Below - COPYRIGHT 2014,2015 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -37,6 +37,9 @@
#include "common/attnmem.H"
#include "common/attntarget.H"
+// Custom compile configs
+#include <config.h>
+
using namespace std;
using namespace PRDF;
using namespace TARGETING;
@@ -216,6 +219,68 @@ void Service::processIntrQMsg(msg_t & i_msg)
}
+#ifdef CONFIG_ENABLE_CHECKSTOP_ANALYSIS
+
+errlHndl_t Service::processCheckstop()
+{
+ errlHndl_t err = NULL;
+ AttentionList attentions;
+
+ assert(!Singleton<Service>::instance().running());
+ TargetHandleList list;
+
+ MemOps & memOps = getMemOps();
+ ProcOps & procOps = getProcOps();
+ attentions.clear();
+
+ getTargetService().getAllChips(list, TYPE_PROC);
+
+ TargetHandleList::iterator tit = list.begin();
+
+ while(tit != list.end())
+ {
+ // query the proc resolver for active attentions
+
+ err = procOps.resolve( *tit, 0, attentions);
+
+ if(err)
+ {
+ ATTN_ERR("procOps.resolve() returned error.HUID:0X%08X ",
+ get_huid( *tit ));
+ break;
+ }
+
+ // query the mem resolver for active attentions
+
+ err = memOps.resolve(*tit, attentions);
+
+ if(err)
+ {
+ ATTN_ERR("memOps.resolve() returned error.HUID:0X%08X ",
+ get_huid( *tit ));
+ break;
+ }
+ ++tit;
+ }
+
+ if( NULL != err )
+ {
+ if(!attentions.empty())
+ {
+ err = getPrdWrapper().callPrd(attentions);
+ }
+
+ if(err)
+ {
+ ATTN_ERR("callPrd() returned error." )
+ }
+ }
+
+ return err;
+}
+
+#endif // CONFIG_ENABLE_CHECKSTOP_ANALYSIS
+
void* Service::prdTask(void * i_svc)
{
// prd task loop
diff --git a/src/usr/diag/attn/ipl/attnsvc.H b/src/usr/diag/attn/ipl/attnsvc.H
index 7f0d3f487..aa5a974f0 100644
--- a/src/usr/diag/attn/ipl/attnsvc.H
+++ b/src/usr/diag/attn/ipl/attnsvc.H
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/usr/diag/attn/hostboot/attnsvc.H $ */
+/* $Source: src/usr/diag/attn/ipl/attnsvc.H $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014 */
+/* Contributors Listed Below - COPYRIGHT 2014,2015 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -35,6 +35,9 @@
#include <sys/sync.h>
#include "common/attnsvc_common.H"
+// Custom compile configs
+#include <config.h>
+
namespace ATTN
{
@@ -91,6 +94,18 @@ class Service : public ServiceCommon
*/
~Service();
+ #ifdef CONFIG_ENABLE_CHECKSTOP_ANALYSIS
+
+ /**
+ * @brief Process checlstop attentions.
+ *
+ * @retval[0] no error
+ * @retval[!0] unexpected error
+ */
+ errlHndl_t processCheckstop();
+
+ #endif // CONFIG_ENABLE_CHECKSTOP_ANALYSIS
+
private:
/**
OpenPOWER on IntegriCloud