Apanic to EMMC?

527 views
Skip to first unread message

Rudolf Tammekivi

unread,
Feb 8, 2012, 10:34:50 AM2/8/12
to android...@googlegroups.com
Hello,

I have a device that has MMC card inside, with the partition table. My question is, if "panic" happens, can I use apanic module to save the log to MMC not to the MTD partition? I did try ram_console, but the problem with that is, my device's RAM is cleared out after restart, so I can't get the logs.

The platform is MSM7X30.

Regards,
Rudolf.

Jagadish K

unread,
Feb 11, 2012, 2:22:18 AM2/11/12
to android...@googlegroups.com
Hi,
During kernel panic, as the name suggests kernel is going to die. So its not a good idea to save logs at that time.
However, you can Register your function in panic_notifier_list. Your function will be called during panic. In that function, you can modify how the device should reboot or any other suitable action.
After arch_reset, ram dumps can be saved to mmc card either through bootloader or by using mini kernel concept (allow a separate kernel to boot which will save ram dumps into mmc).
Old Ram data exists till kernel boots again after reset. Not sure how in your case ram content is cleared. Ram data is cleared only when battery is removed.






--
Regards,
Jagadish K

yingchun li

unread,
Feb 14, 2012, 12:27:38 AM2/14/12
to android...@googlegroups.com
On Wed, Feb 8, 2012 at 11:34 PM, Rudolf Tammekivi <rtamm...@gmail.com> wrote:
> Hello,
>
> I have a device that has MMC card inside, with the partition table. My
> question is, if "panic" happens, can I use apanic module to save the log to
> MMC not to the MTD partition? I did try ram_console, but the problem with
> that is, my device's RAM is cleared out after restart, so I can't get the
> logs.
you cannot save the panic message to mmc card, you can check the code
drivers/misc/apanic.c,apanic use MTD method to save the log.

> The platform is MSM7X30.
>
> Regards,
> Rudolf.
>

Rudolf Tammekivi

unread,
Feb 14, 2012, 11:14:19 AM2/14/12
to Android Linux Kernel Development
The reason I think the RAM is cleared that ram_console reports
sig=0xffffffff after I restart it. Or is it supposed to be like this?
I'm a bit dumb at that part...

About mini kernel - it's the kdump kernel one, which should boot after
crash? Currently, I am trying to boot a custom kernel on the
"recovery" mode, and when it crashes, it reboots in "normal" mode.

A offtopic question - all those parameters after MACHINE_START
(.reserve, .init_early), in which order are those started?

On Feb 11, 9:22 am, Jagadish K <jagdish.kris...@gmail.com> wrote:
> Hi,
> During kernel panic, as the name suggests kernel is going to die. So its
> not a good idea to save logs at that time.
> However, you can Register your function in panic_notifier_list. Your
> function will be called during panic. In that function, you can modify how
> the device should reboot or any other suitable action.
> After arch_reset, ram dumps can be saved to mmc card either through
> bootloader or by using mini kernel concept (allow a separate kernel to boot
> which will save ram dumps into mmc).
> Old Ram data exists till kernel boots again after reset. Not sure how in
> your case ram content is cleared. Ram data is cleared only when battery is
> removed.
>

Jason Shim

unread,
Feb 14, 2012, 12:47:51 PM2/14/12
to android...@googlegroups.com
Hi,

In order to save apanic data into emmc, you need a emmc driver(should be polling mode because it's in atomic context at this time) as by default it's MTD.
There should be open source emmc polling mode driver available.

Thanks,
Jason Shim
Software Engineer, Motorola, Inc
Reply all
Reply to author
Forward
0 new messages