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/include/usr | |
parent | 32c1363b48266e3c10a37345225d35f06c863073 (diff) | |
download | blackbird-hostboot-3443aa895cfc6ad9acaed6f26622ce540f96e30d.tar.gz blackbird-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/include/usr')
-rw-r--r-- | src/include/usr/hwpf/plat/fapiPlatTrace.H | 26 | ||||
-rw-r--r-- | src/include/usr/trace/trace.H | 8 |
2 files changed, 32 insertions, 2 deletions
diff --git a/src/include/usr/hwpf/plat/fapiPlatTrace.H b/src/include/usr/hwpf/plat/fapiPlatTrace.H index 4e80c03b9..cd578fd28 100644 --- a/src/include/usr/hwpf/plat/fapiPlatTrace.H +++ b/src/include/usr/hwpf/plat/fapiPlatTrace.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,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. */ @@ -36,6 +38,7 @@ #include <stdio.h> #include <trace/interface.H> +#include <config.h> //****************************************************************************** // Trace buffer names @@ -43,6 +46,7 @@ const char * const FAPI_TRACE_NAME = "FAPI"; const char * const FAPI_IMP_TRACE_NAME = "FAPI_I"; const char * const FAPI_SCAN_TRACE_NAME = "SCAN"; +const char * const FAPI_MFG_TRACE_NAME = "FAPI_MFG"; //****************************************************************************** // Trace descriptors that are defined in a C file @@ -50,6 +54,7 @@ const char * const FAPI_SCAN_TRACE_NAME = "SCAN"; extern trace_desc_t* g_fapiTd; extern trace_desc_t* g_fapiImpTd; extern trace_desc_t* g_fapiScanTd; +extern trace_desc_t* g_fapiMfgTd; // Information traces (go into fast trace buffer that can wrap often) #define FAPI_INF(_fmt_, _args_...) TRACFCOMP(g_fapiTd, TRACE_FILENAME _fmt_, ##_args_ ) @@ -66,4 +71,23 @@ extern trace_desc_t* g_fapiScanTd; // Scan traces #define FAPI_SCAN(_fmt_, _args_...) TRACSCOMP(g_fapiScanTd, _fmt_, ##_args_) +// FAPI Mfg traces +#if defined(CONFIG_CONSOLE) && !defined(__HOSTBOOT_RUNTIME) && \ + !defined(CONFIG_CONSOLE_OUTPUT_TRACE) +#include <console/consoleif.H> +// Traces will go to console if attr override set for this +#define FAPI_MFG(_fmt_, _args_...) \ + { \ + if(TRACE::isDebugEnabled(g_fapiMfgTd)) \ + { \ + CONSOLE::displayf(FAPI_MFG_TRACE_NAME,_fmt_, ##_args_); \ + } \ + } +#else + // Just define to standard TRACS buffer +#define FAPI_MFG(_fmt_, _args_...) \ + TRACSCOMP(g_fapiMfgTd, _fmt_, ##_args_) +#endif + + #endif // PLATTRACE_H_ diff --git a/src/include/usr/trace/trace.H b/src/include/usr/trace/trace.H index e5ecf8996..fdcce8892 100644 --- a/src/include/usr/trace/trace.H +++ b/src/include/usr/trace/trace.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2015 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -181,6 +181,12 @@ namespace TRACE */ void flushBuffers(); + /** + * @brief Return if debug trace is enabled for input trace descriptor + * + * @param [in] i_td Trace descriptor to check for debug enable + */ + bool isDebugEnabled(ComponentDesc * i_td); }; |