public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm: enable unaligned access on ARMv7
@ 2012-06-05 17:47 Lucas Stach
  2012-06-05 18:42 ` Stephen Warren
  0 siblings, 1 reply; 32+ messages in thread
From: Lucas Stach @ 2012-06-05 17:47 UTC (permalink / raw)
  To: u-boot

Recent toolchains default to using the hardware feature for unaligned access on
ARM v7, rather than doing the software fallback. According to ARM this is safe
as all v7 implementations have to support this feature.
(http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0471c/BABJFFAE.html)

To avoid CPU hangs when doing unaligned memory access, we have to turn off
alignment checking in our CPU initialisation code.
(http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491c/CIHCGCFD.html)

Signed-off-by: Lucas Stach <dev@lynxeye.de>
CC: Albert ARIBAUD <albert.u.boot@aribaud.net>
---
 arch/arm/cpu/armv7/start.S |    2 +-
 1 Datei ge?ndert, 1 Zeile hinzugef?gt(+), 1 Zeile entfernt(-)

diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index 261835b..52f7f6e 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -316,7 +316,7 @@ ENTRY(cpu_init_cp15)
 	mrc	p15, 0, r0, c1, c0, 0
 	bic	r0, r0, #0x00002000	@ clear bits 13 (--V-)
 	bic	r0, r0, #0x00000007	@ clear bits 2:0 (-CAM)
-	orr	r0, r0, #0x00000002	@ set bit 1 (--A-) Align
+	bic	r0, r0, #0x00000002	@ clear bit 1 (--A-) Align
 	orr	r0, r0, #0x00000800	@ set bit 11 (Z---) BTB
 #ifdef CONFIG_SYS_ICACHE_OFF
 	bic	r0, r0, #0x00001000	@ clear bit 12 (I) I-cache
-- 
1.7.10.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2012-07-20  7:12 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-05 17:47 [U-Boot] [PATCH] arm: enable unaligned access on ARMv7 Lucas Stach
2012-06-05 18:42 ` Stephen Warren
2012-06-05 19:06   ` Lucas Stach
2012-06-22  9:15     ` Albert ARIBAUD
2012-06-22  9:36       ` Lucas Stach
2012-06-22 11:16         ` Albert ARIBAUD
2012-06-22 11:47           ` Lucas Stach
2012-06-22 22:11             ` Aneesh V
2012-06-22 22:13               ` Aneesh V
2012-06-23  9:01                 ` Albert ARIBAUD
2012-06-23 17:43                   ` V, Aneesh
2012-06-25 20:34                     ` Albert ARIBAUD
2012-06-25 21:49                       ` Aneesh V
2012-06-25 22:02                         ` Wolfgang Denk
2012-06-23 19:50                   ` Måns Rullgård
2012-06-24  6:30                   ` Lucas Stach
     [not found]                     ` <20120625221741.3a32790e@lilith>
2012-06-25 21:34                       ` Lucas Stach
2012-06-26 20:56       ` Rob Herring
2012-06-27 10:14         ` Tetsuyuki Kobayashi
2012-07-02  9:42           ` [U-Boot] [PATCH] arm: armv7: add compile option -mno-unaligned-access if available Tetsuyuki Kobayashi
2012-07-02  9:53             ` Måns Rullgård
2012-07-02 15:16               ` Lucas Stach
2012-07-02 16:14                 ` Måns Rullgård
2012-07-03  7:10                   ` Tetsuyuki Kobayashi
2012-07-05  7:57                   ` Albert ARIBAUD
2012-07-18 21:37                     ` Albert ARIBAUD
2012-07-19  4:31                     ` Mike Frysinger
2012-07-19  4:29                   ` Mike Frysinger
2012-07-19  6:28                     ` Albert ARIBAUD
2012-07-19 14:27                       ` Mike Frysinger
2012-07-20  7:12                         ` Albert ARIBAUD
2012-07-12 15:12             ` Gary Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox