# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID b26bf72514aa793453d426ccdf888f577c6efd91
# Parent 9a277d391ff9fa56a883671e237b3b68c421066b
Move vga options to their own 'vga=' boot parameter.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
docs/src/user.tex | 10 ++++++++--
xen/drivers/char/console.c | 41 +++++++++++++++++++++++++----------------
2 files changed, 33 insertions(+), 18 deletions(-)
diff -r 9a277d391ff9 -r b26bf72514aa docs/src/user.tex
--- a/docs/src/user.tex Tue Aug 15 16:04:12 2006 +0100
+++ b/docs/src/user.tex Tue Aug 15 16:17:24 2006 +0100
@@ -3129,8 +3129,8 @@ editing \path{grub.conf}.
\item [ console=$<$specifier list$>$ ] Specify the destination for Xen
console I/O. This is a comma-separated list of, for example:
\begin{description}
- \item[ vga ] Use VGA console (only until domain 0 boots, unless {\bf
- vga[keep] } is specified).
+ \item[ vga ] Use VGA console (until domain 0 boots, unless {\bf
+ vga=keep } is specified).
\item[ com1 ] Use serial port com1.
\item[ com2H ] Use serial port com2. Transmitted chars will have the
MSB set. Received chars must have MSB set.
@@ -3141,6 +3141,12 @@ editing \path{grub.conf}.
subsystems (e.g.\ console and debugger). Sharing is controlled by
MSB of each transmitted/received character. [NB. Default for this
option is `com1,vga']
+\item [ vga=$<$options$>$ ] This is a comma-separated list of options:
+ \begin{description}
+ \item[ text-$<$mode$>$ ] Select text-mode resolution, where mode is
+ one of 80x25, 80x28, 80x30, 80x34, 80x43, 80x50, 80x60.
+ \item[ keep ] Keep the VGA console even after domain 0 boots.
+ \end{description}
\item [ sync\_console ] Force synchronous console output. This is
useful if you system fails unexpectedly before it has sent all
available output to the console. In most cases Xen will
diff -r 9a277d391ff9 -r b26bf72514aa xen/drivers/char/console.c
--- a/xen/drivers/char/console.c Tue Aug 15 16:04:12 2006 +0100
+++ b/xen/drivers/char/console.c Tue Aug 15 16:17:24 2006 +0100
@@ -32,6 +32,10 @@ static char opt_console[30] = OPT_CONSOL
static char opt_console[30] = OPT_CONSOLE_STR;
string_param("console", opt_console);
+/* vga: comma-separated options. */
+static char opt_vga[30] = "";
+string_param("vga", opt_vga);
+
/* conswitch: a character pair controlling console switching. */
/* Char 1: CTRL+<char1> is used to switch console input between Xen and DOM0 */
/* Char 2: If this character is 'x', then do not auto-switch to DOM0 when it */
@@ -55,7 +59,8 @@ static char printk_prefix[16] = "";
static int sercon_handle = -1;
static int vgacon_enabled = 0;
-static int vgacon_keep = 0;
+static int vgacon_keep = 0;
+static int vgacon_lines = 25;
static const struct font_desc *font;
static DEFINE_SPINLOCK(console_lock);
@@ -66,10 +71,10 @@ static DEFINE_SPINLOCK(console_lock);
* *******************************************************
*/
-/* VGA text (mode 3) definitions. */
+/* VGA text-mode definitions. */
#define COLUMNS 80
-#define LINES vgacon_enabled
-#define ATTRIBUTE 7
+#define LINES vgacon_lines
+#define ATTRIBUTE 7
#define VIDEO_SIZE (COLUMNS * LINES * 2)
/* Clear the screen and initialize VIDEO, XPOS and YPOS. */
@@ -85,6 +90,16 @@ static void init_vga(void)
if ( !vgacon_enabled )
return;
+ for ( p = opt_vga; p != NULL; p = strchr(p, ',') )
+ {
+ if ( *p == ',' )
+ p++;
+ if ( strncmp(p, "keep", 4) == 0 )
+ vgacon_keep = 1;
+ else if ( strncmp(p, "text-80x", 8) == 0 )
+ vgacon_lines = simple_strtoul(p + 8, NULL, 10);
+ }
+
video = setup_vga();
if ( !video )
{
@@ -92,7 +107,7 @@ static void init_vga(void)
return;
}
- switch ( vgacon_enabled )
+ switch ( vgacon_lines )
{
case 25:
case 30:
@@ -108,13 +123,13 @@ static void init_vga(void)
font = &font_vga_8x8;
break;
default:
- vgacon_enabled = 25;
+ vgacon_lines = 25;
break;
}
- if ( (font != NULL) && (vga_load_font(font, vgacon_enabled) < 0) )
- {
- vgacon_enabled = 25;
+ if ( (font != NULL) && (vga_load_font(font, vgacon_lines) < 0) )
+ {
+ vgacon_lines = 25;
font = NULL;
}
@@ -438,13 +453,7 @@ void init_console(void)
if ( strncmp(p, "com", 3) == 0 )
sercon_handle = serial_parse_handle(p);
else if ( strncmp(p, "vga", 3) == 0 )
- {
- vgacon_enabled = p[3] < '1' || p[3] > '9'
- ? (p += 3, 25)
- : simple_strtol(p + 3, &p, 10);
- if ( strncmp(p, "[keep]", 6) == 0 )
- vgacon_keep = 1;
- }
+ vgacon_enabled = 1;
}
init_vga();
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|