linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev <linuxppc-dev@lists.linuxppc.org>
Subject: Re: check MMU state
Date: Sat, 05 Apr 2003 18:23:30 +0200	[thread overview]
Message-ID: <200304051823.30693.tglx@linutronix.de> (raw)
In-Reply-To: <1049556246.654.7.camel@zion.wanadoo.fr>


On Saturday 05 April 2003 17:24, Benjamin Herrenschmidt wrote:
> On Sat, 2003-04-05 at 18:15, Thomas Gleixner wrote:
> > On Saturday 05 April 2003 16:49, Benjamin Herrenschmidt wrote:
> > > > Is there a clean way to check, if the MMU is enabled on kernel entry
> > > > ? I have to port Linux to a PMC-module, where the bootloader code
> > > > should not be changed.
> > >
> > > The kernel entry can cope with both cases, provided that early_init
> > > properly returns the physical address where the kernel is loaded,
> > > regardless of the translations setup by the bootloader. Also, the
> > > kernel has to be contiguous in physical memory.
> >
> > I don't reach early_init. The CPU is a 860 and I'm using 2.4.20-ben8. I
> > get lost in initial_mmu. If I turn off the mmu before "bl initial_mmu"
> > everything is fine.
>
> 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...
>
> For machines without BATs, I tend to think that a bootloader loading
> you with MMU on shall be shot. What I'd suggest is that you hack a piggy
> back loader in the zImage wrapper that shuts MMU off before entering the
> kernel. If you _have_ to run vmlinux as is, then stuff a bl to some code
> to disable the MMU before reaching initial_mmu in head_8xx.S
I have done this already, but just wanted to know, if there is a way to check
the mmu-state in case that the bootloader code is corrected some day.

--
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2003-04-05 16:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-05 15:35 check MMU state Thomas Gleixner
2003-04-05 14:49 ` Benjamin Herrenschmidt
2003-04-05 16:15   ` Thomas Gleixner
2003-04-05 15:24     ` Benjamin Herrenschmidt
2003-04-05 16:23       ` Thomas Gleixner [this message]
2003-04-05 16:03         ` Benjamin Herrenschmidt
2003-04-05 18:31       ` Dan Malek
2003-04-06  2:13         ` Thomas Gleixner
2003-04-07 13:53           ` Dan Malek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200304051823.30693.tglx@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).