ia64/xen-unstable
changeset 420:56e5f664744d
bitkeeper revision 1.204 (3eb29485KpeT7bkpMirzzTwp0MY0cQ)
Merge ssh://jws22@gauntlet.cl.cam.ac.uk//usr/groups/xeno/BK/xeno.bk
into cairnwell.research:/home/jws/projects/xen/console/xeno.bk
Merge ssh://jws22@gauntlet.cl.cam.ac.uk//usr/groups/xeno/BK/xeno.bk
into cairnwell.research:/home/jws/projects/xen/console/xeno.bk
author | jws@cairnwell.research |
---|---|
date | Fri May 02 15:53:41 2003 +0000 (2003-05-02) |
parents | cbe60e831a04 5958f860ef1c |
children | 5d0fd4216f8f |
files | xen/common/kernel.c xen/include/xeno/console.h |
line diff
1.1 --- a/xen/common/kernel.c Fri May 02 14:47:04 2003 +0000 1.2 +++ b/xen/common/kernel.c Fri May 02 15:53:41 2003 +0000 1.3 @@ -35,7 +35,7 @@ void init_serial(void); 1.4 void start_of_day(void); 1.5 1.6 /* Command line options and variables. */ 1.7 -int opt_console = 1; 1.8 +unsigned int opt_console = 1; 1.9 unsigned int opt_ser_baud = 9600; /* default baud for COM1 */ 1.10 unsigned int opt_dom0_mem = 16000; /* default kbytes for DOM0 */ 1.11 unsigned int opt_ne_base = 0; /* NE2k NICs cannot be probed */ 1.12 @@ -47,7 +47,7 @@ static struct { 1.13 int type; 1.14 void *var; 1.15 } opts[] = { 1.16 - { "console", OPT_BOOL, &opt_console }, 1.17 + { "console", OPT_UINT, &opt_console }, 1.18 { "ser_baud", OPT_UINT, &opt_ser_baud }, 1.19 { "dom0_mem", OPT_UINT, &opt_dom0_mem }, 1.20 { "ne_base", OPT_UINT, &opt_ne_base }, 1.21 @@ -58,6 +58,7 @@ static struct { 1.22 { NULL, 0, NULL } 1.23 }; 1.24 1.25 + 1.26 void cmain (unsigned long magic, multiboot_info_t *mbi) 1.27 { 1.28 struct task_struct *new_dom; 1.29 @@ -68,17 +69,16 @@ void cmain (unsigned long magic, multibo 1.30 int i; 1.31 1.32 /* 1.33 - * Clear the screen. Note that serial output cannot be done properly until 1.34 + * Note that serial output cannot be done properly until 1.35 * after command-line arguments have been parsed, and the required baud 1.36 * rate is known. Any messages before that will be output using the 1.37 - * seetings of the bootloader, for example. Maybe okay for error msgs... 1.38 + * settings of the bootloader, for example. Maybe okay for error msgs... 1.39 */ 1.40 - init_vga(); 1.41 - cls(); 1.42 +#define early_error(args...) opt_console=1; init_vga(); cls(); printk(args) 1.43 1.44 if ( magic != MULTIBOOT_BOOTLOADER_MAGIC ) 1.45 { 1.46 - printk("Invalid magic number: 0x%x\n", (unsigned)magic); 1.47 + early_error("Invalid magic number: 0x%x\n", (unsigned)magic); 1.48 return; 1.49 } 1.50 1.51 @@ -88,13 +88,13 @@ void cmain (unsigned long magic, multibo 1.52 */ 1.53 if ( (mbi->flags & 9) != 9 ) 1.54 { 1.55 - printk("Bad flags passed by bootloader: 0x%x\n", (unsigned)mbi->flags); 1.56 + early_error("Bad flags passed by bootloader: 0x%x\n", (unsigned)mbi->flags); 1.57 return; 1.58 } 1.59 1.60 if ( mbi->mods_count == 0 ) 1.61 { 1.62 - printk("Require at least one module!\n"); 1.63 + early_error("Require at least one module!\n"); 1.64 return; 1.65 } 1.66 1.67 @@ -163,6 +163,11 @@ void cmain (unsigned long magic, multibo 1.68 } 1.69 } 1.70 1.71 +#undef early_error 1.72 + 1.73 + init_vga(); 1.74 + cls(); 1.75 + 1.76 /* INITIALISE SERIAL LINE (printk will work okay from here on). */ 1.77 init_serial(); 1.78
2.1 --- a/xen/include/xeno/console.h Fri May 02 14:47:04 2003 +0000 2.2 +++ b/xen/include/xeno/console.h Fri May 02 15:53:41 2003 +0000 2.3 @@ -29,4 +29,4 @@ 2.4 #define CONFIG_OUTPUT_CONSOLE 1 // but see also opt_console 2.5 #define CONFIG_OUTPUT_SERIAL 1 2.6 2.7 -extern int opt_console; 2.8 +extern unsigned int opt_console;