aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjws@cairnwell.research <jws@cairnwell.research>2003-05-02 15:53:29 +0000
committerjws@cairnwell.research <jws@cairnwell.research>2003-05-02 15:53:29 +0000
commitd2c3766111bfb2542f435d6f4ffd07096ea6cfec (patch)
treea8020951bc98a01c1f1bc8e79768750eb6fbfe21
parent78cbdf5809c68481cdb32bf0ecbd313bc57b3903 (diff)
downloadxen-d2c3766111bfb2542f435d6f4ffd07096ea6cfec.tar.gz
xen-d2c3766111bfb2542f435d6f4ffd07096ea6cfec.tar.bz2
xen-d2c3766111bfb2542f435d6f4ffd07096ea6cfec.zip
bitkeeper revision 1.202.1.1 (3eb29479NSt9W43l1WHqpd10S9llKA)
console command line fix
-rw-r--r--xen/common/kernel.c23
-rw-r--r--xen/include/xeno/console.h2
2 files changed, 15 insertions, 10 deletions
diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index 4d5a2deba0..a9ae7383d2 100644
--- a/xen/common/kernel.c
+++ b/xen/common/kernel.c
@@ -33,7 +33,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 */
@@ -45,7 +45,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 },
@@ -56,6 +56,7 @@ static struct {
{ NULL, 0, NULL }
};
+
void cmain (unsigned long magic, multiboot_info_t *mbi)
{
struct task_struct *new_dom;
@@ -66,17 +67,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;
}
@@ -86,13 +86,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;
}
@@ -161,6 +161,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;