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: 2.1b_release~13866^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f7e989ab64f926e34bafea0752431e1fd6a618f3;p=platform%2Fkernel%2Fkernel-mfld-blackbay.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 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