Re: [patch] i386: early pagefault handler

From: Andi Kleen
Date: Wed Jul 05 2006 - 09:13:41 EST


Chuck Ebbert <76306.1226@xxxxxxxxxxxxxx> writes:

> 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.

You should do it for all the exceptions then
(except perhaps NMI). Isn't much more work - see the x86-64 code.



> +hlt_loop:
> + hlt

There are still supported i386 CPUs that don't support HLT and
would recursively fault here.

> + rep ; nop
> + jmp 1b

Looks a bit weird to not jump to hlt back again but ok.
The HLT is unlikely to come back anyways because interrupts
are off.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/