ia64/xen-unstable

changeset 5322:dd83337405e2

bitkeeper revision 1.1671 (42a1e8cdI_f9OiPqscVnjrOWWEVTmw)

Add a manual 'sync_console' boot parameter that forces synchronous
console output. May be useful for systems that crash unexpectedly
and lose the last chunk of console output.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sat Jun 04 17:45:49 2005 +0000 (2005-06-04)
parents da199897c714
children 58a236cc6900
files docs/src/user.tex xen/drivers/char/console.c
line diff
     1.1 --- a/docs/src/user.tex	Sat Jun 04 17:35:19 2005 +0000
     1.2 +++ b/docs/src/user.tex	Sat Jun 04 17:45:49 2005 +0000
     1.3 @@ -1729,6 +1729,13 @@ editing \path{grub.conf}.
     1.4   transmitted/received character.
     1.5   [NB. Default for this option is `com1,vga'] 
     1.6  
     1.7 +\item [sync\_console ]
     1.8 + Force synchronous console output. This is useful if you system fails
     1.9 + unexpectedly before it has sent all available output to the
    1.10 + console. In most cases Xen will automatically enter synchronous mode
    1.11 + when an exceptional event occurs, but this option provides a manual
    1.12 + fallback.
    1.13 +
    1.14  \item [conswitch=$<$switch-char$><$auto-switch-char$>$ ] 
    1.15   Specify how to switch serial-console input between
    1.16   Xen and DOM0. The required sequence is CTRL-$<$switch-char$>$
     2.1 --- a/xen/drivers/char/console.c	Sat Jun 04 17:35:19 2005 +0000
     2.2 +++ b/xen/drivers/char/console.c	Sat Jun 04 17:45:49 2005 +0000
     2.3 @@ -24,17 +24,21 @@
     2.4  #include <asm/debugger.h>
     2.5  #include <asm/io.h>
     2.6  
     2.7 -/* opt_console: comma-separated list of console outputs. */
     2.8 +/* console: comma-separated list of console outputs. */
     2.9  static char opt_console[30] = OPT_CONSOLE_STR;
    2.10  string_param("console", opt_console);
    2.11  
    2.12 -/* opt_conswitch: a character pair controlling console switching. */
    2.13 +/* conswitch: a character pair controlling console switching. */
    2.14  /* Char 1: CTRL+<char1> is used to switch console input between Xen and DOM0 */
    2.15  /* Char 2: If this character is 'x', then do not auto-switch to DOM0 when it */
    2.16  /*         boots. Any other value, or omitting the char, enables auto-switch */
    2.17  static unsigned char opt_conswitch[5] = "a";
    2.18  string_param("conswitch", opt_conswitch);
    2.19  
    2.20 +/* sync_console: force synchronous console output (useful for debugging). */
    2.21 +static int opt_sync_console;
    2.22 +boolean_param("sync_console", opt_sync_console);
    2.23 +
    2.24  static int xpos, ypos;
    2.25  static unsigned char *video;
    2.26  
    2.27 @@ -437,6 +441,12 @@ void init_console(void)
    2.28             XEN_COMPILER, XEN_COMPILE_DATE);
    2.29      printk(" Latest ChangeSet: %s\n\n", XEN_CHANGESET);
    2.30      set_printk_prefix("(XEN) ");
    2.31 +
    2.32 +    if ( opt_sync_console )
    2.33 +    {
    2.34 +        serial_start_sync(sercon_handle);
    2.35 +        printk("Console output is synchronous.\n");
    2.36 +    }
    2.37  }
    2.38  
    2.39  void console_endboot(int disable_vga)