From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ahmed S. Darwish" Subject: Re: [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon panic Date: Tue, 25 Jan 2011 19:05:22 +0200 Message-ID: <20110125170522.GA16285@laptop> References: <20110125134748.GA10051@laptop> <20110125140948.GA26762@elte.hu> <20110125153649.GA11386@laptop> <1295971355.4955.104.camel@mulgrave.site> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-wy0-f174.google.com ([74.125.82.174]:37695 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751973Ab1AYRFe (ORCPT ); Tue, 25 Jan 2011 12:05:34 -0500 Content-Disposition: inline In-Reply-To: <1295971355.4955.104.camel@mulgrave.site> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: James Bottomley Cc: Tejun Heo , Ingo Molnar , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , X86-ML , Tony Luck , Dave Jones , Andrew Morton , Randy Dunlap , Willy Tarreau , Willy Tarreau , Dirk Hohndel , Dirk.Hohndel@intel.com, IDE-ML , LKML , Linus Torvalds , Peter Zijlstra , =?iso-8859-1?Q?Fr=E9d=E9ric?= Weisbecker , Borislav Petkov , Arjan van de Ven , Jeff Garzik Hi! On Tue, Jan 25, 2011 at 11:02:35AM -0500, James Bottomley wrote: > On Tue, 2011-01-25 at 17:36 +0200, Ahmed S. Darwish wrote: > > The complete __roadblock__ I'm currently facing though is restoring the disk > > controllers to the state originally setup by the BIOS Power-on self-test (POST). > > I hope such re-initialization is even technically feasible. > > > > Without such re-initialization, we'll just be risking the BIOS code exploding. > > That was the case in the 5-minute hang described in the cover sheet (PATCH #0). > > So this is the bit that's not really technically feasible. BIOS tends > to run storage devices in a very primitive way (so it takes basic > settings, for example and sets the device up for one particular channel > of access). When preparing the device for an operating system, we have > to blow away all the bios stuff and put it into a more generally > performant mode (this isn't just the storage per se, it's also the > interrupt and routing). Unfortunately, currently, we don't bother to > save the settings the BIOS was using, so there's no way to reinitialise > the device back to bios without an effective reboot. > My current x86 laptop includes the very common ATA PIIX controller. If I dumped the PIC, IOAPIC, and disk controller state in a register file in a safe area, and re-initialized these before giving control to the BIOS, can this move the solution space from being not really technically feasible to "quite possible"? I have to admit that my knowledge of disk controllers is nil. The final result though can really be worth the effort (as stated by Ingo's mail), so I'm _willing_ to explore and prototype different paths. > > Most BIOS doesn't seem to contain storage re-POST code that's usable > (it's all embedded in the boot sequence). > There's this arcane `Warm boot with partial re-initialization' BIOS feature using the CMOS register 0xf, but I don't want to to depend on it either. > James > Thanks, -- Darwish http://darwish.07.googlepages.com