From: Mike Frysinger Date: Thu, 5 Mar 2009 09:33:36 +0000 (+0800) Subject: Blackfin arch: make sure people do not set the kernel load address too high X-Git-Tag: v2.6.29-rc8~60^2~13 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=f7e989ab64f926e34bafea0752431e1fd6a618f3;p=~shefty%2Frdma-dev.git Blackfin arch: make sure people do not set the kernel load address too high Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- diff --git a/arch/blackfin/mach-common/arch_checks.c b/arch/blackfin/mach-common/arch_checks.c index 98133b968f7..b3a2e3fa15e 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