check MMU state
tglx at linutronix.de
Sun Apr 6 12:13:33 EST 2003
On Saturday 05 April 2003 20:31, Dan Malek wrote:
> Benjamin Herrenschmidt wrote:
> > Ah well, I was talking about the "common" CPU case (CONFIG_6xx), I don't
> > know about 8xx but since the first thing the code in head_8xx.S does is
> > "tlbia", I think you are in a bad situation running that with
> > translation enabled and no vectors around to handle the TLB miss...
> Well, it's worse then that.....if you have the MMU enabled and require
> taking tlb misses, I'm surprised you get to initial_mmu because we already
> wrote over the exception vectors.
> > For machines without BATs, I tend to think that a bootloader loading
> > you with MMU on shall be shot.
> We could do like some of the 60x/7xxx processors do. They boot with
> the MMU enabled, using BATs mapped 1:1 to get certain cache attributes in
> memory spaces (DINK does this). If you are using large pages on 8xx mapped
> 1:1 for the same cache attributes, it's OK. If _any_ powerpc boots with
> the MMU enabled and not 1:1 mapping (on memory of interest), you are hosed.
> > .... What I'd suggest is that you hack a piggy
> > back loader in the zImage wrapper that shuts MMU off before entering the
> > kernel.
> Yep, and it should be done right away before any of the decompress is
> done so the cache management works correctly.
> > .... If you _have_ to run vmlinux as is,
> You can't on 8xx and most embedded systems. You need some kind of
> piggyback loader to create the environment variables so Linux will boot
I'm working on a PMC board, where I can't modify the bootloader for now. So I
had to go through this. The kernel is loaded via PCI as a plain vmlinux, for
initrd applies the same.
I had to fight some time, but finaly i got it to work. :)
linutronix - competence in embedded & realtime linux
mail: tglx at linutronix.de
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-dev