summaryrefslogtreecommitdiff
path: root/arch/blackfin/mach-common/arch_checks.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier.adi@gmail.com>2009-03-05 09:33:36 (GMT)
committerBryan Wu <cooloney@kernel.org>2009-03-05 09:33:36 (GMT)
commitf7e989ab64f926e34bafea0752431e1fd6a618f3 (patch)
treeb0c070d0701209ef9045e4fb5eada70afe945d19 /arch/blackfin/mach-common/arch_checks.c
parent7acab7a9ca6b0c5b820f083424c57e6ac2031d9d (diff)
downloadlinux-fsl-qoriq-f7e989ab64f926e34bafea0752431e1fd6a618f3.tar.xz
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/blackfin/mach-common/arch_checks.c')
-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