The patch titled i386: early pagefault handler has been added to the -mm tree. Its filename is i386-early-pagefault-handler.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: i386: early pagefault handler From: Chuck Ebbert <76306.1226@xxxxxxxxxxxxxx> Page faults during kernel initialization can be hard to diagnose. Add a handler that prints the fault address, EIP and top of stack when an early page fault happens. Signed-off-by: Chuck Ebbert <76306.1226@xxxxxxxxxxxxxx> Acked-by: Ingo Molnar <mingo@xxxxxxx> Cc: Andi Kleen <ak@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- arch/i386/kernel/head.S | 37 +++++++++++++++++++++++++++++++++++++ 1 files changed, 37 insertions(+) diff -puN arch/i386/kernel/head.S~i386-early-pagefault-handler arch/i386/kernel/head.S --- a/arch/i386/kernel/head.S~i386-early-pagefault-handler +++ a/arch/i386/kernel/head.S @@ -377,8 +377,41 @@ rp_sidt: addl $8,%edi dec %ecx jne rp_sidt + + lea page_fault,%edi /* early page fault handler */ + movw %di,%ax + andl $0x0000ffff,%edx + andl $0xffff0000,%edi + orl %edi,%edx + lea idt_table,%edi + movl %eax,8*14(%edi) + movl %edx,8*14+4(%edi) + ret +/* This is the early page fault handler */ + ALIGN +page_fault: + cld +#ifdef CONFIG_PRINTK + movl $(__KERNEL_DS),%eax + movl %eax,%ds + movl %eax,%es + movl %cr2,%eax + pushl %eax + pushl $pf_msg +#ifdef CONFIG_EARLY_PRINTK + call early_printk +#else + call printk +#endif +#endif +hlt_loop: + hlt +1: + rep ; nop + jmp 1b + /* This is the default interrupt "handler" :-) */ ALIGN ignore_int: @@ -440,6 +473,10 @@ ready: .byte 0 int_msg: .asciz "Unknown interrupt or fault at EIP %p %p %p\n" +pf_msg: + .ascii "Pg flt: CR2 %p err %p EIP %p CS %p flags %p\n" + .asciz " Stk: %p %p %p %p %p %p %p %p\n" + /* * The IDT and GDT 'descriptors' are a strange 48-bit object * only used by the lidt and lgdt instructions. They are not _ Patches currently in -mm which might be from 76306.1226@xxxxxxxxxxxxxx are origin.patch i386-print-stack-size-in-oops-messages.patch sleazy-fpu-feature-i386-support.patch i386-early-pagefault-handler.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html