summaryrefslogtreecommitdiffstats
path: root/src/usr/errl
diff options
context:
space:
mode:
authorAndres Lugo-Reyes <aalugore@us.ibm.com>2016-03-16 15:26:22 -0500
committerMatthew A. Ploetz <maploetz@us.ibm.com>2016-03-18 13:00:07 -0400
commitfb9ba37e882c15425e9db071b60aefe5fdda083e (patch)
treeb1bf8a34665d281d1d77136796ff2cabd1caa08e /src/usr/errl
parenta94b8e701e94d09baee603c9c5e5e923637b8e31 (diff)
downloadtalos-hostboot-fb9ba37e882c15425e9db071b60aefe5fdda083e.tar.gz
talos-hostboot-fb9ba37e882c15425e9db071b60aefe5fdda083e.zip
Only collect part/serial numbers for error logs if Targeting is up
Change-Id: Ic1b86c44c807c3e1ee4809103ead09dc5730482a CQ:323693 ForwardPort: yes Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/22143 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/22201 Tested-by: FSP CI Jenkins
Diffstat (limited to 'src/usr/errl')
-rw-r--r--src/usr/errl/errlentry.C61
1 files changed, 36 insertions, 25 deletions
diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C
index bd590b0d0..3e827603f 100644
--- a/src/usr/errl/errlentry.C
+++ b/src/usr/errl/errlentry.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2015 */
+/* Contributors Listed Below - COPYRIGHT 2011,2016 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -841,38 +841,49 @@ void ErrlEntry::commit( compId_t i_committerComponent )
// check to see if we should skip info and recoverable errors?
checkHiddenLogsEnable();
- // If this error was a hardware callout, add the serial and part numbers
- // to the log. FSP provides this data so if there is no FSP, get them here.
- if(!INITSERVICE::spBaseServicesEnabled())
+ // Check to make sure targeting is initialized. If so, collect part and
+ // serial numbers
+ if( TARGETING::targetService().isInitialized() )
{
- for(size_t i = 0; i < iv_SectionVector.size(); i++)
+ // If this error was a hardware callout, add the serial and part numbers
+ // to the log. FSP provides this data so if there is no FSP, get them here.
+ if(!INITSERVICE::spBaseServicesEnabled())
{
- ErrlUD * l_udSection = iv_SectionVector[i];
- HWAS::callout_ud_t * l_ud =
- reinterpret_cast<HWAS::callout_ud_t*>(l_udSection->iv_pData);
-
- if((ERRL_COMP_ID == (l_udSection)->iv_header.iv_compId) &&
- (1 == (l_udSection)->iv_header.iv_ver) &&
- (ERRL_UDT_CALLOUT == (l_udSection)->iv_header.iv_sst) &&
- (HWAS::HW_CALLOUT == l_ud->type))
+ for(size_t i = 0; i < iv_SectionVector.size(); i++)
{
- uint8_t * l_uData = (uint8_t *)(l_ud + 1);
- TARGETING::Target * l_target = NULL;
-
- bool l_err = HWAS::retrieveTarget(l_uData,
- l_target,
- this);
- if(!l_err)
- {
- addPartAndSerialNumbersToErrLog( l_target );
- }
- else
+ ErrlUD * l_udSection = iv_SectionVector[i];
+ HWAS::callout_ud_t * l_ud =
+ reinterpret_cast<HWAS::callout_ud_t*>(l_udSection->iv_pData);
+
+ if((ERRL_COMP_ID == (l_udSection)->iv_header.iv_compId) &&
+ (1 == (l_udSection)->iv_header.iv_ver) &&
+ (ERRL_UDT_CALLOUT == (l_udSection)->iv_header.iv_sst) &&
+ (HWAS::HW_CALLOUT == l_ud->type))
{
- TRACFCOMP(g_trac_errl, "ErrlEntry::commit() - Error retrieving target");
+ uint8_t * l_uData = (uint8_t *)(l_ud + 1);
+ TARGETING::Target * l_target = NULL;
+
+ bool l_err = HWAS::retrieveTarget(l_uData,
+ l_target,
+ this);
+ if(!l_err)
+ {
+ addPartAndSerialNumbersToErrLog( l_target );
+ }
+ else
+ {
+ TRACFCOMP(g_trac_errl, "ErrlEntry::commit() - Error retrieving target");
+ }
}
}
}
}
+ else
+ {
+ TRACFCOMP(g_trac_errl,
+ "TARGETING has not been initialized yet! Skipping serial/part "
+ "number collection!");
+ }
}
///////////////////////////////////////////////////////////////////////////////
OpenPOWER on IntegriCloud