aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64
diff options
context:
space:
mode:
authorStas Sergeev <stsp@aknet.ru>2006-03-23 05:59:41 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 10:38:05 -0500
commit99b7de33477882b86d54ce8ecbf90147f9d106d7 (patch)
tree1409719376eff18346aa6f15ad9d2f698d61302e /arch/x86_64
parent8bed51cd17464433a0c77afc8a5150e51d3da37d (diff)
[PATCH] x86: early printk handling fixes
The history is that -mm kernels do not work for me for a few months already. The things started from crashing somewhere after starting init, and for the last month - no boot at all, just "Uncompressing... OK, booting kernel", and silence. Early console didn't work too. With the latest releases this degraded into an infinite stream of the "Unknown interrupt or fault" messages. So today my patience ran out and I started to think how can I collect at least some info for the bug-report. Attached is the patch that allows to gather some valueable debug info on the problem by making an early console more useable. I can't properly test the patch, as the kernel still doesn't boot, so I'll explain it in details in a hope someone else can justify the intrusive changes. arch_hooks.h: added prototypes for setup_early_printk() and early_printk(). setup.c: killed wrong setup_early_printk() prototype. Moved setup_early_printk() a bit earlier, as it was not "early enough" to cover the bug I was fighting with. early_printk.c: made it to start printing from the bottom of the screen, otherwise the messages interfere with the ones of the boot-loader, so you can't read them. Signed-off-by: Stas Sergeev <stsp@aknet.ru> Cc: Andi Kleen <ak@muc.de> Cc: Zwane Mwaikambo <zwane@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/kernel/early_printk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/early_printk.c b/arch/x86_64/kernel/early_printk.c
index 6dffb498ccd7..6fcdcb80b07a 100644
--- a/arch/x86_64/kernel/early_printk.c
+++ b/arch/x86_64/kernel/early_printk.c
@@ -21,7 +21,7 @@
21#define MAX_XPOS max_xpos 21#define MAX_XPOS max_xpos
22 22
23static int max_ypos = 25, max_xpos = 80; 23static int max_ypos = 25, max_xpos = 80;
24static int current_ypos = 1, current_xpos = 0; 24static int current_ypos = 25, current_xpos = 0;
25 25
26static void early_vga_write(struct console *con, const char *str, unsigned n) 26static void early_vga_write(struct console *con, const char *str, unsigned n)
27{ 27{
@@ -244,6 +244,7 @@ int __init setup_early_printk(char *opt)
244 && SCREEN_INFO.orig_video_isVGA == 1) { 244 && SCREEN_INFO.orig_video_isVGA == 1) {
245 max_xpos = SCREEN_INFO.orig_video_cols; 245 max_xpos = SCREEN_INFO.orig_video_cols;
246 max_ypos = SCREEN_INFO.orig_video_lines; 246 max_ypos = SCREEN_INFO.orig_video_lines;
247 current_ypos = max_ypos;
247 early_console = &early_vga_console; 248 early_console = &early_vga_console;
248 } else if (!strncmp(buf, "simnow", 6)) { 249 } else if (!strncmp(buf, "simnow", 6)) {
249 simnow_init(buf + 6); 250 simnow_init(buf + 6);