diff options
author | jws@cairnwell.research <jws@cairnwell.research> | 2003-05-02 15:53:41 +0000 |
---|---|---|
committer | jws@cairnwell.research <jws@cairnwell.research> | 2003-05-02 15:53:41 +0000 |
commit | fc9336969f835fc806b9cdad00a6350a696cefe9 (patch) | |
tree | ddaa99c7fcb3a410de17060a806771a4b46c8451 | |
parent | a8697058f24c5472a2adb478d8a6ca324c94518f (diff) | |
parent | d2c3766111bfb2542f435d6f4ffd07096ea6cfec (diff) | |
download | xen-fc9336969f835fc806b9cdad00a6350a696cefe9.tar.gz xen-fc9336969f835fc806b9cdad00a6350a696cefe9.tar.bz2 xen-fc9336969f835fc806b9cdad00a6350a696cefe9.zip |
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
-rw-r--r-- | xen/common/kernel.c | 23 | ||||
-rw-r--r-- | xen/include/xeno/console.h | 2 |
2 files changed, 15 insertions, 10 deletions
diff --git a/xen/common/kernel.c b/xen/common/kernel.c index 9cb501eb1f..bc10aff2fe 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -35,7 +35,7 @@ void init_serial(void); void start_of_day(void); /* Command line options and variables. */ -int opt_console = 1; +unsigned int opt_console = 1; unsigned int opt_ser_baud = 9600; /* default baud for COM1 */ unsigned int opt_dom0_mem = 16000; /* default kbytes for DOM0 */ unsigned int opt_ne_base = 0; /* NE2k NICs cannot be probed */ @@ -47,7 +47,7 @@ static struct { int type; void *var; } opts[] = { - { "console", OPT_BOOL, &opt_console }, + { "console", OPT_UINT, &opt_console }, { "ser_baud", OPT_UINT, &opt_ser_baud }, { "dom0_mem", OPT_UINT, &opt_dom0_mem }, { "ne_base", OPT_UINT, &opt_ne_base }, @@ -58,6 +58,7 @@ static struct { { NULL, 0, NULL } }; + void cmain (unsigned long magic, multiboot_info_t *mbi) { struct task_struct *new_dom; @@ -68,17 +69,16 @@ void cmain (unsigned long magic, multiboot_info_t *mbi) int i; /* - * Clear the screen. Note that serial output cannot be done properly until + * Note that serial output cannot be done properly until * after command-line arguments have been parsed, and the required baud * rate is known. Any messages before that will be output using the - * seetings of the bootloader, for example. Maybe okay for error msgs... + * settings of the bootloader, for example. Maybe okay for error msgs... */ - init_vga(); - cls(); +#define early_error(args...) opt_console=1; init_vga(); cls(); printk(args) if ( magic != MULTIBOOT_BOOTLOADER_MAGIC ) { - printk("Invalid magic number: 0x%x\n", (unsigned)magic); + early_error("Invalid magic number: 0x%x\n", (unsigned)magic); return; } @@ -88,13 +88,13 @@ void cmain (unsigned long magic, multiboot_info_t *mbi) */ if ( (mbi->flags & 9) != 9 ) { - printk("Bad flags passed by bootloader: 0x%x\n", (unsigned)mbi->flags); + early_error("Bad flags passed by bootloader: 0x%x\n", (unsigned)mbi->flags); return; } if ( mbi->mods_count == 0 ) { - printk("Require at least one module!\n"); + early_error("Require at least one module!\n"); return; } @@ -163,6 +163,11 @@ void cmain (unsigned long magic, multiboot_info_t *mbi) } } +#undef early_error + + init_vga(); + cls(); + /* INITIALISE SERIAL LINE (printk will work okay from here on). */ init_serial(); diff --git a/xen/include/xeno/console.h b/xen/include/xeno/console.h index e5cb947b2f..3208b1e3a9 100644 --- a/xen/include/xeno/console.h +++ b/xen/include/xeno/console.h @@ -29,4 +29,4 @@ #define CONFIG_OUTPUT_CONSOLE 1 // but see also opt_console #define CONFIG_OUTPUT_SERIAL 1 -extern int opt_console; +extern unsigned int opt_console; |