# HG changeset patch # User iap10@labyrinth.cl.cam.ac.uk # Date 1058192979 0 # Node ID 3a237a10a0c64f2731fa94a98cab7c463644ccf8 # Parent 729e25262c44d4280c7aef46ea30013569f0689b bitkeeper revision 1.344 (3f12be53t1VivuAfELH_J3XUhJ2Frg) more console stuff diff -r 729e25262c44 -r 3a237a10a0c6 xenolinux-2.4.21-sparse/arch/xeno/defconfig --- a/xenolinux-2.4.21-sparse/arch/xeno/defconfig Sun Jul 13 16:16:56 2003 +0000 +++ b/xenolinux-2.4.21-sparse/arch/xeno/defconfig Mon Jul 14 14:29:39 2003 +0000 @@ -128,16 +128,33 @@ CONFIG_XENOLINUX_BLOCK=y # CONFIG_BLK_DEV_HD is not set # +# Console drivers +# +CONFIG_VGA_CONSOLE=y +# CONFIG_VIDEO_SELECT is not set +CONFIG_DUMMY_CONSOLE=y + + +# # Character devices # CONFIG_XEN_CONSOLE=y CONFIG_VT=y -CONFIG_VGA_CONSOLE=y -CONFIG_DUMMY_CONSOLE=y -# CONFIG_PSMOUSE is not set +CONFIG_VT_CONSOLE=y # CONFIG_UNIX98_PTYS is not set # +# Mice +# +# CONFIG_BUSMOUSE is not set +CONFIG_MOUSE=y +CONFIG_PSMOUSE=y +# CONFIG_82C710_MOUSE is not set +# CONFIG_PC110_PAD is not set +# CONFIG_MK712_MOUSE is not set + + +# # File systems # # CONFIG_QUOTA is not set diff -r 729e25262c44 -r 3a237a10a0c6 xenolinux-2.4.21-sparse/arch/xeno/drivers/console/console.c --- a/xenolinux-2.4.21-sparse/arch/xeno/drivers/console/console.c Sun Jul 13 16:16:56 2003 +0000 +++ b/xenolinux-2.4.21-sparse/arch/xeno/drivers/console/console.c Mon Jul 14 14:29:39 2003 +0000 @@ -26,6 +26,26 @@ #define XENO_TTY_MINOR 123 +/*** useful function for console debugging -- goes straight to Xen ****/ + +asmlinkage int xprintk(const char *fmt, ...) +{ + va_list args; + unsigned long flags; + int printed_len; + static char printk_buf[1024]; + + /* Emit the output into the temporary buffer */ + va_start(args, fmt); + printed_len = vsnprintf(printk_buf, sizeof(printk_buf), fmt, args); + va_end(args); + + // Useful Hack if things are going wrong very early in the day + (void)HYPERVISOR_console_write(printk_buf, sizeof(printk_buf)); +} + + + /******************** Kernel console driver ********************************/ static void xen_console_write(struct console *co, const char *s, unsigned count) @@ -72,6 +92,7 @@ static struct console xen_console_info = void xen_console_init(void) { + xprintk("xen_console_init\n"); register_console(&xen_console_info); } diff -r 729e25262c44 -r 3a237a10a0c6 xenolinux-2.4.21-sparse/drivers/char/tty_io.c --- a/xenolinux-2.4.21-sparse/drivers/char/tty_io.c Sun Jul 13 16:16:56 2003 +0000 +++ b/xenolinux-2.4.21-sparse/drivers/char/tty_io.c Mon Jul 14 14:29:39 2003 +0000 @@ -2238,13 +2238,14 @@ void __init console_init(void) disable_early_printk(); #endif +#ifdef CONFIG_XEN_CONSOLE + xen_console_init(); +#endif + #ifdef CONFIG_VT con_init(); #endif -#ifdef CONFIG_XEN_CONSOLE - xen_console_init(); -#endif #ifdef CONFIG_AU1000_SERIAL_CONSOLE au1000_serial_console_init(); #endif diff -r 729e25262c44 -r 3a237a10a0c6 xenolinux-2.4.21-sparse/include/asm-xeno/vga.h --- a/xenolinux-2.4.21-sparse/include/asm-xeno/vga.h Sun Jul 13 16:16:56 2003 +0000 +++ b/xenolinux-2.4.21-sparse/include/asm-xeno/vga.h Mon Jul 14 14:29:39 2003 +0000 @@ -49,9 +49,7 @@ static unsigned long VGA_MAP_MEM(unsigne return 0; } -static inline unsigned char vga_readb(unsigned char * x) { -xprintk("vr %p\n",x);return (*(x)); } -static void vga_writeb(unsigned char x, unsigned char *y) { -xprintk("vw %02x %p\n",x,y); *(y) = (x); } +static inline unsigned char vga_readb(unsigned char * x) { return (*(x)); } +static inline void vga_writeb(unsigned char x, unsigned char *y) { *(y) = (x); } #endif