summaryrefslogtreecommitdiffstats
path: root/src/include/usr
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2017-11-27 10:24:27 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-04-13 12:33:21 -0400
commit21080c6885b10977d4a1fe51e2dba79cb67d26c8 (patch)
tree8d72c6c5b363788968bb47c8b67a9e8577b6dd83 /src/include/usr
parentafb0e6a438eeda79822dd1dde73b98e6a87fde5b (diff)
downloadtalos-hostboot-21080c6885b10977d4a1fe51e2dba79cb67d26c8.tar.gz
talos-hostboot-21080c6885b10977d4a1fe51e2dba79cb67d26c8.zip
Log Hostboot state information in all error logs
Add the Istep number and substep number to Hostboot Error Logs to assist in problem debug. These items will be added as a user data record to all Hostboot Error Logs prior to Runtime. Change-Id: Ib5d269f3c1853d6d6856669744630dc130fa7094 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54764 Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Reviewed-by: Matt Derksen <mderkse1@us.ibm.com> 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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r--src/include/usr/errl/errlreasoncodes.H3
-rw-r--r--src/include/usr/errl/errludstate.H69
-rw-r--r--src/include/usr/initservice/initserviceif.H22
3 files changed, 92 insertions, 2 deletions
diff --git a/src/include/usr/errl/errlreasoncodes.H b/src/include/usr/errl/errlreasoncodes.H
index 7d36eb745..dfe0eb8fc 100644
--- a/src/include/usr/errl/errlreasoncodes.H
+++ b/src/include/usr/errl/errlreasoncodes.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2017 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -76,6 +76,7 @@ namespace ERRORLOG
ERRL_UDT_SENSOR = 0x08,
ERRL_UDT_STRING_SET = 0x09,
ERRL_UDT_BUILD = 0x0A,
+ ERRL_UDT_SYSSTATE = 0x0B,
};
// Identifiers for ERRL user data subsection versions
diff --git a/src/include/usr/errl/errludstate.H b/src/include/usr/errl/errludstate.H
new file mode 100644
index 000000000..14405ec15
--- /dev/null
+++ b/src/include/usr/errl/errludstate.H
@@ -0,0 +1,69 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/errl/errludstate.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2017,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 ERRL_UDSYSSTATE_H
+#define ERRL_UDSYSSTATE_H
+
+/**
+ * @file errludsysstate.H
+ *
+ * Defines the ErrlUserDetailsState class that adds system state
+ * information to an error log as user detail data
+ */
+
+#include <errl/errluserdetails.H>
+#include <stdint.h>
+
+
+//Forward reference
+namespace ERRORLOG
+{
+
+/**
+ * @class ErrlUserDetailsSysState
+ *
+ * Adds system state information to an error log
+ */
+class ErrlUserDetailsSysState : public ErrlUserDetails
+{
+public:
+ /**
+ * @brief Constructor
+ */
+ ErrlUserDetailsSysState();
+
+ /**
+ * @brief Destructor
+ */
+ virtual ~ErrlUserDetailsSysState();
+
+private:
+ // Disabled
+ ErrlUserDetailsSysState(const ErrlUserDetailsSysState &);
+ ErrlUserDetailsSysState & operator=(const ErrlUserDetailsSysState &);
+};
+
+}
+
+#endif
diff --git a/src/include/usr/initservice/initserviceif.H b/src/include/usr/initservice/initserviceif.H
index 8251bdb94..d2d61c4bd 100644
--- a/src/include/usr/initservice/initserviceif.H
+++ b/src/include/usr/initservice/initserviceif.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2017 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -175,6 +175,26 @@ inline bool spBaseServicesEnabled()
return spBaseServicesEnabled;
}
+
+
+/**
+ * @brief Save Istep Step and Substep for use by error logging
+ * @param[in] i_step, Istep Step
+ * @param[in] i_subStep, Istep subStep
+ * @return none
+ */
+void ShadowIstepData( uint8_t i_step,
+ uint8_t i_subStep );
+
+/**
+ * @brief Extract Istep Step and Substep
+ * @param[out] o_step, Istep Step
+ * @param[out] o_subStep, Istep subStep
+ * @return none
+ */
+void GetIstepData( uint8_t & o_step,
+ uint8_t & o_subStep );
+
}
OpenPOWER on IntegriCloud