Subject: Re: Early kernel debugging

From: Benjamin Herrenschmidt <[email-masked]>
Date: Mon, 28 Mar 2011 10:25:16 +1100

On Sun, 2011-03-27 at 20:00 +0200, Philipp Ittershagen wrote:
> On 03/25/2011 09:50 AM, Guillaume Dargaud wrote:
> > Hello all,
> > what can you do when the kernel you try to run stops before printing anything on the console ?
> 
> http://elinux.org/Kernel_Debugging_Tips#Debugging_early_boot_problems
> 
> Basically it means connecting a debugger to the running kernel (using
> XMD, for example) and then reading the printk log buffer, which contains
> the last lines printed.

It actually mostly depends on the platform. There's various powerpc
specific early debug mechanisms that are more/less robust/functional
depending on the CPU type, the platform, etc...

Look in udbg.c, there's a list of early debug hacks in there controlled
by various config options.

Cheers,
Ben.