diff options
author | Andrew Geissler <andrewg@us.ibm.com> | 2014-12-09 09:45:14 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-01-22 17:28:34 -0600 |
commit | 3443aa895cfc6ad9acaed6f26622ce540f96e30d (patch) | |
tree | 3566d1b79d548b3ef52a71c2d7c921ba79010010 /src/usr/trace | |
parent | 32c1363b48266e3c10a37345225d35f06c863073 (diff) | |
download | talos-hostboot-3443aa895cfc6ad9acaed6f26622ce540f96e30d.tar.gz talos-hostboot-3443aa895cfc6ad9acaed6f26622ce540f96e30d.zip |
Data streaming from a hw procedure - simple solution to console
Change-Id: Icbf4b70acbe3909211294be9f0faed338763fc55
RTC: 34190
CMVC-Prereq: 949573
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/14799
Tested-by: Jenkins Server
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/trace')
-rw-r--r-- | src/usr/trace/compdesc.C | 38 | ||||
-rw-r--r-- | src/usr/trace/compdesc.H | 7 | ||||
-rw-r--r-- | src/usr/trace/interface.C | 9 | ||||
-rw-r--r-- | src/usr/trace/runtime/rt_service.C | 4 | ||||
-rw-r--r-- | src/usr/trace/service.C | 2 | ||||
-rw-r--r-- | src/usr/trace/service.H | 4 |
6 files changed, 48 insertions, 16 deletions
diff --git a/src/usr/trace/compdesc.C b/src/usr/trace/compdesc.C index 9e1d77bea..72c7a2476 100644 --- a/src/usr/trace/compdesc.C +++ b/src/usr/trace/compdesc.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -94,19 +96,35 @@ namespace TRACE } #ifndef __HOSTBOOT_RUNTIME // TODO: RTC 79408 - // Check for special SCAN component to force enable debug trace on. - if (l_rc && !l_rc->iv_debugEnabled && - (0 == memcmp(l_compName, "SCAN", 5))) + // Check for special SCAN and FAPI_MFG component to + // force enable debug trace on. + if (l_rc && !l_rc->iv_debugEnabled) { - TARGETING::Target* sys = NULL; - TARGETING::targetService().getTopLevelTarget(sys); + if(0 == memcmp(l_compName, "SCAN", 5)) + { + TARGETING::Target* sys = NULL; + TARGETING::targetService().getTopLevelTarget(sys); - TARGETING::HbSettings hbSettings = - sys->getAttr<TARGETING::ATTR_HB_SETTINGS>(); + TARGETING::HbSettings hbSettings = + sys->getAttr<TARGETING::ATTR_HB_SETTINGS>(); - if (hbSettings.traceScanDebug) + if (hbSettings.traceScanDebug) + { + l_rc->iv_debugEnabled = true; + } + } + else if(0 == memcmp(l_compName, "FAPI_MFG",9)) { - l_rc->iv_debugEnabled = true; + TARGETING::Target* sys = NULL; + TARGETING::targetService().getTopLevelTarget(sys); + + TARGETING::ATTR_MFG_TRACE_ENABLE_type l_mfgTraceEnable = + sys->getAttr<TARGETING::ATTR_MFG_TRACE_ENABLE>(); + + if (l_mfgTraceEnable) + { + l_rc->iv_debugEnabled = true; + } } } #endif diff --git a/src/usr/trace/compdesc.H b/src/usr/trace/compdesc.H index 2c5335c87..9b57b32bb 100644 --- a/src/usr/trace/compdesc.H +++ b/src/usr/trace/compdesc.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -80,6 +82,9 @@ namespace TRACE Entry* iv_first; //< First (newest) trace entry. Entry* iv_last; //< Last (oldest) trace entry. + + friend bool TRACE::isDebugEnabled(ComponentDesc * i_td); + }; /** @class ComponentList diff --git a/src/usr/trace/interface.C b/src/usr/trace/interface.C index b450416f7..134940185 100644 --- a/src/usr/trace/interface.C +++ b/src/usr/trace/interface.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -115,6 +117,9 @@ namespace TRACE Singleton<Service>::instance().flushBuffers(); } - + bool isDebugEnabled(ComponentDesc * i_td) + { + return i_td->iv_debugEnabled; + } }; diff --git a/src/usr/trace/runtime/rt_service.C b/src/usr/trace/runtime/rt_service.C index 2c07aab17..ecbb26f2a 100644 --- a/src/usr/trace/runtime/rt_service.C +++ b/src/usr/trace/runtime/rt_service.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,2015 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ diff --git a/src/usr/trace/service.C b/src/usr/trace/service.C index db5ea8590..0c125806c 100644 --- a/src/usr/trace/service.C +++ b/src/usr/trace/service.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ diff --git a/src/usr/trace/service.H b/src/usr/trace/service.H index 01c42af5d..e32dc1792 100644 --- a/src/usr/trace/service.H +++ b/src/usr/trace/service.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ |