diff options
-rw-r--r-- | arch/i386/kernel/setup.c | 23 | ||||
-rw-r--r-- | arch/x86_64/kernel/early_printk.c | 3 | ||||
-rw-r--r-- | include/asm-i386/arch_hooks.h | 3 |
3 files changed, 15 insertions, 14 deletions
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 5f58f8cb9836..2d8782960f41 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -1459,6 +1459,16 @@ void __init setup_arch(char **cmdline_p) | |||
1459 | 1459 | ||
1460 | parse_cmdline_early(cmdline_p); | 1460 | parse_cmdline_early(cmdline_p); |
1461 | 1461 | ||
1462 | #ifdef CONFIG_EARLY_PRINTK | ||
1463 | { | ||
1464 | char *s = strstr(*cmdline_p, "earlyprintk="); | ||
1465 | if (s) { | ||
1466 | setup_early_printk(strchr(s, '=') + 1); | ||
1467 | printk("early console enabled\n"); | ||
1468 | } | ||
1469 | } | ||
1470 | #endif | ||
1471 | |||
1462 | max_low_pfn = setup_memory(); | 1472 | max_low_pfn = setup_memory(); |
1463 | 1473 | ||
1464 | /* | 1474 | /* |
@@ -1483,19 +1493,6 @@ void __init setup_arch(char **cmdline_p) | |||
1483 | * NOTE: at this point the bootmem allocator is fully available. | 1493 | * NOTE: at this point the bootmem allocator is fully available. |
1484 | */ | 1494 | */ |
1485 | 1495 | ||
1486 | #ifdef CONFIG_EARLY_PRINTK | ||
1487 | { | ||
1488 | char *s = strstr(*cmdline_p, "earlyprintk="); | ||
1489 | if (s) { | ||
1490 | extern void setup_early_printk(char *); | ||
1491 | |||
1492 | setup_early_printk(strchr(s, '=') + 1); | ||
1493 | printk("early console enabled\n"); | ||
1494 | } | ||
1495 | } | ||
1496 | #endif | ||
1497 | |||
1498 | |||
1499 | dmi_scan_machine(); | 1496 | dmi_scan_machine(); |
1500 | 1497 | ||
1501 | #ifdef CONFIG_X86_GENERICARCH | 1498 | #ifdef CONFIG_X86_GENERICARCH |
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 | ||
23 | static int max_ypos = 25, max_xpos = 80; | 23 | static int max_ypos = 25, max_xpos = 80; |
24 | static int current_ypos = 1, current_xpos = 0; | 24 | static int current_ypos = 25, current_xpos = 0; |
25 | 25 | ||
26 | static void early_vga_write(struct console *con, const char *str, unsigned n) | 26 | static 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); |
diff --git a/include/asm-i386/arch_hooks.h b/include/asm-i386/arch_hooks.h index 28b96a6fb9fa..238cf4275b96 100644 --- a/include/asm-i386/arch_hooks.h +++ b/include/asm-i386/arch_hooks.h | |||
@@ -24,4 +24,7 @@ extern void trap_init_hook(void); | |||
24 | extern void time_init_hook(void); | 24 | extern void time_init_hook(void); |
25 | extern void mca_nmi_hook(void); | 25 | extern void mca_nmi_hook(void); |
26 | 26 | ||
27 | extern int setup_early_printk(char *); | ||
28 | extern void early_printk(const char *fmt, ...) __attribute__((format(printf,1,2))); | ||
29 | |||
27 | #endif | 30 | #endif |