lkml.org 
[lkml]   [2011]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon panic
On 01/25/2011 02:45 PM, Jeff Garzik wrote:
> On 01/25/2011 05:16 PM, Randy Dunlap wrote:
>> On Tue, 25 Jan 2011 17:10:49 -0500 Mark Lord wrote:
>>
>>> On 11-01-25 12:05 PM, Ahmed S. Darwish wrote:
>>>>
>>>> My current x86 laptop includes the very common ATA PIIX controller.
>>>
>>>
>>> ata_piix is just about ideal for this sort of thing.
>>>
>>> Except, don't use the BIOS to write the logs,
>>> but rather code/use a very simple set of polling-PIO
>>> functions to talk directly through the PIIX to the drive.
>>>
>>> Really really simple code to do that, and it would likely
>>> work with anything ata-piix, and most other non-AHCI chipsets too.
>>>
>>> Not perfect, but probably good enough for a lot of scenarios.
>>> The old hd.c driver shows how to read/write a sector at a time,
>>> and that kind of code is easily converted to simply poll for completion.
>>
>> I don't know how/where to find it, but Rusty Russell had a version of this
>> many, many years ago.
>
> You beat me to the reply :)
>
> http://lwn.net/Articles/9905/
>
> but IIRC there were updates and improvements.
>

"Not perfect" is really not good enough. You're writing to the disk, so
it *has* to be perfect. That means dealing with having shared IDE/AHCI
device and doing the right thing, and the possibility that the kernel
has interrupts enabled, yadda yadda.

In the end you end up with something that looks, again, like kexec/kdump.

-hpa



\
 
 \ /
  Last update: 2011-01-26 00:09    [W:0.594 / U:0.124 seconds]
©2003-2014 Jasper Spaans. Advertise on this site