exynos4412 hangs on enabling MMU

Warner Losh imp at bsdimp.com
Tue Oct 30 16:08:34 UTC 2012


On Oct 30, 2012, at 8:36 AM, Ian Lepore wrote:

> On Tue, 2012-10-30 at 16:32 +0400, Ruslan Bukin wrote:
>> hello!
>> 
>> exynos hangs on mcr cmd in this context:
>> 
>> /* Enable MMU */
>> [..]
>> orr     r0, r0, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE)
>> mcr     p15, 0, r0, c1, c0, 0
>> [..]
>> 
>> without CPU_CONTROL_MMU_ENABLE flag, mcr command works,
>> but board hangs again on line:
>> str r3, [r1], #0x0004 /* get zero init data */
>> 
>> any suggestions?
>> 
>> -Ruslan
> 
> I don't have a direct answer to your question, but there is something
> related that I've always wondered about locore.S...  It starts by
> assuming the bootloader turned on the data cache, so it disables it,
> then it sets up TTB and TLB and other MMU-related stuff, then it turns
> back on the cache.  
> 
> Shouldn't it have flushed the cache in there somewhere before turning it
> back on?  
> 
> The part I don't know is whether the cache flush happens implicitly as a
> side effect of some of the other cp15 commands for setting up the MMU.
> 
> Also, I have no idea whether this is related or not, but on armv4
> platforms on -current, the kernel init locks up somewhere in initarm()
> about 20% of the time.  It locks up at different points, sometimes it
> only makes it few lines into initarm(), sometimes it gets almost to the
> end before locking up.  The variability makes me think it's somehow
> related to caching or the MMU or something like that.  It's a problem
> that never happens on freebsd 8, but I haven't had time yet to start
> bisecting the changes to see where it quit working.

I'd be interested in tracking that down...  I've been booting lots of armv5 boards lately and haven't seen this hang with current.

Warner


More information about the freebsd-arm mailing list