All of lore.kernel.org
 help / color / mirror / Atom feed
* MIPS: KDUMP: fix for crashkernel to load from non-sectioned memory.
@ 2013-10-03  7:46 Prem Mallappa
  2013-10-03  7:46 ` [PATCH] MIPS: KDUMP: Fix to access " Prem Mallappa
  0 siblings, 1 reply; 5+ messages in thread
From: Prem Mallappa @ 2013-10-03  7:46 UTC (permalink / raw)
  To: linux-mips


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 >>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-10-03 20:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-03  7:46 MIPS: KDUMP: fix for crashkernel to load from non-sectioned memory Prem Mallappa
2013-10-03  7:46 ` [PATCH] MIPS: KDUMP: Fix to access " Prem Mallappa
2013-10-03 18:29   ` Ralf Baechle
2013-10-03 18:48     ` David Daney
2013-10-03 20:16       ` Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.