Reserve the first 4K of phys ram for safety from errant drivers/hardware.
authorKen Sumrall <ksumrall@android.com>
Wed, 29 Sep 2010 03:40:59 +0000 (20:40 -0700)
committerColin Cross <ccross@android.com>
Thu, 7 Oct 2010 00:03:18 +0000 (17:03 -0700)
Signed-off-by: Ken Sumrall <ksumrall@android.com>
arch/arm/mach-tegra/board-stingray.c

index f013e6458499a671bcb4e408dc0e2eb2e122d976..ece5dd386322060a3e24c3d56614062719f66560 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/reboot.h>
 #include <linux/i2c-tegra.h>
 #include <linux/spi/cpcap.h>
+#include <linux/bootmem.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -1044,6 +1045,10 @@ static void __init tegra_stingray_init(void)
 
 void __init stingray_map_io(void)
 {
+       if (reserve_bootmem(0x0, 4096, BOOTMEM_EXCLUSIVE) != 0) {
+               printk(KERN_WARNING "Cannot reserve first 4K of memory for safety\n");
+       }
+
        tegra_map_common_io();
        stingray_fb_alloc();
 }