debuggers.hg
changeset 4966:522cd960f6ce
bitkeeper revision 1.1412.1.2 (42886f72kBE9ng-ZihVNQN5GdTyJfw)
Merge firebug.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-2.0-testing.bk
into firebug.cl.cam.ac.uk:/local/scratch/cl349/xen-unstable.bk
Merge firebug.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-2.0-testing.bk
into firebug.cl.cam.ac.uk:/local/scratch/cl349/xen-unstable.bk
author | cl349@firebug.cl.cam.ac.uk |
---|---|
date | Mon May 16 10:01:22 2005 +0000 (2005-05-16) |
parents | e2f7b51dfa85 d0a4a77aa98f |
children | 2c0bcfd2a1fc |
files | .rootkeys linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/early_printk.c |
line diff
1.1 --- a/.rootkeys Mon May 16 09:57:34 2005 +0000 1.2 +++ b/.rootkeys Mon May 16 10:01:22 2005 +0000 1.3 @@ -274,7 +274,7 @@ 424efaa6kKleWe45IrqsG8gkejgEQA linux-2.6 1.4 424efaa6HSyuVodl6SxFGj39vlp6MA linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/Makefile 1.5 424efaa7bVAw3Z_q0SdFivfNVavyIg linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/asm-offsets.c 1.6 424efaa7ddTVabh547Opf0u9vKmUXw linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/e820.c 1.7 -424efaa72fQEHYQ-Sp2IW9X2xTA5zQ linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/early_printk.c 1.8 +428868bbQust_FkSdkerMqYBWfrVKg linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/early_printk.c 1.9 424efaa7B_BWrAkLPJNoKk4EQY2a7w linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/entry.S 1.10 424efaa7vhgi7th5QVICjfuHmEWOkw linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/head.S 1.11 424efaa7tiMEZSAYepwyjaNWxyXF7Q linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/head64.c
2.1 --- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/early_printk.c Mon May 16 09:57:34 2005 +0000 2.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/early_printk.c Mon May 16 10:01:22 2005 +0000 2.3 @@ -1,3 +1,4 @@ 2.4 +#include <linux/config.h> 2.5 #include <linux/console.h> 2.6 #include <linux/kernel.h> 2.7 #include <linux/init.h> 2.8 @@ -16,7 +17,6 @@ 2.9 #define MAX_YPOS 25 2.10 #define MAX_XPOS 80 2.11 2.12 -#if 0 2.13 static int current_ypos = 1, current_xpos = 0; 2.14 2.15 static void early_vga_write(struct console *con, const char *str, unsigned n) 2.16 @@ -58,8 +58,8 @@ static struct console early_vga_console 2.17 .flags = CON_PRINTBUFFER, 2.18 .index = -1, 2.19 }; 2.20 -#endif 2.21 2.22 +#ifndef CONFIG_XEN 2.23 /* Serial functions loosely based on a similar package from Klaus P. Gerlicher */ 2.24 2.25 int early_serial_base = 0x3f8; /* ttyS0 */ 2.26 @@ -80,7 +80,6 @@ int early_serial_base = 0x3f8; /* ttyS0 2.27 #define DLL 0 /* Divisor Latch Low */ 2.28 #define DLH 1 /* Divisor latch High */ 2.29 2.30 -#if 0 2.31 static int early_serial_putc(unsigned char ch) 2.32 { 2.33 unsigned timeout = 0xffff; 2.34 @@ -99,11 +98,9 @@ static void early_serial_write(struct co 2.35 s++; 2.36 } 2.37 } 2.38 -#endif 2.39 2.40 #define DEFAULT_BAUD 9600 2.41 2.42 -#if 0 2.43 static __init void early_serial_init(char *s) 2.44 { 2.45 unsigned char c; 2.46 @@ -151,6 +148,26 @@ static __init void early_serial_init(cha 2.47 outb((divisor >> 8) & 0xff, early_serial_base + DLH); 2.48 outb(c & ~DLAB, early_serial_base + LCR); 2.49 } 2.50 +#else 2.51 + 2.52 +static void 2.53 +early_serial_write(struct console *con, const char *s, unsigned count) 2.54 +{ 2.55 + int n; 2.56 + 2.57 + while (count > 0) { 2.58 + n = HYPERVISOR_console_io(CONSOLEIO_write, count, (char *)s); 2.59 + if (n <= 0) 2.60 + break; 2.61 + count -= n; 2.62 + s += n; 2.63 + } 2.64 +} 2.65 + 2.66 +static __init void early_serial_init(char *s) 2.67 +{ 2.68 +} 2.69 +#endif 2.70 2.71 static struct console early_serial_console = { 2.72 .name = "earlyser", 2.73 @@ -158,23 +175,9 @@ static struct console early_serial_conso 2.74 .flags = CON_PRINTBUFFER, 2.75 .index = -1, 2.76 }; 2.77 -#endif 2.78 - 2.79 -static void xen_console_write(struct console *con, const char *s, unsigned n) 2.80 -{ 2.81 - HYPERVISOR_console_io(CONSOLEIO_write, n, (char *) s); 2.82 -} 2.83 - 2.84 -static struct console xen_console = { 2.85 - .name = "xen", 2.86 - .write = xen_console_write, 2.87 - .flags = CON_PRINTBUFFER, 2.88 - .index = -1, 2.89 -}; 2.90 2.91 /* Direct interface for emergencies */ 2.92 -struct console *early_console = &xen_console; 2.93 -/* struct console *early_console = &early_vga_console; */ 2.94 +struct console *early_console = &early_vga_console; 2.95 static int early_console_initialized = 0; 2.96 2.97 void early_printk(const char *fmt, ...) 2.98 @@ -193,9 +196,9 @@ static int keep_early; 2.99 2.100 int __init setup_early_printk(char *opt) 2.101 { 2.102 + char *space; 2.103 + char buf[256]; 2.104 2.105 - early_console = &xen_console; 2.106 -#if 0 2.107 if (early_console_initialized) 2.108 return -1; 2.109 2.110 @@ -218,7 +221,6 @@ int __init setup_early_printk(char *opt) 2.111 } else if (!strncmp(buf, "vga", 3)) { 2.112 early_console = &early_vga_console; 2.113 } 2.114 -#endif 2.115 early_console_initialized = 1; 2.116 register_console(early_console); 2.117 return 0;