summaryrefslogtreecommitdiffstats
path: root/src/include/kernel
diff options
context:
space:
mode:
authorIlya Smirnov <ismirno@us.ibm.com>2018-06-25 16:06:36 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2018-06-30 01:48:58 -0400
commitd875133a8d13b69960eee85b69de8b238c4edf5d (patch)
tree2c0d1e794d771ea00c45a40e5283929cb9700bfb /src/include/kernel
parentcb3442b8f94fd08ce764ad0a1ee97b3cbf90ed65 (diff)
downloadtalos-hostboot-d875133a8d13b69960eee85b69de8b238c4edf5d.tar.gz
talos-hostboot-d875133a8d13b69960eee85b69de8b238c4edf5d.zip
Pre-set HB TI Area in doStutdown Path
When a TI occurs during ECC corruption, the kernel asserts as part of the error flow, and the assert makes it into the TI area before the ECC error code, which makes it hard to debug the underlying issue. This change introduces the logging of the TI code to the HB TI area as part of the doShutdown path and a mechanism to not overwrite the first logged error code. That way the TI area will always contain the first error code that caused the TI. Change-Id: Idcd5727314aea9b92a6eb9d19ec6ed223111861a CQ:SW431570 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/61661 Reviewed-by: Michael Baiocchi <mbaiocch@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: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/include/kernel')
-rw-r--r--src/include/kernel/hbterminatetypes.H1
-rw-r--r--src/include/kernel/terminate.H12
2 files changed, 11 insertions, 2 deletions
diff --git a/src/include/kernel/hbterminatetypes.H b/src/include/kernel/hbterminatetypes.H
index e95a77010..593919ca3 100644
--- a/src/include/kernel/hbterminatetypes.H
+++ b/src/include/kernel/hbterminatetypes.H
@@ -107,6 +107,7 @@ enum hb_terminate_type
// Enum used in the flag indicating who initiated the TI
enum hb_terminate_source
{
+ NO_TI_ERROR = 0x0000,
TI_KERNEL_ASSERT = 0x0001,
TI_CRIT_ASSERT = 0x0002,
TI_SHUTDOWN = 0x0003,
diff --git a/src/include/kernel/terminate.H b/src/include/kernel/terminate.H
index 551f66057..b80331495 100644
--- a/src/include/kernel/terminate.H
+++ b/src/include/kernel/terminate.H
@@ -30,12 +30,17 @@
#include <kernel/types.h>
-
/** @fn terminateExecuteTI
* @brief Sequence to execute a TI attn
*/
void terminateExecuteTI();
+/** @fn initKernelMutex
+ * @brief initialize the internal kernel mutex used to lock
+ * the HB TI area.
+ */
+void initKernelTIMutex();
+
/** @fn termWritePlid
* Update TI data area with a PLID.
* @param[in] i_source: indicates what type of fail forced the TI
@@ -50,12 +55,15 @@ void termWritePlid(uint16_t i_source, uint32_t plid);
* @param[in] i_reasoncode: reasoncode for the failure(assert or shutdown)
* @param[in] i_failAddr: i_linkRegister() value (address of failure)
* @param[in] i_error_info: addt'l error info to add to TI data
+ * @param[in] i_forceWrite: force the HB TI area to be overwritten with
+ * the passed parameters.
* @param[out] NONE:
*/
void termWriteSRC(uint16_t i_source,
uint16_t i_reasoncode,
uint64_t i_failAddr = 0,
- uint32_t i_error_info = 0);
+ uint32_t i_error_info = 0,
+ bool i_forceWrite = false);
/** @fn termModifySRC
* Modify an SRC and the TI data area for Bootloader
OpenPOWER on IntegriCloud