Re: writing OOPS/panic info to nvram?

Paul Mackerras
2002-09-04T23:33:12Z

Alan Cox writes:

> With what will you write it - not the linux block layer thats for sure.
> Ingo has patches for doing network dumps which are kind of neat

Rusty has written a very basic polled-mode IDE driver for precisely
this situation. He even tested it on x86 and powermac. :) He has a
little user-space program that allocates a file and uses FIOBMAP to
work out which disk blocks it is using. The program writes a
signature to the blocks and then tells the kernel crashdump module the
block numbers. When the kernel panics, it calls the crashdump module
which first reads the blocks it was told and makes sure they have the
right signature, then writes the oops information to those blocks and
then reboots.

IDE was relatively straightforward since you can do basic block I/O
with just the ATA-1 or ATA-2 registers and command set and PIO. In
contrast, I believe SCSI defeated him. :)

Paul.