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: MMI-PSA29.97-13-9~29365^2~13 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f7e989ab64f926e34bafea0752431e1fd6a618f3;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.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 98133b968f7b..b3a2e3fa15e3 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