aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-01-20 04:48:17 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-01-20 04:48:17 -0500
commit35f99c0da17beb5004f06ba86a87d82c1a6467be (patch)
treef8fe6d7c8c6b71374537bd3d9297a2fd0ee7b42b /arch/sh
parentd9116d07f60383cef134c43a0ba15ec4375310fc (diff)
sh: pretty print virtual memory map on boot.
This cribs the pretty printing from arch/x86/mm/init_32.c to dump the virtual memory layout on boot. This is primarily intended as a debugging aid, given that the newer CPUs have full control over their address space and as such have little to nothing in common with the legacy layout. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/mm/init.c38
1 files changed, 36 insertions, 2 deletions
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 491d9d5c8e0d..f3e23ad075cb 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -260,6 +260,9 @@ void __init mem_init(void)
260 memset(empty_zero_page, 0, PAGE_SIZE); 260 memset(empty_zero_page, 0, PAGE_SIZE);
261 __flush_wback_region(empty_zero_page, PAGE_SIZE); 261 __flush_wback_region(empty_zero_page, PAGE_SIZE);
262 262
263 /* Initialize the vDSO */
264 vsyscall_init();
265
263 codesize = (unsigned long) &_etext - (unsigned long) &_text; 266 codesize = (unsigned long) &_etext - (unsigned long) &_text;
264 datasize = (unsigned long) &_edata - (unsigned long) &_etext; 267 datasize = (unsigned long) &_edata - (unsigned long) &_etext;
265 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; 268 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
@@ -272,8 +275,39 @@ void __init mem_init(void)
272 datasize >> 10, 275 datasize >> 10,
273 initsize >> 10); 276 initsize >> 10);
274 277
275 /* Initialize the vDSO */ 278 printk(KERN_INFO "virtual kernel memory layout:\n"
276 vsyscall_init(); 279 " fixmap : 0x%08lx - 0x%08lx (%4ld kB)\n"
280#ifdef CONFIG_HIGHMEM
281 " pkmap : 0x%08lx - 0x%08lx (%4ld kB)\n"
282#endif
283 " vmalloc : 0x%08lx - 0x%08lx (%4ld MB)\n"
284 " lowmem : 0x%08lx - 0x%08lx (%4ld MB)\n"
285 " .init : 0x%08lx - 0x%08lx (%4ld kB)\n"
286 " .data : 0x%08lx - 0x%08lx (%4ld kB)\n"
287 " .text : 0x%08lx - 0x%08lx (%4ld kB)\n",
288 FIXADDR_START, FIXADDR_TOP,
289 (FIXADDR_TOP - FIXADDR_START) >> 10,
290
291#ifdef CONFIG_HIGHMEM
292 PKMAP_BASE, PKMAP_BASE+LAST_PKMAP*PAGE_SIZE,
293 (LAST_PKMAP*PAGE_SIZE) >> 10,
294#endif
295
296 (unsigned long)VMALLOC_START, VMALLOC_END,
297 (VMALLOC_END - VMALLOC_START) >> 20,
298
299 (unsigned long)memory_start, (unsigned long)high_memory,
300 ((unsigned long)high_memory - (unsigned long)memory_start) >> 20,
301
302 (unsigned long)&__init_begin, (unsigned long)&__init_end,
303 ((unsigned long)&__init_end -
304 (unsigned long)&__init_begin) >> 10,
305
306 (unsigned long)&_etext, (unsigned long)&_edata,
307 ((unsigned long)&_edata - (unsigned long)&_etext) >> 10,
308
309 (unsigned long)&_text, (unsigned long)&_etext,
310 ((unsigned long)&_etext - (unsigned long)&_text) >> 10);
277 311
278 mem_init_done = 1; 312 mem_init_done = 1;
279} 313}