summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2011-08-22 17:33:44 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2011-08-24 12:53:03 -0500
commit5d30abd488109fafecdfb3119449aefa5dd685b2 (patch)
tree8ef9d0d49b15507b8d1f3d82a52ce27d8af242d7 /src/include
parent0977c6da14b8fc1623043daa429041863498aeae (diff)
downloadblackbird-hostboot-5d30abd488109fafecdfb3119449aefa5dd685b2.tar.gz
blackbird-hostboot-5d30abd488109fafecdfb3119449aefa5dd685b2.zip
Add environment var to remove debug messages.
- Add printkd function. - Create HOSTBOOT_DEBUG env var for printk. - Update trace interfaces to utilize HOSTBOOT_DEBUG. - Fix compile errors due to unused variables. Change-Id: Ib18c3ecd51ca333e0118949bf35476e9c5aa46a7 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/273 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/algorithm22
-rw-r--r--src/include/kernel/console.H10
-rw-r--r--src/include/usr/trace/interface.H12
3 files changed, 41 insertions, 3 deletions
diff --git a/src/include/algorithm b/src/include/algorithm
index 17c9380a3..32dd9e6a6 100644
--- a/src/include/algorithm
+++ b/src/include/algorithm
@@ -1,3 +1,25 @@
+// IBM_PROLOG_BEGIN_TAG
+// This is an automatically generated prolog.
+//
+// $Source: src/include/algorithm $
+//
+// IBM CONFIDENTIAL
+//
+// COPYRIGHT International Business Machines Corp. 2011
+//
+// p1
+//
+// Object Code Only (OCO) source materials
+// Licensed Internal Code Source Materials
+// IBM HostBoot Licensed Internal Code
+//
+// The source code for this program is not published or other-
+// wise divested of its trade secrets, irrespective of what has
+// been deposited with the U.S. Copyright Office.
+//
+// Origin: 30
+//
+// IBM_PROLOG_END
#ifndef ALGORITHM
#define ALGORITHM
diff --git a/src/include/kernel/console.H b/src/include/kernel/console.H
index 2d2cb08fc..51a729960 100644
--- a/src/include/kernel/console.H
+++ b/src/include/kernel/console.H
@@ -27,13 +27,19 @@
#include <string.h>
#include <builtins.h>
+#ifdef HOSTBOOT_DEBUG
+ #define printkd(format...) printk(## format)
+#else
+ #define printkd(format...)
+#endif
+
void printk(const char*, ...) FORMAT_PRINTF;
class Console
{
public:
int putc(int);
-
+
enum { BUFFER_SIZE = 1024 * 16 };
protected:
@@ -41,7 +47,7 @@ class Console
~Console() {};
private:
- size_t iv_pos;
+ size_t iv_pos;
char * iv_buffer;
};
diff --git a/src/include/usr/trace/interface.H b/src/include/usr/trace/interface.H
index 746a5aec1..2b684ccd6 100644
--- a/src/include/usr/trace/interface.H
+++ b/src/include/usr/trace/interface.H
@@ -90,7 +90,16 @@ const uint32_t TRACE_FIELD = 0; //Indicates trace is field
#define TRACDCOMP(des,printf_string,args...) do {} while(0)
#define TRACDBIN(des,descString,address,length) do {} while(0)
-#else /* direct them to real function calls */
+#else
+#ifndef HOSTBOOT_DEBUG
+
+#define TRACDCOMP(des,printf_string,args...) do {} while(0)
+#define TRACDBIN(des,descString,address,length) do {} while(0)
+
+#else
+
+/* direct them to real function calls */
+
/**
* @fn void TRACDCOMP0(des, printf_string)
@@ -134,6 +143,7 @@ const uint32_t TRACE_FIELD = 0; //Indicates trace is field
address, \
len, \
TRACE_DEBUG)
+#endif /* HOSTBOOT_DEBUG */
#endif /* TRAC_DEBUG_OUT */
/**
OpenPOWER on IntegriCloud