diff options
Diffstat (limited to 'src/usr/errl/runtime')
-rw-r--r-- | src/usr/errl/runtime/rt_errlmanager.C | 10 | ||||
-rw-r--r-- | src/usr/errl/runtime/test/test_runtimeDeconfig.H | 14 |
2 files changed, 15 insertions, 9 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, diff --git a/src/usr/errl/runtime/test/test_runtimeDeconfig.H b/src/usr/errl/runtime/test/test_runtimeDeconfig.H index 2f5d37259..0cf1a0a52 100644 --- a/src/usr/errl/runtime/test/test_runtimeDeconfig.H +++ b/src/usr/errl/runtime/test/test_runtimeDeconfig.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2018 */ +/* Contributors Listed Below - COPYRIGHT 2018,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -51,8 +51,8 @@ class deconfigureTargetAtRuntimeTest : public CxxTest::TestSuite // pass in a null target pointer TARGETING::Target * l_target = nullptr; - errlHndl_t l_errl = - HWAS::theDeconfigGard().deconfigureTargetAtRuntime( + errlHndl_t l_errl = nullptr; + l_errl = HWAS::theDeconfigGard().deconfigureTargetAtRuntime( l_target, HWAS::DeconfigGard::FULLY_AT_RUNTIME, l_errl); @@ -118,8 +118,8 @@ class deconfigureTargetAtRuntimeTest : public CxxTest::TestSuite l_target = l_cores.at(0); - errlHndl_t l_errl = - HWAS::theDeconfigGard().deconfigureTargetAtRuntime( + errlHndl_t l_errl = nullptr; + l_errl = HWAS::theDeconfigGard().deconfigureTargetAtRuntime( l_target, HWAS::DeconfigGard::SPEC_DECONFIG, l_errl); @@ -179,8 +179,8 @@ class deconfigureTargetAtRuntimeTest : public CxxTest::TestSuite TARGETING::Target * l_target = l_proc.at(0); - errlHndl_t l_errl = - HWAS::theDeconfigGard().deconfigureTargetAtRuntime( + errlHndl_t l_errl = nullptr; + l_errl = HWAS::theDeconfigGard().deconfigureTargetAtRuntime( l_target, HWAS::DeconfigGard::FULLY_AT_RUNTIME, l_errl); |