ia64/xen-unstable

changeset 615:3a237a10a0c6

bitkeeper revision 1.344 (3f12be53t1VivuAfELH_J3XUhJ2Frg)

more console stuff
author iap10@labyrinth.cl.cam.ac.uk
date Mon Jul 14 14:29:39 2003 +0000 (2003-07-14)
parents 729e25262c44
children 18c36f61f4cd
files xenolinux-2.4.21-sparse/arch/xeno/defconfig xenolinux-2.4.21-sparse/arch/xeno/drivers/console/console.c xenolinux-2.4.21-sparse/drivers/char/tty_io.c xenolinux-2.4.21-sparse/include/asm-xeno/vga.h
line diff
     1.1 --- a/xenolinux-2.4.21-sparse/arch/xeno/defconfig	Sun Jul 13 16:16:56 2003 +0000
     1.2 +++ b/xenolinux-2.4.21-sparse/arch/xeno/defconfig	Mon Jul 14 14:29:39 2003 +0000
     1.3 @@ -128,16 +128,33 @@ CONFIG_XENOLINUX_BLOCK=y
     1.4  # CONFIG_BLK_DEV_HD is not set
     1.5  
     1.6  #
     1.7 +# Console drivers
     1.8 +#
     1.9 +CONFIG_VGA_CONSOLE=y
    1.10 +# CONFIG_VIDEO_SELECT is not set
    1.11 +CONFIG_DUMMY_CONSOLE=y
    1.12 +
    1.13 +
    1.14 +#
    1.15  # Character devices
    1.16  #
    1.17  CONFIG_XEN_CONSOLE=y
    1.18  CONFIG_VT=y
    1.19 -CONFIG_VGA_CONSOLE=y
    1.20 -CONFIG_DUMMY_CONSOLE=y
    1.21 -# CONFIG_PSMOUSE is not set
    1.22 +CONFIG_VT_CONSOLE=y
    1.23  # CONFIG_UNIX98_PTYS is not set
    1.24  
    1.25  #
    1.26 +# Mice
    1.27 +#
    1.28 +# CONFIG_BUSMOUSE is not set
    1.29 +CONFIG_MOUSE=y
    1.30 +CONFIG_PSMOUSE=y
    1.31 +# CONFIG_82C710_MOUSE is not set
    1.32 +# CONFIG_PC110_PAD is not set
    1.33 +# CONFIG_MK712_MOUSE is not set
    1.34 +
    1.35 +
    1.36 +#
    1.37  # File systems
    1.38  #
    1.39  # CONFIG_QUOTA is not set
     2.1 --- a/xenolinux-2.4.21-sparse/arch/xeno/drivers/console/console.c	Sun Jul 13 16:16:56 2003 +0000
     2.2 +++ b/xenolinux-2.4.21-sparse/arch/xeno/drivers/console/console.c	Mon Jul 14 14:29:39 2003 +0000
     2.3 @@ -26,6 +26,26 @@
     2.4  
     2.5  #define XENO_TTY_MINOR 123
     2.6  
     2.7 +/*** useful function for console debugging -- goes straight to Xen ****/
     2.8 +
     2.9 +asmlinkage int xprintk(const char *fmt, ...)
    2.10 +{
    2.11 +        va_list args;
    2.12 +        unsigned long flags;
    2.13 +        int printed_len;
    2.14 +        static char printk_buf[1024];
    2.15 +
    2.16 +        /* Emit the output into the temporary buffer */
    2.17 +        va_start(args, fmt);
    2.18 +        printed_len = vsnprintf(printk_buf, sizeof(printk_buf), fmt, args);
    2.19 +        va_end(args);
    2.20 +
    2.21 +        // Useful Hack if things are going wrong very early in the day
    2.22 +        (void)HYPERVISOR_console_write(printk_buf, sizeof(printk_buf));
    2.23 +}
    2.24 +
    2.25 +
    2.26 +
    2.27  /******************** Kernel console driver ********************************/
    2.28  
    2.29  static void xen_console_write(struct console *co, const char *s, unsigned count)
    2.30 @@ -72,6 +92,7 @@ static struct console xen_console_info =
    2.31  
    2.32  void xen_console_init(void)
    2.33  {
    2.34 +  xprintk("xen_console_init\n");
    2.35    register_console(&xen_console_info);
    2.36  }
    2.37  
     3.1 --- a/xenolinux-2.4.21-sparse/drivers/char/tty_io.c	Sun Jul 13 16:16:56 2003 +0000
     3.2 +++ b/xenolinux-2.4.21-sparse/drivers/char/tty_io.c	Mon Jul 14 14:29:39 2003 +0000
     3.3 @@ -2238,13 +2238,14 @@ void __init console_init(void)
     3.4  	disable_early_printk(); 
     3.5  #endif
     3.6  
     3.7 +#ifdef CONFIG_XEN_CONSOLE
     3.8 +        xen_console_init();
     3.9 +#endif
    3.10 +
    3.11  #ifdef CONFIG_VT
    3.12  	con_init();
    3.13  #endif
    3.14  
    3.15 -#ifdef CONFIG_XEN_CONSOLE
    3.16 -	xen_console_init();
    3.17 -#endif
    3.18  #ifdef CONFIG_AU1000_SERIAL_CONSOLE
    3.19  	au1000_serial_console_init();
    3.20  #endif
     4.1 --- a/xenolinux-2.4.21-sparse/include/asm-xeno/vga.h	Sun Jul 13 16:16:56 2003 +0000
     4.2 +++ b/xenolinux-2.4.21-sparse/include/asm-xeno/vga.h	Mon Jul 14 14:29:39 2003 +0000
     4.3 @@ -49,9 +49,7 @@ static unsigned long VGA_MAP_MEM(unsigne
     4.4  	return 0;
     4.5  }
     4.6  
     4.7 -static inline unsigned char vga_readb(unsigned char * x) { 
     4.8 -xprintk("vr %p\n",x);return (*(x)); }
     4.9 -static void vga_writeb(unsigned char x, unsigned char *y) {
    4.10 -xprintk("vw %02x %p\n",x,y); *(y) = (x); }
    4.11 +static inline unsigned char vga_readb(unsigned char * x) { return (*(x)); }
    4.12 +static inline void vga_writeb(unsigned char x, unsigned char *y) { *(y) = (x); }
    4.13  
    4.14  #endif