diff options
author | Ilya Smirnov <ismirno@us.ibm.com> | 2018-06-25 16:06:36 -0500 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2018-06-30 01:48:58 -0400 |
commit | d875133a8d13b69960eee85b69de8b238c4edf5d (patch) | |
tree | 2c0d1e794d771ea00c45a40e5283929cb9700bfb /src/usr/initservice/baseinitsvc/initservice.C | |
parent | cb3442b8f94fd08ce764ad0a1ee97b3cbf90ed65 (diff) | |
download | talos-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/baseinitsvc/initservice.C')
-rw-r--r-- | src/usr/initservice/baseinitsvc/initservice.C | 15 |
1 files changed, 15 insertions, 0 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, |