summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/attn
diff options
context:
space:
mode:
authorBrian Stegmiller <bjs@us.ibm.com>2017-12-05 16:01:44 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-12-08 11:28:58 -0500
commit1eba8f47f718aa44800ed5be0f70b1cf795298c9 (patch)
tree70da207315086f33eb35c1791b5a865bf676c6e2 /src/usr/diag/attn
parent18f9c896aa1e4b348d3ae2ed4ff641b91b36cd67 (diff)
downloadtalos-hostboot-1eba8f47f718aa44800ed5be0f70b1cf795298c9.tar.gz
talos-hostboot-1eba8f47f718aa44800ed5be0f70b1cf795298c9.zip
Avoid assert on invalid target types for PRD and HWP PLID association
Change-Id: I576559dba463bdc884e7929f731e5a098c6f7749 CQ:SW409720 Backport: release-op910 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50535 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/diag/attn')
-rw-r--r--src/usr/diag/attn/ipl/attn.C121
1 files changed, 116 insertions, 5 deletions
diff --git a/src/usr/diag/attn/ipl/attn.C b/src/usr/diag/attn/ipl/attn.C
index b2b18e3cd..6b203c613 100644
--- a/src/usr/diag/attn/ipl/attn.C
+++ b/src/usr/diag/attn/ipl/attn.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2016 */
+/* Contributors Listed Below - COPYRIGHT 2014,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -37,9 +37,11 @@
#include "common/attntarget.H"
#include "common/attnproc.H"
#include "common/attnmem.H"
+#include "diag/attn/attnreasoncodes.H"
#include <util/singleton.H>
#include <errl/errlmanager.H>
#include <targeting/common/targetservice.H>
+#include <targeting/common/utilFilter.H>
// Custom compile configs
#include <config.h>
@@ -53,6 +55,7 @@ using namespace std;
using namespace PRDF;
using namespace TARGETING;
using namespace Util;
+using namespace ERRORLOG;
namespace ATTN
{
@@ -92,13 +95,12 @@ errlHndl_t checkForIplAttentions()
assert(l_sys != NULL);
l_sys->tryGetAttr<ATTR_ATTN_CHK_ALL_PROCS>(l_useAllProcs);
+ getTargetService().masterProcChipTargetHandle(
+ l_MasterProcTarget);
// Do we want to check ALL procs ?
if (0 == l_useAllProcs)
{
- getTargetService().masterProcChipTargetHandle(
- l_MasterProcTarget);
-
list.push_back(l_MasterProcTarget);
} // end if just master proc
else
@@ -122,7 +124,116 @@ errlHndl_t checkForIplAttentions()
tit = list.erase(tit);
}
- return 0;
+ // ====================================================================
+ // PRD and HW procedures use an attribute to associate errors
+ // together. If we still see that 'active' when done checking
+ // attentions, we are suppose to build an error log with a
+ // matching PLID so the istep fails. Then hopefully people
+ // look at the other error log with the same PLID and not this
+ // one since that is the real error.
+ // ====================================================================
+ // NOTE: There could be multiple PLIDs set on different targets
+ // So we may need to commit some elogs and pass back one.
+ // ====================================================================
+ ATTR_MODEL_type l_model = l_MasterProcTarget->getAttr<ATTR_MODEL>();
+ errlHndl_t l_plidElog = NULL;
+ uint32_t l_plid = 0;
+ TARGETING::TYPE l_memType;
+ TargetHandleList l_allProcsList, l_memList;
+
+
+ // Setup appropriate memory type target
+ if ( MODEL_NIMBUS == l_model )
+ {
+ l_memType = TYPE_MCA;
+ } // if NIMBUS
+ else if ( MODEL_CUMULUS == l_model )
+ {
+ l_memType = TYPE_DMI;
+ } // if CUMULUS
+ else
+ {
+ ATTN_ERR("ChkForIplAttns Unknown PROC type - add support");
+ assert(0);
+ } // UNKNOWN proc type
+
+
+ // This gets all PROCs whether functional or not
+ getTargetService().getAllChips(l_allProcsList, TYPE_PROC, false);
+
+ // Loop thru all PROC targets
+ for ( auto l_procTarg : l_allProcsList )
+ {
+ // check PROC target first for attribute
+ l_procTarg->tryGetAttr<ATTR_PRD_HWP_PLID>(l_plid);
+
+ if (0 != l_plid)
+ {
+ ATTN_SLOW("checkForIplAttentions PROC plid found");
+
+ // If we had a prior ELOG, we need to commit it
+ // since we will be creating another one here.
+ if (NULL != l_plidElog)
+ {
+ errlCommit(l_plidElog, ATTN_COMP_ID);
+ }
+
+ // Build elog with same PLID value
+ l_plidElog = new ErrlEntry( ERRL_SEV_UNRECOVERABLE,
+ ATTN_CHK_IPL_ATTNS_MODULE,
+ ATTN_SEE_HW_ERROR,
+ l_plid, TYPE_PROC
+ );
+
+ // Make sure PLID matches the HW error
+ l_plidElog->plid(l_plid);
+
+ // clear attribute
+ l_plid = 0;
+ l_procTarg->trySetAttr<ATTR_PRD_HWP_PLID>(l_plid);
+ } // non-zero PLID in attribute
+
+
+ // Get the list of MEMORY related units (functional or not)
+ getChildChiplets(l_memList, l_procTarg, l_memType, false);
+
+ for ( auto l_memTarg : l_memList )
+ {
+ // check PROC target first for attribute
+ l_memTarg->tryGetAttr<ATTR_PRD_HWP_PLID>(l_plid);
+
+ if (0 != l_plid)
+ {
+ ATTN_SLOW("checkForIplAttentions MEM plid found");
+
+ // If we had a prior ELOG, we need to commit it
+ // since we will be creating another one here.
+ if (NULL != l_plidElog)
+ {
+ errlCommit(l_plidElog, ATTN_COMP_ID);
+ }
+
+ // Build elog with same PLID value
+ l_plidElog = new ErrlEntry( ERRL_SEV_UNRECOVERABLE,
+ ATTN_CHK_IPL_ATTNS_MODULE,
+ ATTN_SEE_HW_ERROR,
+ l_plid, l_memType
+ );
+
+ // Make sure PLID matches the HW error
+ l_plidElog->plid(l_plid);
+
+ // clear attribute
+ l_plid = 0;
+ l_memTarg->trySetAttr<ATTR_PRD_HWP_PLID>(l_plid);
+ } // non-zero PLID in attribute
+
+ } // end for on mem target
+
+ } // end for loop on PROC targets
+ // ====================================================================
+
+ return l_plidElog;
}
#ifdef CONFIG_ENABLE_CHECKSTOP_ANALYSIS
OpenPOWER on IntegriCloud