summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMike Frysinger <vapier.adi@gmail.com>2009-03-05 17:33:36 +0800
committerBryan Wu <cooloney@kernel.org>2009-03-05 17:33:36 +0800
commitf7e989ab64f926e34bafea0752431e1fd6a618f3 (patch)
treeb0c070d0701209ef9045e4fb5eada70afe945d19 /arch
parent7acab7a9ca6b0c5b820f083424c57e6ac2031d9d (diff)
downloadop-kernel-dev-f7e989ab64f926e34bafea0752431e1fd6a618f3.zip
op-kernel-dev-f7e989ab64f926e34bafea0752431e1fd6a618f3.tar.gz
Blackfin arch: make sure people do not set the kernel load address too high
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/mach-common/arch_checks.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/blackfin/mach-common/arch_checks.c b/arch/blackfin/mach-common/arch_checks.c
index 98133b9..b3a2e3f 100644
--- a/arch/blackfin/mach-common/arch_checks.c
+++ b/arch/blackfin/mach-common/arch_checks.c
@@ -62,3 +62,8 @@
#if (CONFIG_BOOT_LOAD & 0x3)
# error "The kernel load address must be 4 byte aligned"
#endif
+
+/* The entire kernel must be able to make a 24bit pcrel call to start of L1 */
+#if ((0xffffffff - L1_CODE_START + 1) + CONFIG_BOOT_LOAD) > 0x1000000
+# error "The kernel load address is too high; keep it below 10meg for safety"
+#endif
OpenPOWER on IntegriCloud