summaryrefslogtreecommitdiffstats
path: root/src/usr/initservice
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/usr/initservice
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/usr/initservice')
-rw-r--r--src/usr/initservice/baseinitsvc/initservice.C15
-rw-r--r--src/usr/initservice/baseinitsvc/makefile6
2 files changed, 20 insertions, 1 deletions
diff --git a/src/usr/initservice/baseinitsvc/initservice.C b/src/usr/initservice/baseinitsvc/initservice.C
index 2f88aa723..f62e49264 100644
--- a/src/usr/initservice/baseinitsvc/initservice.C
+++ b/src/usr/initservice/baseinitsvc/initservice.C
@@ -33,6 +33,9 @@
#define __HIDDEN_SYSCALL_SHUTDOWN
#include <kernel/console.H> // printk status
+#include <kernel/terminate.H> // termWriteSRC
+#include <kernel/hbterminatetypes.H> // TI_SHUTDOWN
+#include <builtins.h> // linkRegister
#include <sys/vfs.h>
#include <vfs/vfs.H>
@@ -667,6 +670,11 @@ void doShutdown(uint64_t i_status,
uint64_t i_masterHBInstance,
uint32_t i_error_info)
{
+ termWriteSRC(TI_SHUTDOWN,
+ i_status,
+ reinterpret_cast<uint64_t>(linkRegister()),
+ i_error_info);
+
class ShutdownExecute
{
public:
@@ -886,6 +894,13 @@ void InitService::doShutdown(uint64_t i_status,
TRACFCOMP(g_trac_initsvc, "doShutdown> Final status=%.16X",worst_status);
MAGIC_INST_PRINT_ISTEP(21,4);
+ // Update the HB TI area with the worst status.
+ termWriteSRC(TI_SHUTDOWN,
+ worst_status,
+ reinterpret_cast<uint64_t>(linkRegister()),
+ i_error_info,
+ true); // Force write
+
shutdown(worst_status,
i_payload_base,
i_payload_entry,
diff --git a/src/usr/initservice/baseinitsvc/makefile b/src/usr/initservice/baseinitsvc/makefile
index a7c608747..3b05ca4c0 100644
--- a/src/usr/initservice/baseinitsvc/makefile
+++ b/src/usr/initservice/baseinitsvc/makefile
@@ -5,7 +5,9 @@
#
# OpenPOWER HostBoot Project
#
-# COPYRIGHT International Business Machines Corp. 2011,2014
+# Contributors Listed Below - COPYRIGHT 2011,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.
@@ -25,4 +27,6 @@ MODULE = initservice
OBJS += initservice.o
+EXTRAINCDIR += ${ROOTPATH}/src/include
+
include ${ROOTPATH}/config.mk
OpenPOWER on IntegriCloud