When running on armv6, set alignment checking to modulo-4 mode rather

than modulo-8, because clang emits ldrd and strd instructions for
addresses that are only 4-byte aligned
This commit is contained in:
Ian Lepore 2013-03-31 22:43:16 +00:00
parent 070cf887bb
commit 6fb87f7371
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=248962

View File

@ -27,6 +27,7 @@
*/
#include <machine/asm.h>
#include <machine/armreg.h>
/*
* Entry point to the loader that U-Boot passes control to.
@ -42,6 +43,13 @@ _start:
ldr ip, =saved_regs
str r8, [ip, #0]
#ifdef _ARM_ARCH_6
mrc p15, 0, r2, c1, c0, 0
orr r2, r2, #(CPU_CONTROL_UNAL_ENABLE)
orr r2, r2, #(CPU_CONTROL_AFLT_ENABLE)
mcr p15, 0, r2, c1, c0, 0
#endif
/* Start loader */
b main