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 15:11:53
--Apple-Mail-2-308937739
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

Yevgeny, if you follow my suggestion of inserting the PTEs in  
pmap_setup_segment0_map() AND modifying restore_ofmap(), then the  
early console should work.

Sanjay

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

>
> Let me make sure I understand: Currently, OFW is not expected to  
> work until after restore_ofmap() is called, right?
>
>> Currently, I insert page table entries for the OFW code+data in  
>> pmap_setup_segment0_map(). I think things will fare better if you  
>> add in PTEs (uncached) for the framebuffer  Also, you need to  
>> modify restore_ofmap() so that the map entries for the framebuffer  
>> are loaded into ofw_pmap.
>
> The issues I'm having occur within pmap_bootstrap(), before  
> restore_ofmap() is called. The goal is to be able to call printf()  
> at any point in the kernel code and have it do whatever it needs to  
> OFW to print out data. If we have to wait until restore_ofmap() is  
> called, what's the point of having an early console? I think there  
> has to be another way. What do you think about the callback  
> mechanism? Is it something worthwhile to pursue?
>
> Oh a thought I just had as I was reading over what I wrote: The  
> PPC64 PEM states that mtsrin instructions need to be followed, and  
> possibly also preceded, by a context-synchronizing instruction. But  
> these are absent in pmap_bootstrap(). Could this be a clue? I'll  
> test it out tomorrow.
>
> Thanks,
> Yevgeny


--Apple-Mail-2-308937739
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=ISO-8859-1

<HTML><BODY style=3D"word-wrap: break-word; -khtml-nbsp-mode: space; =
-khtml-line-break: after-white-space; ">Yevgeny, if you follow my =
suggestion of inserting the PTEs in=A0<FONT class=3D"Apple-style-span" =
face=3D"Monaco">pmap_setup_segment0_map() AND modifying restore_ofmap(), =
then the early console should work.</FONT><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV><FONT =
class=3D"Apple-style-span" face=3D"Monaco"></FONT>Sanjay</DIV><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: 12.0px Monaco; =
min-height: 16.0px"><BR></P> <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">Let me make sure I understand: Currently, OFW is not expected to =
work until after restore_ofmap() is called, right?</FONT></P> <P =
style=3D"margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; =
min-height: 16.0px"><BR></P> <BLOCKQUOTE type=3D"cite"><P style=3D"margin:=
 0.0px 0.0px 0.0px 10.0px"><FONT face=3D"Monaco" size=3D"3" style=3D"font:=
 12.0px Monaco">Currently, I insert page table entries for the OFW =
code+data in pmap_setup_segment0_map(). I think things will fare better =
if you add in PTEs (uncached) for the framebuffer<SPAN =
class=3D"Apple-converted-space">=A0 </SPAN>Also, you need to modify =
restore_ofmap() so that the map entries for the framebuffer are loaded =
into ofw_pmap.</FONT></P> </BLOCKQUOTE><P style=3D"margin: 0.0px 0.0px =
0.0px 0.0px; font: 12.0px Monaco; min-height: 16.0px"><BR></P> <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">The issues I'm having occur within =
pmap_bootstrap(), before restore_ofmap() is called. The goal is to be =
able to call printf() at any point in the kernel code and have it do =
whatever it needs to OFW to print out data. If we have to wait until =
restore_ofmap() is called, what's the point of having an early console? =
I think there has to be another way. What do you think about the =
callback mechanism? Is it something worthwhile to pursue?</FONT></P> <P =
style=3D"margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco; =
min-height: 16.0px"><BR></P> <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">Oh =
a thought I just had as I was reading over what I wrote: The PPC64 PEM =
states that mtsrin instructions need to be followed, and possibly also =
preceded, by a context-synchronizing instruction. But these are absent =
in pmap_bootstrap(). Could this be a clue? I'll test it out =
tomorrow.</FONT></P> <P style=3D"margin: 0.0px 0.0px 0.0px 0.0px; font: =
12.0px Monaco; min-height: 16.0px"><BR></P> <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">Thanks,</FONT></P> <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">Yevgeny</FONT></P> =
</BLOCKQUOTE></DIV><BR></DIV></DIV></BODY></HTML>=

--Apple-Mail-2-308937739--