Subject: Re: PowerPC G5 port update and Open Firmware woes
To: Yevgeny Binder <yevbee@comcast.net>
From: Sanjay Lal <sanjayl@kymasys.com>
List: port-macppc
Date: 07/10/2006 09:32:46
--Apple-Mail-1-288591301
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

Yevgeny, I looked @ ofwinit(), it seems to save the MSR and the SPRGs  
and not the MMU context. openfirmware() does extract the context from  
ofw_pmap but ofw_pmap is only valid after restore_ofmap.

Regards
sanjay


On Jul 10, 2006, at 2:56 AM, Yevgeny Binder wrote:

> But the ofwinit() routine in powerpc/oea/ofw_subr.S saves the  
> initial OFW context that exists before the kernel starts to load,  
> and the openfirmware() routine restores it prior to switching  
> control to OFW. Unless the code is faulty, all of the segment  
> registers should be loaded up to their correct virtual-mode values  
> before the branch to <openfirmware_entry>, and then subsequently  
> restored to whatever values the kernel had before, so that it  
> shouldn't make any difference if the kernel calls mtsrin or not.  
> What bothers me is that the code does seem to be buggy, but I can't  
> figure out how.


--Apple-Mail-1-288591301
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=US-ASCII

<HTML><BODY style=3D"word-wrap: break-word; -khtml-nbsp-mode: space; =
-khtml-line-break: after-white-space; ">Yevgeny, I looked @ ofwinit(), =
it seems to save the MSR and the SPRGs and not the MMU context. =
openfirmware() does extract the context from ofw_pmap but ofw_pmap is =
only valid after restore_ofmap.<DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>Regards</DIV><DIV>sanjay</DIV=
><DIV><BR class=3D"khtml-block-placeholder"><DIV><BR =
class=3D"khtml-block-placeholder"><DIV><DIV><DIV>On Jul 10, 2006, at =
2:56 AM, Yevgeny Binder wrote:</DIV><BR =
class=3D"Apple-interchange-newline"><BLOCKQUOTE type=3D"cite"><P =
style=3D"margin: 0.0px 0.0px 0.0px 0.0px"><FONT face=3D"Monaco" size=3D"3"=
 style=3D"font: 12.0px Monaco">But the ofwinit() routine in =
powerpc/oea/ofw_subr.S saves the initial OFW context that exists before =
the kernel starts to load, and the openfirmware() routine restores it =
prior to switching control to OFW. Unless the code is faulty, all of the =
segment registers should be loaded up to their correct virtual-mode =
values before the branch to &lt;openfirmware_entry&gt;, and then =
subsequently restored to whatever values the kernel had before, so that =
it shouldn't make any difference if the kernel calls mtsrin or not. What =
bothers me is that the code does seem to be buggy, but I can't figure =
out how.</FONT></P> =
</BLOCKQUOTE></DIV><BR></DIV></DIV></DIV></BODY></HTML>=

--Apple-Mail-1-288591301--