summaryrefslogtreecommitdiffstats
path: root/src/usr/hwas/common/pgLogic.C
diff options
context:
space:
mode:
authorMatt Raybuck <mraybuc@us.ibm.com>2018-12-21 10:51:12 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-02-15 11:26:13 -0600
commit9825db50591c9579511fabb677a742a5bbe5a074 (patch)
tree29b4c9072fcd26a30c311805ae622111431df1f7 /src/usr/hwas/common/pgLogic.C
parent8995ddcdc7682002872937c0a343b7df36f4502c (diff)
downloadtalos-hostboot-9825db50591c9579511fabb677a742a5bbe5a074.tar.gz
talos-hostboot-9825db50591c9579511fabb677a742a5bbe5a074.zip
Better logging for Partial Good Issues (2/2)
PG issues were only ever displayed in traces. This commit creates a new error log user detail section that will display the PG vector and highlight which entries have issues. In addition, targets that are determined to be non-functional will be added to the log and a hardware callout will be added if a chip is found non-functional. Change-Id: I9b401bcd5686951303946789034671c1a395fb91 RTC:180365 CMVC-Prereq:1075293 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70004 Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/hwas/common/pgLogic.C')
-rw-r--r--src/usr/hwas/common/pgLogic.C87
1 files changed, 81 insertions, 6 deletions
diff --git a/src/usr/hwas/common/pgLogic.C b/src/usr/hwas/common/pgLogic.C
index 80fbacb02..7c88e9786 100644
--- a/src/usr/hwas/common/pgLogic.C
+++ b/src/usr/hwas/common/pgLogic.C
@@ -23,9 +23,14 @@
/* */
/* IBM_PROLOG_END_TAG */
#include <hwas/common/pgLogic.H>
+#include <hwas/common/hwasCommon.H>
+#include <hwas/common/hwas_reasoncodes.H>
#include <hwas/hwasPlatTrace.H>
#include <hwas/hwasPlatAssert.H>
#include <targeting/common/utilFilter.H>
+#include <hwas/common/hwasError.H>
+
+using namespace HWAS::COMMON;
namespace PARTIAL_GOOD
{
@@ -216,10 +221,11 @@ namespace PARTIAL_GOOD
}
}
- pgLogic_t PartialGoodRulesTable::findRulesForTarget(
- const TARGETING::TargetHandle_t &i_target) const
+ errlHndl_t PartialGoodRulesTable::findRulesForTarget(
+ const TARGETING::TargetHandle_t &i_target,
+ pgLogic_t &o_targetPgLogic) const
{
- pgLogic_t l_targetPgLogic;
+ errlHndl_t l_errl = nullptr;
// Lookup the Target in the PG Rules Table
auto rulesIterator =
@@ -268,18 +274,87 @@ namespace PARTIAL_GOOD
// for this rule.
if ((*pgRule)->useChipletIdAsIndex())
{
- pgLogic.iv_pgIndex =
+ auto l_targetChipletId =
i_target->getAttr<TARGETING::ATTR_CHIPLET_ID>();
+
+ // The index must be within range of the vector.
+ // Otherwise we'll go out-of-bounds.
+ if (l_targetChipletId < HWAS::VPD_CP00_PG_DATA_ENTRIES)
+ {
+ // The target's Chiplet Id is a valid index for this
+ // rule and is within range.
+ pgLogic.iv_pgIndex = l_targetChipletId;
+ }
+ else
+ {
+ /*@
+ * @errortype
+ * @severity ERRL_SEV_UNRECOVERABLE
+ * @moduleid HWAS::MOD_FIND_RULES_FOR_TARGET
+ * @reasoncode HWAS::RC_PG_INDEX_INVALID
+ * @devdesc A rule called for the use of the
+ * MRW's supplied CHIPLET_ID for an
+ * index into the PG vector. That
+ * value has gone unexpectedly
+ * out-of-range.
+ * @custdesc A problem occured during IPL of
+ * the system:
+ * Internal Firmware Error
+ * @userdata1 PG Index value
+ * @userdata2 HUID of the target
+ */
+ l_errl = HWAS::hwasError(
+ ERRL_SEV_UNRECOVERABLE,
+ HWAS::MOD_FIND_RULES_FOR_TARGET,
+ HWAS::RC_PG_INDEX_INVALID,
+ l_targetChipletId,
+ get_huid(i_target));
+
+ break;
+ }
}
// Add it to list of pg logic for this target.
- l_targetPgLogic.push_back(pgLogic);
+ o_targetPgLogic.push_back(pgLogic);
}
}
+ // If o_targetPgLogic has no entries then that means that there
+ // doesn't exist any PG rules for the given target or another error
+ // was encountered. If no other error occurred then return the
+ // the following error if applicable.
+ if ((l_errl == nullptr) && (o_targetPgLogic.size() == 0))
+ {
+ /*@
+ * @errortype
+ * @severity ERRL_SEV_UNRECOVERABLE
+ * @moduleid HWAS::MOD_IS_DESCENDANT_FUNCTIONAL
+ * @reasoncode HWAS::RC_NO_PG_LOGIC
+ * @devdesc To enforce all target types have partial good
+ * rules and logic, all targets must be included
+ * in the PartialGoodRulesTable. A combination
+ * of target type, chip type, and chip unit
+ * produced an empty set of logic for the
+ * target.
+ *
+ * @custdesc A problem occured during IPL of the system:
+ * Internal Firmware Error
+ * @userdata1 target type attribute
+ * @userdata2 HUID of the target
+ */
+ l_errl = hwasError(
+ ERRL_SEV_UNRECOVERABLE,
+ HWAS::MOD_IS_DESCENDANT_FUNCTIONAL,
+ HWAS::RC_NO_PG_LOGIC,
+ i_target->getAttr<TARGETING::ATTR_TYPE>(),
+ get_huid(i_target));
+
+ break;
+ }
+
} while(0);
- return l_targetPgLogic;
+ return l_errl;
}
OpenPOWER on IntegriCloud