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: Wed, 26 Jan 2011 15:34:00 +0200 Message-ID: <20110126133400.GA3399@laptop> References: <20110125134748.GA10051@laptop> <20110126124954.GC24527@laptop> <20110126125813.GA26952@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20110126125813.GA26952-X9Un+BFzKDI@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kexec-bounces-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Errors-To: kexec-bounces+glkk-kexec=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Ingo Molnar Cc: Willy Tarreau , Dirk Hohndel , =?iso-8859-1?Q?Fr=E9d=E9ric?= Weisbecker , FBDEV-ML , IDE-ML , Randy Dunlap , James Bottomley , "H. Peter Anvin" , X86-ML , Ingo Molnar , Jeff Garzik , Vivek Goyal , Peter Zijlstra , Dirk.Hohndel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, Borislav Petkov , Dave Jones , Thomas Gleixner , Andrew Morton , Arjan van de Ven , Tony Luck , KEXEC-ML , LKML , Haren Myneni , Eric Biederman List-Id: linux-ide@vger.kernel.org On Wed, Jan 26, 2011 at 01:58:13PM +0100, Ingo Molnar wrote: > > * Ahmed S. Darwish wrote: > > > - The latest approach (proposed by Linus) is to forget the disk: jump to > > real-mode, but display the kernel log in a fancy format (with scroll > > ups and downs) instead. > > > > Will re-initializing the VGA registers to their POST state be possible? > > If not, what about a "fail-safe" VGA driver? > > > > I'm most likely going to implement either the second or the third point, > > so I'd really appreciate some input. > > The third one suggested by Linus is the most useful and most direct one IMO. Such a > 'oops mode' screen would be useful for regular kernel crashes as well. > Yes, it is the safest approach. If I can make kexec and kdump work on early panics using some help from bootloaders though, that can possibly give us the feature of saving kernel logs to disk upon panics _without_ danger. I did not look at the kexec and kdump code bases yet, so this might be a pipe dream (respective developers are CCed -- input appreciated). > > Also, have you tried BIOS warm reset vector, which is supposed to reboot without > clearing RAM contents - how well does it work in practice on typical laptops? If on > crash we could reboot without memory getting cleared that would open up a vast area > of space to store the kernel log into (RAM). > AFAIK, the lmode->rmode transition is more forward-compatible. It seems the only place warm boot was documented is in the Intel MP spec, a 12-years old document long obsoleted by ACPI. Meanwhile, the real-mode transition is rigorously documented in the current Intel and AMD manuals, albeit in kind of a holier-than-thou approach. I'll investigate this further though. thanks, -- Darwish http://darwish.07.googlepages.com