aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/console.h
diff options
context:
space:
mode:
authormafetter@fleming.research <mafetter@fleming.research>2005-02-12 16:34:28 +0000
committermafetter@fleming.research <mafetter@fleming.research>2005-02-12 16:34:28 +0000
commitaeda7569c772288fcdaaa275cf0853ed7ccbff41 (patch)
treec31359c68ca9bd09e4caf8c16ab8945529e61c36 /xen/include/xen/console.h
parentd9cdfe6120ca3438701e4a3c81a84dadd008c1ee (diff)
downloadxen-aeda7569c772288fcdaaa275cf0853ed7ccbff41.tar.gz
xen-aeda7569c772288fcdaaa275cf0853ed7ccbff41.tar.bz2
xen-aeda7569c772288fcdaaa275cf0853ed7ccbff41.zip
bitkeeper revision 1.1159.261.2 (420e3014BpIA6NnJTdNQGkfIDMtzmQ)
Added an in-memory ring buffer to which serial console output can be temporarily redirected. Mode is toggled by the "c" key on the Xen console. Nice hack for printk() intensive debugging modes. When switching back to serial output, the current contents of the buffer are first dumped. Buffer defaults to 128Kb, but size can be set on the Xen boot command line.
Diffstat (limited to 'xen/include/xen/console.h')
-rw-r--r--xen/include/xen/console.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/xen/include/xen/console.h b/xen/include/xen/console.h
index abcb2fa1d8..7cc653595b 100644
--- a/xen/include/xen/console.h
+++ b/xen/include/xen/console.h
@@ -26,4 +26,22 @@ void console_putc(char c);
int console_getc(void);
int irq_console_getc(void);
+#ifdef NDEBUG
+#define sercon_buffer_bypass() (0)
+#else
+#define sercon_buffer_bypass() _sercon_buffer_bypass()
+int _sercon_buffer_bypass(void);
#endif
+
+#ifdef NDEBUG
+#define sercon_buffer_set(_enable) ((void)(0 && (_enable)));
+#else
+#define sercon_buffer_set(_enable) _sercon_buffer_set(_enable)
+void _sercon_buffer_set(int enable);
+#endif
+
+#ifndef NDEBUG
+void sercon_buffer_toggle(unsigned char key);
+#endif
+
+#endif /* __CONSOLE_H__ */