diff options
author | Corey Swenson <cswenson@us.ibm.com> | 2019-12-16 00:16:47 -0600 |
---|---|---|
committer | Daniel M Crowell <dcrowell@us.ibm.com> | 2020-01-15 08:42:51 -0600 |
commit | c3d65931f9e90d985a2c2ae4060ab3ad8e82b48d (patch) | |
tree | 0d5c3f00c542e87c4d1ded391194c29aa6b42a20 | |
parent | d712b65d72a6432f42ac72406f51e2a5ba47c35f (diff) | |
download | talos-hostboot-c3d65931f9e90d985a2c2ae4060ab3ad8e82b48d.tar.gz talos-hostboot-c3d65931f9e90d985a2c2ae4060ab3ad8e82b48d.zip |
Fix for missing HBRT error log after error injected
An HBRT error log larger than 4K sent to the host will be truncated
to 4K before it reaches HWSV, where a size mismatch prevents processing
of the log. To avoid this, truncate the HBRT log to 4K before sending
across interface to host.
Change-Id: Ic2c354da99c0a4ccec00ce58cf6ef34bc02e7996
CQ:SW480758
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/88724
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: Roland Veloz <rveloz@us.ibm.com>
Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
-rw-r--r-- | src/usr/errl/runtime/rt_errlmanager.C | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/usr/errl/runtime/rt_errlmanager.C b/src/usr/errl/runtime/rt_errlmanager.C index 9fb624608..e545641bb 100644 --- a/src/usr/errl/runtime/rt_errlmanager.C +++ b/src/usr/errl/runtime/rt_errlmanager.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2018 */ +/* Contributors Listed Below - COPYRIGHT 2013,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -47,6 +47,8 @@ uint8_t ErrlManager::iv_hiddenErrLogsEnable = extern trace_desc_t* g_trac_errl; +// Maximum size of error log that can be sent to the host +const uint32_t MAX_FSP_ERROR_LOG_LENGTH = 4096; ////////////////////////////////////////////////////////////////////////////// @@ -188,10 +190,14 @@ void ErrlManager::sendMboxMsg ( errlHndl_t& io_err ) if(g_hostInterfaces) { uint32_t l_msgSize = io_err->flattenedSize(); + if (l_msgSize > MAX_FSP_ERROR_LOG_LENGTH) + { + l_msgSize = MAX_FSP_ERROR_LOG_LENGTH; + } if (g_hostInterfaces->sendErrorLog) { uint8_t * temp_buff = new uint8_t [l_msgSize ]; - io_err->flatten ( temp_buff, l_msgSize ); + io_err->flatten ( temp_buff, l_msgSize, true /* truncate */ ); size_t rc = g_hostInterfaces->sendErrorLog(io_err->plid(), l_msgSize, |