Subject: Re: How netbsd-macppc use the BAT MMU
To: Matt Thomas <matt@3am-software.com>
From: Noah yan <noah.yan@gmail.com>
List: port-macppc
Date: 10/27/2005 07:31:44
------=_Part_51185_29086542.1130416304570
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Thanks for your answering.
 You mention that BAT is only used in kernel and The addresses mapped by
BATs and those by PTEs don't overlap, do you imply that the seg/page tables
are not setup for kernel?
 Is netbsd really use the segment MMU of the powerpc, I have an impression
that most kernel (such as linux) only use the page MMU?
 Thanks
Noah
 On 10/26/05, Matt Thomas <matt@3am-software.com> wrote:
>
> Noah yan wrote:
> > I am studying netbsd code for power mac g4. I am curious how netbsd use
> > the BAT MMU.
> > The address translation of BAT MMU is parallel with that of segment/pag=
e
> > MMU. BAT MMU is known as superpages in other architecture.
> > I am not good at the kernel coding part, hope that my questions share
> > the common fundermental with you and no stupid.
> >
> > Here is my questions:
> > Is the kernel turn BAT MMU on? if so, a BAT array have been setup for
> > that, which part of the netbsd code does this?
>
> Yes. The initppc code. for macppc, 0x80000000, 0xb0000000 and 0xf0000000
> as setup as io bats. in addition, all of physical memory in setup in
> the bat table.
>
> > If BAT MMU is used, how about segment/page address translation in
> > kernel, is this also enabled and page table is setup?
>
> The addresses mapped by BATs and those by PTEs don't overlap.
>
> > If both BAT and seg/page are enabled, how the kernel make sure that the
> > correct one is used in adress translation?
>
> It's only used in kernel.
>
> --
> Matt Thomas email: matt@3am-software.com
> 3am Software Foundry www: http://3am-software.com/bio/matt/
> Cupertino, CA disclaimer: I avow all knowledge of this message.
>

------=_Part_51185_29086542.1130416304570
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<div>Thanks for your answering.</div>
<div>&nbsp;</div>
<div>You mention that BAT is only used in kernel and The addresses mapped b=
y BATs and those by PTEs don't overlap, do you imply that the seg/page tabl=
es are not setup&nbsp;for kernel? </div>
<div>&nbsp;</div>
<div>Is netbsd really use the segment MMU of the powerpc, I have an impress=
ion that most kernel (such as linux) only use the page MMU?</div>
<div>&nbsp;</div>
<div>Thanks </div>
<div>Noah<br>&nbsp;</div>
<div><span class=3D"gmail_quote">On 10/26/05, <b class=3D"gmail_sendername"=
>Matt Thomas</b> &lt;<a href=3D"mailto:matt@3am-software.com">matt@3am-soft=
ware.com</a>&gt; wrote:</span>
<blockquote class=3D"gmail_quote" style=3D"PADDING-LEFT: 1ex; MARGIN: 0px 0=
px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Noah yan wrote:<br>&gt; I am stu=
dying netbsd code for power mac g4. I am curious how netbsd use<br>&gt; the=
 BAT MMU.
<br>&gt; The address translation of BAT MMU is parallel with that of segmen=
t/page<br>&gt; MMU. BAT MMU is known as superpages in other architecture.<b=
r>&gt; I am not good at the kernel coding part, hope that my questions shar=
e
<br>&gt; the common fundermental with you and no stupid.<br>&gt;<br>&gt; He=
re&nbsp;&nbsp;is my questions:<br>&gt; Is the kernel turn BAT MMU on? if so=
, a BAT array have been setup for<br>&gt; that, which part of the netbsd co=
de does this?
<br><br>Yes.&nbsp;&nbsp;The initppc code.&nbsp;&nbsp;for macppc, 0x80000000=
, 0xb0000000 and 0xf0000000<br>as setup as io bats.&nbsp;&nbsp;in addition,=
 all of physical memory in setup in<br>the bat table.<br><br>&gt; If BAT MM=
U is used, how about segment/page address translation in
<br>&gt; kernel, is this also enabled and page table is setup?<br><br>The a=
ddresses mapped by BATs and those by PTEs don't overlap.<br><br>&gt; If bot=
h BAT and seg/page are enabled, how the kernel make sure that the<br>&gt; c=
orrect one is used in adress translation?
<br><br>It's only used in kernel.<br><br>--<br>Matt Thomas&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp; email: <a href=3D"mailto:matt@3am-software.com=
">matt@3am-software.com</a><br>3am Software Foundry&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www: <a href=3D=
"http://3am-software.com/bio/matt/">
http://3am-software.com/bio/matt/</a><br>Cupertino, CA&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;disclaimer: =
I avow all knowledge of this message.<br></blockquote></div><br>

------=_Part_51185_29086542.1130416304570--