--- a/include/asm-i386/arch_hooks.h 2004-01-09 09:59:45.000000000 +0300 +++ b/include/asm-i386/arch_hooks.h 2006-02-21 12:07:40.000000000 +0300 @@ -24,4 +24,7 @@ extern void time_init_hook(void); extern void mca_nmi_hook(void); +extern int setup_early_printk(char *); +extern void early_printk(const char *fmt, ...) __attribute__((format(printf,1,2))); + #endif --- a/arch/i386/kernel/head.S 2006-02-15 12:02:33.000000000 +0300 +++ b/arch/i386/kernel/head.S 2006-02-21 11:39:05.000000000 +0300 @@ -410,6 +410,7 @@ popl %ecx popl %eax #endif + hlt /* no way out, iret will just retrigger the fault */ iret /* @@ -439,7 +440,7 @@ ready: .byte 0 int_msg: - .asciz "Unknown interrupt or fault at EIP %p %p %p\n" + .asciz "Unknown interrupt or fault at EIP %p %p %p, press Reset\n" /* * The IDT and GDT 'descriptors' are a strange 48-bit object --- a/arch/i386/kernel/setup.c 2006-02-21 10:35:36.000000000 +0300 +++ b/arch/i386/kernel/setup.c 2006-02-21 12:09:52.000000000 +0300 @@ -1447,6 +1447,16 @@ parse_cmdline_early(cmdline_p); +#ifdef CONFIG_EARLY_PRINTK + { + char *s = strstr(*cmdline_p, "earlyprintk="); + if (s) { + setup_early_printk(strchr(s, '=') + 1); + printk("early console enabled\n"); + } + } +#endif + max_low_pfn = setup_memory(); /* @@ -1471,19 +1481,6 @@ * NOTE: at this point the bootmem allocator is fully available. */ -#ifdef CONFIG_EARLY_PRINTK - { - char *s = strstr(*cmdline_p, "earlyprintk="); - if (s) { - extern void setup_early_printk(char *); - - setup_early_printk(strchr(s, '=') + 1); - printk("early console enabled\n"); - } - } -#endif - - dmi_scan_machine(); #ifdef CONFIG_X86_GENERICARCH --- a/arch/x86_64/kernel/early_printk.c 2006-02-21 10:35:40.000000000 +0300 +++ b/arch/x86_64/kernel/early_printk.c 2006-02-21 12:19:10.000000000 +0300 @@ -21,7 +21,7 @@ #define MAX_XPOS max_xpos static int max_ypos = 25, max_xpos = 80; -static int current_ypos = 1, current_xpos = 0; +static int current_ypos = 25, current_xpos = 0; static void early_vga_write(struct console *con, const char *str, unsigned n) { @@ -244,6 +244,7 @@ && SCREEN_INFO.orig_video_isVGA == 1) { max_xpos = SCREEN_INFO.orig_video_cols; max_ypos = SCREEN_INFO.orig_video_lines; + current_ypos = max_ypos; early_console = &early_vga_console; } else if (!strncmp(buf, "simnow", 6)) { simnow_init(buf + 6); --- a/init/main.c 2006-02-21 10:36:04.000000000 +0300 +++ b/init/main.c 2006-02-21 15:33:18.000000000 +0300 @@ -449,6 +449,7 @@ * enable them */ lock_kernel(); + smp_prepare_boot_cpu(); page_address_init(); printk(KERN_NOTICE); printk(linux_banner); @@ -456,12 +457,6 @@ setup_per_cpu_areas(); /* - * Mark the boot cpu "online" so that it can call console drivers in - * printk() and can access its per-cpu storage. - */ - smp_prepare_boot_cpu(); - - /* * Set up the scheduler prior starting any interrupts (such as the * timer interrupt). Full topology setup happens at smp_init() * time - but meanwhile we still have a functioning scheduler.