From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Albert Cahalan <acahalan@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: use of BAT before taking over the MMU
Date: Tue, 05 Oct 2010 19:09:19 +1100 [thread overview]
Message-ID: <1286266159.2463.335.camel@pasglop> (raw)
In-Reply-To: <AANLkTikPhpvJetY+NDFggYE6Wp6ppyt2BLmzEbsiwHuZ@mail.gmail.com>
On Sat, 2010-10-02 at 14:32 -0400, Albert Cahalan wrote:
> On the prom boot path, with the firmware supposed to
> be managing the MMU, there is a case where:
>
> 1. Linux changes some BAT registers.
> 2. Bits 0x00000070 are/become set in the MSR.
> 3. Linux takes an MMU fault.
Meeep ! Linux should never take an MMU fault at that point :-) If it
does, then there's a bug somewhere that needs squashing.
> 4. The firmware handles it.
>
> AFAIK, you can't expect the firmware to leave the BAT alone.
> If the firmware provides mapping services by using the BAT
> as a software-filled TLB, Linux's BAT changes may be lost.
>
> You also can't expect that your BAT changes will not conflict
> with mappings that the firmware uses for itself. The firmware
> might write to your new BAT mapping, relying on those virtual
> addresses to be something else entirely.
Right, which is why the moment Linux takes over the BATs, it shouldn't
call into FW anymore nor take faults.
Cheers,
Ben.
prev parent reply other threads:[~2010-10-05 8:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-02 18:32 use of BAT before taking over the MMU Albert Cahalan
2010-10-04 4:25 ` Segher Boessenkool
2010-10-04 16:06 ` Albert Cahalan
2010-10-05 7:54 ` Segher Boessenkool
2010-10-05 8:11 ` Benjamin Herrenschmidt
2010-10-05 8:10 ` Benjamin Herrenschmidt
2010-10-05 12:05 ` Albert Cahalan
2010-10-05 12:28 ` Benjamin Herrenschmidt
2010-10-05 15:31 ` Segher Boessenkool
2010-10-07 2:05 ` Albert Cahalan
2010-10-07 8:00 ` Benjamin Herrenschmidt
2010-10-05 15:22 ` Segher Boessenkool
2010-10-05 8:09 ` Benjamin Herrenschmidt [this message]
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=1286266159.2463.335.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=acahalan@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.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).