Skip to content

Commit

Permalink
Fix for missing HBRT error log after error injected
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cvswen authored and dcrowell77 committed Jan 15, 2020
1 parent d712b65 commit c3d6593
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/usr/errl/runtime/rt_errlmanager.C
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2013,2018 */
/* Contributors Listed Below - COPYRIGHT 2013,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -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;


//////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit c3d6593

Please sign in to comment.