lkml.org 
[lkml]   [2000]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [DOC] Debugging early kernel hangs
Date
Keith Owens writes:
> If a kernel hangs early in the boot process (before the console has
> been initialized) then printk is no use because you never see the
> output. There is a technique for using the video display to indicate
> boot progress so you can localize the problem. Reporting "my kernel
> hangs during boot at line nnn in routine xyz" is a lot better than "my
> kernel hangs during boot".

Hmm, good idea, but how does this work on, say, non-x86 architectures
which don't have a VGA text frame buffer, or whose VGA text frame buffer
is not mapped in, or whose VGA text frame buffer is not initialised.

You will still end up with those "my kernel hangs during boot" messages.

A lot of the problems with debugging early kernel hangs is that you
don't have a display set up, or you don't have enough of the memory
subsystem initialised (eg, before pci_init) to be able to access
devices (eg, before paging_init).

We get around all this on ARM by having a set of debugging routines
which are fairly primitive (printascii, printch, printhex8 etc)
which can be instrumented into the code in question as needed. These
can be written to do whatever the machine needs them to do (and
here I'm talking about the 40 or so different ARM platforms). However,
the machine has to supply enough information so that the initial page
table routines can set up the preliminary memory map in such a way that
a serial port or whatever is accessible.

One of the most useful places I've found is actually inside printk itself,
so if you do hit a fault, you get all the usual oops gubbings coming out.
I'm actually thinking about dropping out the debug routines apart from
printascii.

But yes, I'm looking at it from the developers point of view rather than
the users here.
_____
|_____| ------------------------------------------------- ---+---+-
| | Russell King rmk@arm.linux.org.uk --- ---
| | | | http://www.arm.linux.org.uk/personal/aboutme.html / / |
| +-+-+ --- -+-
/ | THE developer of ARM Linux |+| /|\
/ | | | --- |
+-+-+ ------------------------------------------------- /\\\ |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.067 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site