MIPS: KDUMP: fix for crashkernel to load from non-sectioned memory.

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

 



This only happens with kernels having initramfs builtin.
W.R.T following memory map, first kernel ends up in creating per-cpu crash notes (ELF PT_NOTE) in the higher memory area.
When a initramfs image is used, most often the crash_note ends up in "pfn's" belonging to 0x2000.0000

When crashkernel tries to access the PT_NOTEs (crash_notes per cpu variable) via __pfn_to_section <= pfn_to_page <= kmap, we end up in crash, as the sections belong to pfn 0x20006c00 (mem_section[2][0]) for a crash kernel is not populated.

Creating new mappings using ioremap solves the problem, which is pretty much what the patch does.

Determined physical RAM map:
 memory: 0000000004eff000 @ 0000000000100000 (usable)
 memory: 000000000a000000 @ 0000000005000000 (usable)   <<<< Crashkernel reserved area
 memory: 0000000030000000 @ 0000000020000000 (usable)

------------
mem_section[0][0]:0x8000000004180003
mem_section[1][0]:0x0
mem_section[2][0]:0x8000000003e00003
mem_section[3][0]:0x8000000003e00003
mem_section[4][0]:0x8000000003e00003
mem_section[5][0]:0x0
mem_section[6][0]:0x0  << Repeats rest of 1024 times >>

get_crash_notes_per_cpu: crash_notes addr = 20006c00
<<32 entries>>
get_crash_notes_per_cpu: crash_notes addr = 2013cc00


Crash Kernel
============
Determined physical RAM map:
 memory: 000000000a000000 @ 0000000005000000 (usable)
 memory: 0000000020000000 @ 0000000050000000 (usable)

------
mem_section[0][0]:0x8000000008184003
mem_section[1][0]:0x0
mem_section[2][0]:0x0
mem_section[3][0]:0x0
mem_section[4][0]:0x0
mem_section[5][0]:0x8000000007384003
mem_section[6][0]:0x8000000007384003
mem_section[7][0]:0x0    << Repeats rest of 1024 times >>


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux