Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Oct 2012 08:36:43 -0600
From:      Ian Lepore <freebsd@damnhippie.dyndns.org>
To:        Ruslan Bukin <br@bsdpad.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: exynos4412 hangs on enabling MMU
Message-ID:  <1351607803.1120.27.camel@revolution.hippie.lan>
In-Reply-To: <20121030123231.GA91006@jail.io>
References:  <20121030123231.GA91006@jail.io>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

-- Ian





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1351607803.1120.27.camel>