You may find yourself in a situation where the Linux kernel crashes or hangs without
any output on the console. The first attempt to get more information in such a situation
is a
Post Mortem dump of the log buffer - often the Linux kernel has already collected
useful information in its console I/O buffer which just does not get printed because the
kernel does not run until successful initialization of the console port.
Proceed as follows:
- Find out the virtual address of the log buffer;
For 2.4 Linux kernels search for "log_buf":
2.4 Linux:
bash$ grep log_buf System.map
c0182f54 b log_buf
Here the virtual address of the buffer is 0xC0182F54
For 2.6 kernels "__log_buf" must be used:
bash$ grep __log_buf System.map
c02124c4 b __log_buf
Here the virtual address of the buffer is 0xC02124C4
- Convert to physical address: on Power Architecture® systems, the kernel is usually configured for
a virtual address of kernel base (
CONFIG_KERNEL_START
) of 0xC0000000
.
Just subtract this value from the address you found. In our case we get:
physical address = 0xC0182F54 - 0xC0000000 = 0x00182F54
- Reset your board - do not power-cycle it!
- Use your boot loader (you're running U-Boot, right?) to print a memory dump of that
memory area:
=> md 0x00182F54
This whole operation is based on the assumption that your boot loader does not overwrite
the RAM contents - U-Boot will take care not to destroy such valuable information.