summaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rwxr-xr-xsrc/build/citest/build-errl-parsers2
-rw-r--r--src/include/usr/hwas/common/hwas_reasoncodes.H17
-rw-r--r--src/include/usr/hwas/common/pgLogic.H18
-rw-r--r--src/include/usr/hwas/common/vpdConstants.H5
-rw-r--r--src/include/usr/hwas/hwasPlatReasonCodes.H10
-rw-r--r--src/usr/hwas/common/hwas.C127
-rw-r--r--src/usr/hwas/common/pgLogic.C87
-rw-r--r--src/usr/hwas/errlud_pgData.C81
-rw-r--r--src/usr/hwas/errlud_pgData.H85
-rw-r--r--src/usr/hwas/hwasPlatError.C18
-rw-r--r--src/usr/hwas/makefile1
-rw-r--r--src/usr/hwas/plugins/HWAS_COMP_ID_Parse.C28
-rw-r--r--src/usr/hwas/plugins/errludParser_pgData.H189
-rw-r--r--src/usr/hwas/plugins/hwasUdParserFactory.H53
14 files changed, 661 insertions, 60 deletions
diff --git a/src/build/citest/build-errl-parsers b/src/build/citest/build-errl-parsers
index cda1a30f2..3f28ea4e0 100755
--- a/src/build/citest/build-errl-parsers
+++ b/src/build/citest/build-errl-parsers
@@ -6,7 +6,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2014,2018
+# Contributors Listed Below - COPYRIGHT 2014,2019
# [+] International Business Machines Corp.
#
#
diff --git a/src/include/usr/hwas/common/hwas_reasoncodes.H b/src/include/usr/hwas/common/hwas_reasoncodes.H
index cc133c323..09e0e2a56 100644
--- a/src/include/usr/hwas/common/hwas_reasoncodes.H
+++ b/src/include/usr/hwas/common/hwas_reasoncodes.H
@@ -37,7 +37,9 @@ namespace HWAS
MOD_RUNTIME_DECONFIG = 0x06,
MOD_DISABLE_OBUS = 0x07,
MOD_UPDATE_PROC_MEM_TO_USE = 0x08,
- MOD_IS_DESCENDANT_FUNCTIONAL = 0x09
+ MOD_IS_DESCENDANT_FUNCTIONAL = 0x09,
+ MOD_FIND_RULES_FOR_TARGET = 0x0A,
+ MOD_DISCOVER_TARGETS = 0x0B,
};
enum HwasReasonCode
@@ -70,7 +72,20 @@ namespace HWAS
RC_NO_PG_LOGIC = HWAS_COMP_ID | 0x16,
RC_SYSAVAIL_NO_OCMBS_FUNC = HWAS_COMP_ID | 0x17,
RC_SYSAVAIL_NO_MEMORY_PRESENT = HWAS_COMP_ID | 0x18,
+ RC_PG_INDEX_INVALID = HWAS_COMP_ID | 0x19,
+ RC_PARTIAL_GOOD_INFORMATION = HWAS_COMP_ID | 0x1A,
};
+
+ enum HwasPlatUserDetailsTypes
+ {
+ HWAS_UDT_PARTIAL_GOOD_DATA = 0x01
+ };
+
+ enum HwasPlatUserDetailsVersions
+ {
+ HWAS_UDT_VERSION_1 = 0x01
+ };
+
};
#endif
diff --git a/src/include/usr/hwas/common/pgLogic.H b/src/include/usr/hwas/common/pgLogic.H
index 8a60f0abd..8ecb1631c 100644
--- a/src/include/usr/hwas/common/pgLogic.H
+++ b/src/include/usr/hwas/common/pgLogic.H
@@ -421,19 +421,23 @@ namespace PARTIAL_GOOD
/**
* @brief This function will lookup the list of applicable rules for the
* given target and return them as a vector of PartialGoodLogic.
- * This function should always return a vector of size >= 1. An
- * empty vector indicates that the target isn't represented in
- * the rules table which is an error of omission.
+ * This function should always return a vector of size >= 1. If
+ * that isn't the case then an error will be returned by this
+ * function.
*
- * @param[in] i_target The target to find pg rules for.
+ * @param[in] i_target The target to find pg rules for.
*
- * @return vector_pgLogic_t A vector of PartialGoodLogic structs
+ * @param[out] o_pgLogic A vector of PartialGoodLogic structs
* representing the list of applicable rules
* used to verify if a target is functional
* or not.
+ *
+ * @return errlHndl_t An error that occured while getting pg
+ * logic or nullptr.
*/
- pgLogic_t
- findRulesForTarget(const TARGETING::TargetHandle_t &i_target) const;
+ errlHndl_t
+ findRulesForTarget(const TARGETING::TargetHandle_t &i_target,
+ pgLogic_t &o_pgLogic) const;
private:
// A map that will hold all of the PG rules for all targets. If a target
diff --git a/src/include/usr/hwas/common/vpdConstants.H b/src/include/usr/hwas/common/vpdConstants.H
index a82eb3fb3..498f6d622 100644
--- a/src/include/usr/hwas/common/vpdConstants.H
+++ b/src/include/usr/hwas/common/vpdConstants.H
@@ -29,6 +29,11 @@
namespace HWAS
{
+// NOTE: Many of the VPD_CP00_PG_X constants are used to construct an "All Good"
+// vector to compare against the PG vector of a system. Changes to
+// constants in this file should be reflected in
+// src/usr/hwas/plugins/errludParser_pgData.H
+
// constants the platReadPartialGood will use for looking at the VPD data
const uint32_t VPD_CP00_PG_DATA_LENGTH = 128;
const uint32_t VPD_CP00_PG_HDR_LENGTH = 1;
diff --git a/src/include/usr/hwas/hwasPlatReasonCodes.H b/src/include/usr/hwas/hwasPlatReasonCodes.H
index b02de6789..6ca33397a 100644
--- a/src/include/usr/hwas/hwasPlatReasonCodes.H
+++ b/src/include/usr/hwas/hwasPlatReasonCodes.H
@@ -52,18 +52,8 @@ namespace HWAS
RC_BAD_MCA = HWAS_COMP_ID | 0x85,
RC_RT_NULL_FIRMWARE_REQUEST_PTR = HWAS_COMP_ID | 0x86,
RC_RT_NULL_FIRMWARE_MSG_PTR = HWAS_COMP_ID | 0x87,
- RC_PARTIAL_GOOD_INFORMATION = HWAS_COMP_ID | 0x88,
};
- enum HwasPlatUserDetailsTypes
- {
- HWAS_UDT_PARTIAL_GOOD_DATA = 0x01,
- };
-
- enum HwasPlatUserDetailsVersions
- {
- HWAS_UDT_VERSION_1 = 0x01,
- };
};
#endif
diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C
index a112ab2fe..db91372f2 100644
--- a/src/usr/hwas/common/hwas.C
+++ b/src/usr/hwas/common/hwas.C
@@ -758,12 +758,35 @@ errlHndl_t discoverTargets()
bool chipPresent = true;
bool chipFunctional = true;
+ bool createInfoLog = false;
uint32_t errlEid = 0;
uint16_t pgData[VPD_CP00_PG_DATA_ENTRIES];
bzero(pgData, sizeof(pgData));
// Cache the target type
auto l_targetType = pTarget->getAttr<ATTR_TYPE>();
+
+ // This error is created preemptively to capture any targets that
+ // were deemed non-functional for partial good reasons. If there are
+ // no issues, then this error log is deleted.
+ /*@
+ * @errortype
+ * @severity ERRL_SEV_INFORMATIONAL
+ * @moduleid MOD_DISCOVER_TARGETS
+ * @reasoncode RC_PARTIAL_GOOD_INFORMATION
+ * @devdesc Partial Good (PG) issues are present within the
+ * system and this error log contains information
+ * about which targets, procs, and entries in the
+ * PG vector are problematic.
+ * @custdesc An issue occured during IPL of the system:
+ * Internal Firmware Error
+ * @userdata1 None
+ * @userdata2 None
+ */
+ errlHndl_t infoErrl = hwasError(ERRL_SEV_INFORMATIONAL,
+ MOD_DISCOVER_TARGETS,
+ RC_PARTIAL_GOOD_INFORMATION);
+
if( (pTarget->getAttr<ATTR_CLASS>() == CLASS_CHIP) &&
(l_targetType != TYPE_TPM) &&
(l_targetType != TYPE_SP) &&
@@ -811,6 +834,19 @@ errlHndl_t discoverTargets()
isChipFunctional(pTarget,
pgData);
+ if(!chipFunctional)
+ {
+ // Add this proc to the informational error log.
+ platHwasErrorAddHWCallout(infoErrl,
+ pTarget,
+ SRCI_PRIORITY_HIGH,
+ NO_DECONFIG,
+ GARD_NULL);
+
+ createInfoLog = true;
+ }
+
+
// Fill in a dummy restrict list
l_procEntry.target = pTarget;
// every proc is uniquely counted
@@ -879,6 +915,12 @@ errlHndl_t discoverTargets()
descFunctional = isDescFunctional(pDesc,
pgData,
targetStates);
+ if(!descFunctional)
+ {
+ // Add this descendant to the error log.
+ hwasErrorAddTargetInfo(infoErrl, *pDesc_it);
+ createInfoLog = true;
+ }
}
if (pDesc->getAttr<ATTR_TYPE>() == TYPE_PERV)
@@ -908,6 +950,48 @@ errlHndl_t discoverTargets()
// set HWAS state to show CHIP is present, functional per above
enableHwasState(pTarget, chipPresent, chipFunctional, errlEid);
+ // If there were partial good issues with the chip or its
+ // descendents then create an info error log. Otherwise, delete
+ // and move on.
+ if (createInfoLog)
+ {
+ TargetHandle_t l_masterProc = nullptr;
+
+ //Get master proc
+ errl =
+ targetService()
+ .queryMasterProcChipTargetHandle(l_masterProc);
+ if (errl)
+ {
+ HWAS_ERR("discoverTargets: unable to get master proc");
+ errlCommit(errl, HWAS_COMP_ID);
+ errlCommit(infoErrl, HWAS_COMP_ID);
+ break;
+ }
+
+ auto l_model = l_masterProc->getAttr<ATTR_MODEL>();
+
+ // Setup model dependent all good data
+ uint16_t l_modelPgData[MODEL_PG_DATA_ENTRIES] = {0};
+
+ l_modelPgData[0] = (MODEL_NIMBUS == l_model)
+ ? (VPD_CP00_PG_XBUS_GOOD_NIMBUS
+ | VPD_CP00_PG_XBUS_IOX[0])
+ : VPD_CP00_PG_XBUS_GOOD_CUMULUS;
+
+ l_modelPgData[1] = (TARGETING::MODEL_NIMBUS == l_model)
+ ? VPD_CP00_PG_RESERVED_GOOD
+ : VPD_CP00_PG_OBUS_GOOD;
+
+ hwasErrorAddPartialGoodFFDC(infoErrl, l_modelPgData, pgData);
+ errlCommit(infoErrl, HWAS_COMP_ID);
+ }
+ else
+ {
+ delete infoErrl;
+ infoErrl = nullptr;
+ }
+
} // for pTarget_it
// Check for non-present Procs and if found, trigger
@@ -992,6 +1076,8 @@ errlHndl_t discoverTargets()
#endif
} while (0);
+
+
if (errl)
{
HWAS_INF("discoverTargets failed (plid 0x%X)", errl->plid());
@@ -1186,42 +1272,15 @@ bool isDescFunctional(const TARGETING::TargetHandle_t &i_desc,
// errors of omission, the lookup must return at least one pg logic
// struct. If a target has no associated rules then an NA rule will be
// returned that was created by the default constructor which will cause
- // the next for loop to succeed.
- PARTIAL_GOOD::pgLogic_t descPgLogic = PARTIAL_GOOD::pgTable
- .findRulesForTarget(i_desc);
+ // the next for loop to function as a no-op.
+ PARTIAL_GOOD::pgLogic_t descPgLogic;
+ errlHndl_t l_returnErrl = PARTIAL_GOOD::pgTable
+ .findRulesForTarget(i_desc, descPgLogic);
- if (descPgLogic.size() == 0)
+ if (l_returnErrl != nullptr)
{
- // If descPgLogic is empty then the PgTable was not updated when a
- // new target was added. This is not allowed. So create an error.
- HWAS_ERR("isDescFunctional: No rules for target type 0x%X were"
- " found in the PG rules table. At least one must exist."
- " HUID 0x%X",
- i_desc->getAttr<ATTR_TYPE>(), get_huid(i_desc));
-
- /*@
- * @errortype
- * @severity ERRL_SEV_UNRECOVERABLE
- * @moduleid MOD_IS_DESCENDANT_FUNCTIONAL
- * @reasoncode 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
- */
- errlHndl_t l_errl = hwasError(ERRL_SEV_UNRECOVERABLE,
- MOD_IS_DESCENDANT_FUNCTIONAL,
- RC_NO_PG_LOGIC,
- i_desc->getAttr<ATTR_TYPE>(),
- get_huid(i_desc));
-
- errlCommit(l_errl, HWAS_COMP_ID);
-
+ errlCommit(l_returnErrl, HWAS_COMP_ID);
+ break;
}
// Iterate through the list of partial good logic for this target. If
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;
}
diff --git a/src/usr/hwas/errlud_pgData.C b/src/usr/hwas/errlud_pgData.C
new file mode 100644
index 000000000..bbb317705
--- /dev/null
+++ b/src/usr/hwas/errlud_pgData.C
@@ -0,0 +1,81 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwas/errlud_pgData.C $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2018 */
+/* [+] 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. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+/**
+ * @file errlud_pgData.C
+ *
+ * @brief Implementation of class to log HWAS Partial Good vector.
+ *
+ */
+
+#include <hwas/common/hwasError.H>
+#include <hwas/common/hwas_reasoncodes.H>
+#include <util/utilmem.H>
+#include "errlud_pgData.H"
+
+HWAS::ErrlUdPartialGoodData::ErrlUdPartialGoodData(
+ const uint16_t (&i_modelPgData)[MODEL_PG_DATA_ENTRIES],
+ const uint16_t (&i_pgData)[VPD_CP00_PG_DATA_ENTRIES])
+{
+ // Setup the User Details instance variables.
+ iv_CompId = HWAS_COMP_ID;
+ iv_Version = HWAS_UDT_VERSION_1;
+ iv_SubSection = HWAS_UDT_PARTIAL_GOOD_DATA;
+
+ UtilMem l_memBuf;
+
+ // ******** HWAS_UDT_VERSION_1 Memory Layout ******** //
+ // 2 Bytes: Model dependent XBUS All Good Value
+ // 2 Bytes: Model dependent OBUS All Good Value
+ // Last 128 bytes
+ // Each 2 Bytes: An entry in the Partial Good Vector.
+
+ static_assert(2 == MODEL_PG_DATA_ENTRIES,
+ "Expected MODEL_PG_DATA_ENTRIES == 2 entries");
+ static_assert(64 == VPD_CP00_PG_DATA_ENTRIES,
+ "Expected VPD_CP00_PG_DATA_ENTRIES == 64 entries");
+
+ // Store the All Good values in the buffer
+ for (size_t i = 0; i < MODEL_PG_DATA_ENTRIES; ++i)
+ {
+ l_memBuf << i_modelPgData[i];
+ }
+
+ // Store the contents of the partial good vector in the buffer
+ for (size_t i = 0; i < VPD_CP00_PG_DATA_ENTRIES; ++i)
+ {
+ l_memBuf << i_pgData[i];
+ }
+
+ auto l_pError = l_memBuf.getLastError();
+ if (l_pError)
+ {
+ errlCommit(l_pError, HWAS_COMP_ID);
+ }
+ else
+ {
+ uint8_t* const l_pBuffer = reallocUsrBuf(l_memBuf.size());
+ memcpy(l_pBuffer, l_memBuf.base(), l_memBuf.size());
+ }
+}
diff --git a/src/usr/hwas/errlud_pgData.H b/src/usr/hwas/errlud_pgData.H
new file mode 100644
index 000000000..aded56795
--- /dev/null
+++ b/src/usr/hwas/errlud_pgData.H
@@ -0,0 +1,85 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwas/errlud_pgData.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2018 */
+/* [+] 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. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifndef ERRLUD_PGDATA_H
+#define ERRLUD_PGDATA_H
+
+/**
+ * @file errlud_pgData.H
+ *
+ * Defines the class that logs the HWAS Parital Good failures
+ *
+ */
+
+#include <errl/errluserdetails.H>
+#include <hwas/common/vpdConstants.H>
+
+namespace HWAS
+{
+
+ /**
+ * @class ErrlUdPartialGoodData
+ *
+ * @brief Adds the Parital Good vector to an error log.
+ */
+
+ class ErrlUdPartialGoodData : public ERRORLOG::ErrlUserDetails
+ {
+ public:
+
+ /**
+ * @brief Constructor
+ *
+ * @param[in] i_modelPgData The model-specific partial good xbus and
+ * obus data. This is used to construct an
+ * "all good" vector to compare against the
+ * i_pgData.
+ * @param[in] i_pgData The partial good data read from the VPD.
+ */
+ ErrlUdPartialGoodData(
+ const uint16_t (&i_modelPgData)[MODEL_PG_DATA_ENTRIES],
+ const uint16_t (&i_pgData)[VPD_CP00_PG_DATA_ENTRIES]);
+
+ /**
+ * @brief Destructor
+ */
+ virtual ~ErrlUdPartialGoodData()
+ {}
+
+ // Delete the Copy Constructor
+ ErrlUdPartialGoodData(const ErrlUdPartialGoodData&) = delete;
+
+ // Delete the Copy Assignment
+ ErrlUdPartialGoodData& operator=(const ErrlUdPartialGoodData&) = delete;
+
+ // Delete the Move Constructor
+ ErrlUdPartialGoodData(ErrlUdPartialGoodData&&) = delete;
+
+ // Delete the Move Assignment
+ ErrlUdPartialGoodData& operator=(ErrlUdPartialGoodData&&) = delete;
+
+ };
+}
+
+#endif
diff --git a/src/usr/hwas/hwasPlatError.C b/src/usr/hwas/hwasPlatError.C
index 2ec510e66..4c092fbe5 100644
--- a/src/usr/hwas/hwasPlatError.C
+++ b/src/usr/hwas/hwasPlatError.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2018 */
+/* Contributors Listed Below - COPYRIGHT 2012,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -31,6 +31,8 @@
#include <hwas/common/hwas.H>
#include <hwas/common/hwasCommon.H>
#include <hwas/hwasPlatError.H>
+#include "errlud_pgData.H"
+#include <errl/errludtarget.H>
namespace HWAS
{
@@ -67,5 +69,19 @@ void hwasErrorUpdatePlid(errlHndl_t & io_errl,
}
}
+void hwasErrorAddPartialGoodFFDC(errlHndl_t & io_errl,
+ const uint16_t (&i_modelPgData)[MODEL_PG_DATA_ENTRIES],
+ const uint16_t (&i_pgData)[VPD_CP00_PG_DATA_ENTRIES])
+{
+ ErrlUdPartialGoodData ffdc(i_modelPgData, i_pgData);
+ ffdc.addToLog(io_errl);
+}
+
+void hwasErrorAddTargetInfo(errlHndl_t & io_errl,
+ const TARGETING::ConstTargetHandle_t i_target)
+{
+ ERRORLOG::ErrlUserDetailsTarget ffdc(i_target);
+ ffdc.addToLog(io_errl);
+}
} // namespace HWAS
diff --git a/src/usr/hwas/makefile b/src/usr/hwas/makefile
index 625a9f677..d44e6f0ec 100644
--- a/src/usr/hwas/makefile
+++ b/src/usr/hwas/makefile
@@ -55,6 +55,7 @@ OBJS += hwasPlat.o
OBJS += hwasPlatError.o
OBJS += hwasPlatCallout.o
OBJS += hwasPlatDeconfigGard.o
+OBJS += errlud_pgData.o
SUBDIRS = test.d
diff --git a/src/usr/hwas/plugins/HWAS_COMP_ID_Parse.C b/src/usr/hwas/plugins/HWAS_COMP_ID_Parse.C
new file mode 100644
index 000000000..704413f57
--- /dev/null
+++ b/src/usr/hwas/plugins/HWAS_COMP_ID_Parse.C
@@ -0,0 +1,28 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwas/plugins/HWAS_COMP_ID_Parse.C $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2018 */
+/* [+] 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. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#include "errludparser.H"
+#include "hwasUdParserFactory.H"
+
+ERRL_MAKE_UD_PARSER(HWAS::UserDetailsParserFactory, hbfw::HWAS_COMP_ID)
diff --git a/src/usr/hwas/plugins/errludParser_pgData.H b/src/usr/hwas/plugins/errludParser_pgData.H
new file mode 100644
index 000000000..c2c66a054
--- /dev/null
+++ b/src/usr/hwas/plugins/errludParser_pgData.H
@@ -0,0 +1,189 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwas/plugins/errludParser_pgData.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2018 */
+/* [+] 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. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifndef ERRLUDPARSER_PGDATA_H
+#define ERRLUDPARSER_PGDATA_H
+
+#include "errluserdetails.H"
+#include <targeting/common/utilFilter.H>
+#include "../hwas/common/vpdConstants.H"
+#include "../hwas/common/hwas_reasoncodes.H"
+
+namespace HWAS
+{
+ class UdParserPartialGoodIssue : public ERRORLOG::ErrlUserDetailsParser
+ {
+ public:
+
+ UdParserPartialGoodIssue()
+ {
+ }
+
+ ~UdParserPartialGoodIssue()
+ {
+ }
+
+ /**
+ * @brief Parses user detail data from an error log
+ *
+ * Parses the supplied user detail data and outputs info to i_parser.
+ *
+ * @param i_version Version of the data
+ *
+ * @param i_parse ErrlUsrParser object for outputting
+ * information
+ *
+ * @param i_pBuffer Pointer to buffer containing detail data
+ *
+ * @param i_buflen Length of the buffer
+ *
+ */
+ virtual void parse(errlver_t i_version,
+ ErrlUsrParser& i_parser,
+ void * i_pBuffer,
+ const uint32_t i_buflen) const
+ {
+ if (i_version < HWAS_UDT_VERSION_1)
+ {
+ i_parser.PrintHeading("HWAS PG FFDC: Unknown Version");
+ }
+ else
+ {
+ i_parser.PrintHeading("HWAS PG FFDC");
+
+ // Get the correct all good values for the chip from the buffer.
+ const uint16_t* pData =
+ reinterpret_cast<const uint16_t*>(i_pBuffer);
+
+ uint16_t l_xbus = ERRORLOG::NTH_UINT16(pData);
+
+ ++pData;
+
+ uint16_t l_obus = ERRORLOG::NTH_UINT16(pData);
+
+ ++pData;
+
+ // Buffer with all good data. All of the following constants are
+ // defined within vpdConstants.H
+ const uint16_t pgDataAllGood[VPD_CP00_PG_DATA_ENTRIES] =
+ {static_cast<uint16_t>(VPD_CP00_PG_FSI_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_PERVASIVE_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_N0_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_N1_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_N2_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_N3_GOOD),
+ l_xbus,
+ static_cast<uint16_t>(VPD_CP00_PG_MCxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_MCxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_OBUS_GOOD),
+ l_obus,
+ l_obus,
+ static_cast<uint16_t>(VPD_CP00_PG_OBUS_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_PCIx_GOOD[0]),
+ static_cast<uint16_t>(VPD_CP00_PG_PCIx_GOOD[1]),
+ static_cast<uint16_t>(VPD_CP00_PG_PCIx_GOOD[2]),
+ static_cast<uint16_t>(VPD_CP00_PG_EPx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_EPx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_EPx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_EPx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_EPx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_EPx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_RESERVED_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_RESERVED_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_RESERVED_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_RESERVED_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_RESERVED_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_RESERVED_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_RESERVED_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_RESERVED_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_RESERVED_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_RESERVED_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_ECxx_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_RESERVED_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_RESERVED_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_RESERVED_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_RESERVED_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_RESERVED_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_RESERVED_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_RESERVED_GOOD),
+ static_cast<uint16_t>(VPD_CP00_PG_RESERVED_GOOD)};
+
+ const int OUTPUT_STRING_LENGTH = 38;
+ const int LABEL_STRING_LENGTH = 4;
+ char l_outputString[OUTPUT_STRING_LENGTH]={0},
+ l_labelString[LABEL_STRING_LENGTH]={0};
+
+ for (size_t i = 0; i < VPD_CP00_PG_DATA_ENTRIES; ++i)
+ {
+ uint16_t pgValue = ERRORLOG::NTH_UINT16(pData + i);
+
+ sprintf(l_outputString,
+ "pgData[%d] = 0x%04x; expected 0x%04x",
+ i, pgValue, pgDataAllGood[i]);
+
+ sprintf(l_labelString,
+ "%s",
+ (pgDataAllGood[i] & pgValue == pgDataAllGood[i])
+ ? "" : "Bad");
+
+ i_parser.PrintString(l_labelString, l_outputString);
+
+ }
+ }
+ }
+
+ private:
+ // Parser isn't compiled with c++11 in all environments, and
+ // therefore "delete" of unused interfaces (like below) is not
+ // supported, nor are functions with move semantics
+ // Disable compiler provided default functions
+ UdParserPartialGoodIssue(const UdParserPartialGoodIssue&);
+ UdParserPartialGoodIssue& operator=(const UdParserPartialGoodIssue&);
+ };
+}
+
+#endif
diff --git a/src/usr/hwas/plugins/hwasUdParserFactory.H b/src/usr/hwas/plugins/hwasUdParserFactory.H
new file mode 100644
index 000000000..e92feb3a0
--- /dev/null
+++ b/src/usr/hwas/plugins/hwasUdParserFactory.H
@@ -0,0 +1,53 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwas/plugins/hwasUdParserFactory.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2018 */
+/* [+] 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. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifndef HWAS_UD_PARSER_FACTORY_H
+#define HWAS_UD_PARSER_FACTORY_H
+
+#include "errludparserfactory.H"
+#include "errludParser_pgData.H"
+#include "../hwas/common/hwas_reasoncodes.H"
+
+namespace HWAS
+{
+ class UserDetailsParserFactory :
+ public ERRORLOG::ErrlUserDetailsParserFactory
+ {
+ public:
+ UserDetailsParserFactory()
+ {
+ registerParser<UdParserPartialGoodIssue>
+ (HWAS_UDT_PARTIAL_GOOD_DATA);
+ }
+ private:
+ // Parser isn't compiled with c++11 in all environments, and
+ // therefore "delete" of unused interfaces (like below) is not
+ // supported, nor are functions with move semantics
+ // Disable compiler provided default functions
+ UserDetailsParserFactory(const UserDetailsParserFactory &);
+ UserDetailsParserFactory& operator=(const UserDetailsParserFactory &);
+ };
+}
+
+#endif
OpenPOWER on IntegriCloud