[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091122023237.GA6572@nowhere>
Date: Sun, 22 Nov 2009 03:32:39 +0100
From: Frederic Weisbecker <fweisbec@...il.com>
To: Maxim Levitsky <maximlevitsky@...il.com>
Cc: linux-kernel <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>,
Steven Rostedt <rostedt@...dmis.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: RFC: Put printk buffer in video ram
On Sun, Nov 22, 2009 at 04:05:06AM +0200, Maxim Levitsky wrote:
> After doing some successful debugging by placing printk buffer in video
> ram, here I publish cleaned version of it.
>
> I discovered that on my system video ram isn't cleared on reboot, and I
> took advantage of that by placing printk buffer directly there.
> This allows to capture oopses/panicks almost from everywhere.
> It is also very simple to setup.
>
>
> Best regards,
> Maxim Levitsky
>
> ---
>
> >From 77e0f4ffc531417d54ce928ade8481d82192b012 Mon Sep 17 00:00:00 2001
> From: Maxim Levitsky <maximlevitsky@...il.com>
> Date: Sun, 22 Nov 2009 03:49:04 +0200
> Subject: [PATCH] printk: Allow to store log buffer into video memory
>
> This patch adds new kernel parameter printk_address=
> that will allow it to store the printk buffer in arbitary
> (I/O) memory address.
>
> If you own a system that has discrete video ram, and it
> isn't cleared automatically by BIOS on reboot, you
> can use this as a black box recorder of crashes.
>
> If debugfs is enabled, log of last boot is copied into
> system ram, and can be accessed via debugfs, for example
> cat /sys/kernel/debug/printk/crash_dmesg
>
> Signed-off-by: Maxim Levitsky <maximlevitsky@...il.com>
> ---
> kernel/printk.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> lib/Kconfig.debug | 31 ++++++++++++++++
> 2 files changed, 133 insertions(+), 0 deletions(-)
kernel/printk.c does not seem to be the right place to do that
but rather in a specific console driver.
I would rather see it as an early console (for early printk), beside ttyS,
vga and usb debug ports.
Also, instead of creating another debugfs entry, you could just
trigger the trace to the ftrace ring buffer, using trace_printk()
for example.
Hm?
I personally would like to see such feature as I have no serial line
in my laptop, although I'm not sure my graphical card would be happy
with that...
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists