diff options
author | Mike Frysinger <vapier.adi@gmail.com> | 2008-08-06 17:10:57 +0800 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-08-06 17:10:57 +0800 |
commit | 1375204611f417541e55ee09e248acdbbb94356d (patch) | |
tree | 942acef30a954ac90e55ea1972c7dc406b476b81 /arch/blackfin | |
parent | 09e1f70e31ed6ca23dd42feb10aa104fc1b04c40 (diff) | |
download | op-kernel-dev-1375204611f417541e55ee09e248acdbbb94356d.zip op-kernel-dev-1375204611f417541e55ee09e248acdbbb94356d.tar.gz |
Blackfin arch: make sure the BSS and kernel load address are 4 byte aligned
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/kernel/vmlinux.lds.S | 1 | ||||
-rw-r--r-- | arch/blackfin/mach-common/arch_checks.c | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S index 0896e38..d062597 100644 --- a/arch/blackfin/kernel/vmlinux.lds.S +++ b/arch/blackfin/kernel/vmlinux.lds.S @@ -83,6 +83,7 @@ SECTIONS #if !L1_DATA_B_LENGTH *(.l1.bss.B) #endif + . = ALIGN(4); ___bss_stop = .; } diff --git a/arch/blackfin/mach-common/arch_checks.c b/arch/blackfin/mach-common/arch_checks.c index f9160d8..5986758 100644 --- a/arch/blackfin/mach-common/arch_checks.c +++ b/arch/blackfin/mach-common/arch_checks.c @@ -27,6 +27,7 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include <asm/fixed_code.h> #include <asm/mach/anomaly.h> #include <asm/mach-common/clocks.h> @@ -53,3 +54,11 @@ # endif #endif /* CONFIG_BFIN_KERNEL_CLOCK */ + +#if CONFIG_BOOT_LOAD < FIXED_CODE_END +# error "The kernel load address must be after the fixed code section" +#endif + +#if (CONFIG_BOOT_LOAD & 0x3) +# error "The kernel load address must be 4 byte aligned" +#endif |