android - How are ramdumps generated on a system crash? -


in our project ramdumps other teams generated in case of system crash , need further investigation. working on utility keeps board specific data in ram , can later utilized debugging purpose. in order better understand environment/process in utility used trying figure information out.

till understand there watchdog running (software/hardware), triggered when fed in particular timeout duration. once triggered perform system reset through system registers.

now little fuzzy on when ramdumps generated , before/after reset, or needs other tool connected board through ramdumps captured.

i understand once ramdumps available can run parsers extract useful information or can use in debugger gdb further analyse state leading crash.

there plenty of tools analyse ramdump, in other words physical memory dump.

just imagine after reset condition of ram. in general, don't dump memory after reset before reset in-order memory analysis.


in detail ram-dump in linux system

is divided 3 sections based on how ramdump generated, transferred , stored.

  1. the support in kernel enter ramdump mode when kernel crashes or freezes.
  2. support in boot-loader detect ramdump, wait host tool initiate ramdump , send data host.
  3. a host tool can receive data device , save on host pc file system.

later need have bootloader support well, makes decision whether enter ramdump mode not boot linux normally.


ramdump generation during crash

the kernel panic notifier registered ramdump driver called kernel. ramdump driver do,

  1. invoke cache sycn api make sure content ram coherent.(flush_cache_all(), outer_flush_all())
  2. save core registers ram
  3. save mmu registers
  4. write magic_crash sram regiter. reboot. boot-loader finds magic_crash in sram register , goes ramdump mode.

very detailed information ramdump linux inspection.


you can try in fly

$ cat /proc/[your_pid]/maps , use gdb inspect $ gdb --pid [your_pid] 

some tools can you.

go through these lists find information (fatkit) foresnic analysis toolkit.foriana, etc.

  1. linux memory analysis tools
  2. how dump linux memory?

Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -