svn commit: r248962 - head/sys/boot/arm/uboot

Ian Lepore ian at FreeBSD.org
Sun Mar 31 22:43:17 UTC 2013


Author: ian
Date: Sun Mar 31 22:43:16 2013
New Revision: 248962
URL: http://svnweb.freebsd.org/changeset/base/248962

Log:
  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

Modified:
  head/sys/boot/arm/uboot/start.S

Modified: head/sys/boot/arm/uboot/start.S
==============================================================================
--- head/sys/boot/arm/uboot/start.S	Sun Mar 31 22:42:25 2013	(r248961)
+++ head/sys/boot/arm/uboot/start.S	Sun Mar 31 22:43:16 2013	(r248962)
@@ -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
 


More information about the svn-src-all mailing list