summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2019-06-13 14:39:55 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-06-25 16:47:49 -0500
commit79a312ed32a9c19a3420a6d603e76b7a849aec42 (patch)
tree04e052069b1cb906e4779f4f29e1869fd707aa53 /src/include
parentbd0eb8fcc8d4fe9bf7330484094d556a848a2210 (diff)
downloadtalos-hostboot-79a312ed32a9c19a3420a6d603e76b7a849aec42.tar.gz
talos-hostboot-79a312ed32a9c19a3420a6d603e76b7a849aec42.zip
Clean up the attribute error user details
Moved the structural parts of the errludattribute code into source files, instead of being generated. Now we only pull in the generated code where it is actually useful. This makes updates simpler and faster to compile. Added a couple more attributes to the supported list of displayable values. Improved an error path to get more useful information from unsupported attributes. Change-Id: Ie339e4a1b0a6c8a1d33def92a76e36ba81bab011 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79062 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: Matt Derksen <mderkse1@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/errl/errludattribute.H97
1 files changed, 97 insertions, 0 deletions
diff --git a/src/include/usr/errl/errludattribute.H b/src/include/usr/errl/errludattribute.H
new file mode 100644
index 000000000..369f4a562
--- /dev/null
+++ b/src/include/usr/errl/errludattribute.H
@@ -0,0 +1,97 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/errl/errludattribute.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2019 */
+/* [+] 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 ERRL_UDATTRIBUTE_H
+#define ERRL_UDATTRIBUTE_H
+
+/**
+ * Defines the classes that allow you to save attribute data to
+ * an error log.
+ */
+
+#if !defined(PARSER) && !defined(LOGPARSER)
+
+#include <errl/errluserdetails.H>
+
+namespace TARGETING // Forward reference
+{ class Target; }
+
+namespace ERRORLOG
+{
+class ErrlUserDetailsAttribute : public ErrlUserDetails {
+ public:
+
+ /**
+ * @brief Constructor to add a single attribute
+ *
+ * @param i_target Target from whom the attribute is being read
+ * @param i_attr Attribute id/hash
+ */
+ ErrlUserDetailsAttribute(const TARGETING::Target * i_pTarget,
+ uint32_t i_attr);
+
+ /**
+ * @brief Constructor to add no attributes (need to call addData)
+ *
+ * @param i_target Target from whom the attribute is being read
+ */
+ ErrlUserDetailsAttribute(const TARGETING::Target * i_pTarget);
+
+ /**
+ * @brief Add an additional attribute to the log
+ *
+ * @param i_attr Attribute id/hash
+ */
+ void addData(uint32_t i_attr);
+
+
+ /**
+ * @brief Destructor
+ */
+ virtual ~ErrlUserDetailsAttribute();
+
+ private:
+
+ // Disabled
+ ErrlUserDetailsAttribute(const ErrlUserDetailsAttribute &);
+ ErrlUserDetailsAttribute & operator=(const ErrlUserDetailsAttribute &);
+
+ // internal function
+ void dumpAll();
+
+ const TARGETING::Target * iv_pTarget;
+ uint32_t iv_dataSize;
+};
+}
+#else // if LOGPARSER defined
+
+#include "errluserdetails.H"
+
+// Pull in the auto-generated portion for the parser
+#include <errl/errludattribute_gen.H>
+
+#endif
+
+#endif //ERRL_UDATTRIBUTE_H
OpenPOWER on IntegriCloud