linux/arch
Lennert Buytenhek 60296c71f6 [ARM] prevent crashing when too much RAM installed
This patch will truncate and/or ignore memory banks if their kernel
direct mappings would (partially) overlap with the vmalloc area or
the mappings between the vmalloc area and the address space top, to
prevent crashing during early boot if there happens to be more RAM
installed than we are expecting.

Since the start of the vmalloc area is not at a fixed address (but
the vmalloc end address is, via the per-platform VMALLOC_END define),
a default area of 128M is reserved for vmalloc mappings, which can
be shrunk or enlarged by passing an appropriate vmalloc= command line
option as it is done on x86.

On a board with a 3:1 user:kernel split, VMALLOC_END at 0xfe000000,
two 512M RAM banks and vmalloc=128M (the default), this patch gives:

	Truncating RAM at 20000000-3fffffff to -35ffffff (vmalloc region overlap).
	Memory: 512MB 352MB = 864MB total

On a board with a 3:1 user:kernel split, VMALLOC_END at 0xfe800000,
two 256M RAM banks and vmalloc=768M, this patch gives:

	Truncating RAM at 00000000-0fffffff to -0e7fffff (vmalloc region overlap).
	Ignoring RAM at 10000000-1fffffff (vmalloc region overlap).

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Tested-by: Riku Voipio <riku.voipio@iki.fi>
2008-08-09 15:38:15 +02:00
..
alpha [PATCH] sanitize __user_walk_fd() et.al. 2008-07-26 20:53:34 -04:00
arm [ARM] prevent crashing when too much RAM installed 2008-08-09 15:38:15 +02:00
avr32 avr32: Use <mach/foo.h> instead of <asm/arch/foo.h> 2008-08-05 14:36:57 +02:00
blackfin Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6 2008-07-26 13:23:17 -07:00
cris Merge branch 'linus' into core/generic-dma-coherent 2008-07-29 00:07:55 +02:00
frv FRV: Wire up new system calls 2008-08-01 13:03:49 -07:00
h8300 h8300: use generic show_mem() 2008-07-26 12:00:11 -07:00
ia64 [IA64] Move include/asm-ia64 to arch/ia64/include/asm 2008-08-01 10:21:21 -07:00
m32r m32r: use generic show_mem() 2008-07-26 12:00:11 -07:00
m68k remove unneeded #include <linux/ide.h>'s 2008-08-05 18:17:00 +02:00
m68knommu m68knommu: use generic show_mem() 2008-07-26 12:00:11 -07:00
mips remove unneeded #include <linux/ide.h>'s 2008-08-05 18:17:00 +02:00
mn10300 mn10300: Fix up __bug_table handling in module loader. 2008-08-04 17:22:17 -07:00
parisc [PATCH] sanitize __user_walk_fd() et.al. 2008-07-26 20:53:34 -04:00
powerpc powerpc: 86xx: mpc8610_hpcd: add watchdog node 2008-08-05 14:33:46 -07:00
s390 Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2008-08-04 17:15:07 -07:00
sh remove unneeded #include <linux/ide.h>'s 2008-08-05 18:17:00 +02:00
sparc sparc: Add __KERNEL__ ifdef protection to pt_regs helpers. 2008-07-31 20:32:35 -07:00
sparc64 sparc64: Remove all cpumask_t local variables in xcall dispatch. 2008-08-04 16:56:15 -07:00
um uml: fix tty-related build error 2008-07-30 09:41:45 -07:00
x86 Merge branch 'kvm-updates-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm 2008-08-01 12:48:16 -07:00
xtensa remove unneeded #include <linux/ide.h>'s 2008-08-05 18:17:00 +02:00
.gitignore arch: Ignore arch/i386 and arch/x86_64 2008-01-19 21:29:39 -08:00
Kconfig tracehook: CONFIG_HAVE_ARCH_TRACEHOOK 2008-07-26 12:00:09 -07:00