Re: [PATCH][RESEND] x86: Do not write to VGA memory space if CONFIG_VGA_CONSOLE is undefined

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Guenter Roeck
Date: Monday, April 5, 2010 - 2:04 pm

On Mon, 2010-04-05 at 16:25 -0400, H. Peter Anvin wrote:
c) boot_params.screen_info.orig_video_isVGA == 1?

boot_params.screen_info.orig_video_isVGA == 0 in the problem case. As I
tried to explain below, the problem happens before setup_early_printk()
is called, and thus the value of orig_video_isVGA is irrelevant for the
problem case. Not sure how else I can explain it.

It does; as a result of this part of the patch, the compiler can
optimize all vga related code away. As I said, this is just an
optimization resulting in less code. It is however not important /
relevant from a functional point of view, and I don't mind taking it
out.

As far as I can see, boot_params.screen_info.orig_video_isVGA is set
early enough during boot, so that should at least solve the immediate
problem. However, it would result in early messages being ignored, which
might not be desirable.

Would you accept a minimized patch like this ?

 /* Direct interface for emergencies */
+#ifdef CONFIG_VGA_CONSOLE
 static struct console *early_console = &early_vga_console;
+#else
+static struct console *early_console = &early_serial_console;
+#endif
 static int __initdata early_console_initialized;

This would prevent the problem while minimizing changes, and at the same
time permit early messages to be written to the serial console.

Guenter


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH][RESEND] x86: Do not write to VGA memory space ..., Guenter Roeck, (Mon Apr 5, 2:04 pm)