Re: Interesting case while taking Ramdump of Linux kernel based device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi sandeep,

On Sun, Jul 24, 2011 at 9:18 PM, sandeep kumar
<coolsandyforyou@xxxxxxxxx> wrote:
> Hi all,
> In Android target mobiles there is a facility called "Ramdump", where the
> entire Ram image is copied to a file
> as the kernel goes to panic.
>
> Ramdump is implemented like this
> 1) As the panic() function is called target will be reset.
> 2) Bootloader boots up in specific mode, where it enables the USB driver in
> uploading mode.
> 3) Through USB entire RAM content is copied to a file in the host computer.
> 4) This file is parsed through different tools and we can get the logs info
> wat exactly happened just before kernel panic happend.
>
>
> Now here is the interesting part,
> While the mobile's RAM image is being uploaded to host computer, our
> bootloader is still running in the mobile's RAM.
> How can it copy its own running region.
>
> This triggered me the following questions,
>
> 1) When bootloader runs, will it run in a specific reserved region of RAM or
> it takes entire RAM?

Some do - it depends on the processor. Some processors have a bunch of
internal static RAM that the bootloader runs out of.

> 2) When it hands over the control to kernel, will it relinquish the entire
> RAM or certain part of RAM is reserved for it?

Not sure.

> 3) Does kernel use the entire RAM while running?

It depends on how things are configured.

> 4) When the kernel is running, is ther any chance that, control again be
> taken back to bootloader?(coz i saw in bootloader code kernel is being
> called,
>
> after that code also some code is there,some printks and error handling
> stuff)

I don't think that the kernel ever gives  control back to the bootloader.

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux