From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHb4O-00067O-Bj for qemu-devel@nongnu.org; Mon, 18 Mar 2013 10:29:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHb4K-0001lo-VZ for qemu-devel@nongnu.org; Mon, 18 Mar 2013 10:29:47 -0400 Received: from brest.ifremer.fr ([134.246.155.1]:36574) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHb4K-0001lN-Lj for qemu-devel@nongnu.org; Mon, 18 Mar 2013 10:29:44 -0400 Received: from brehat.ifremer.fr (brehat.ifremer.fr [134.246.166.1]) by brest.ifremer.fr (8.14.5/8.14.5) with ESMTP id r2IETg9i011273 for ; Mon, 18 Mar 2013 15:29:42 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by brehat.ifremer.fr (Postfix) with ESMTP id 4A3D32938AC for ; Mon, 18 Mar 2013 15:29:42 +0100 (CET) Received: from brehat.ifremer.fr ([127.0.0.1]) by localhost (brehat.ifremer.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L+viwv4fufjn for ; Mon, 18 Mar 2013 15:29:42 +0100 (CET) Received: from [134.246.147.85] (br147-085.ifremer.fr [134.246.147.85]) by brehat.ifremer.fr (Postfix) with ESMTP id D0D4C2938A9 for ; Mon, 18 Mar 2013 15:29:41 +0100 (CET) Message-ID: <514724C3.1040205@genavir.fr> Date: Mon, 18 Mar 2013 15:29:23 +0100 From: Jean-Michel SCHRAMM MIME-Version: 1.0 References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------030006040208070507000207" Subject: [Qemu-devel] Fwd: Re: AW: adding ports to the ss5. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'qemu-devel' This is a multi-part message in MIME format. --------------030006040208070507000207 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by brest.ifremer.fr id r2IETg9i011273 -------- Message original -------- Sujet: Re: AW: adding ports to the ss5. Date : Sun, 17 Mar 2013 18:34:20 +0400 De : Artyom Tarasenko Pour : Jean.Michel.Schramm@genavir.fr Copie =E0 : breuerr , "mark.cave-ayland"=20 Hi Jean Michel, On 3/17/13, Jean.Michel.Schramm@genavir.fr wrote: > Is there a way to write to prom image ss5.bin? nvalias command does > not work because there's no nvram? There is a nvram. But the proprietary firmware OBP - uses a different layout than OpenBIOS. The current implementation of nvram doesn't persist its content after shutting down or a hard reset. But, for your experiments a soft-reset should be enough. Just use the 'reset' command from the OBP ok prompt. It should be possible to add some code to qemu that it would read/write the contents of the nvram to a file. > Does this ss5.bin is a merely > direct copy of the real PROM? Yes. ss5.bin is a copy of a real PROM. > we cannot pass command > through qemu start like -option-rom or -prom-env if not using > openbios. We can not, because the layout is different. > So is there a way to modify ss5.bin? None that I know of. If you have to use the proprietary firmware (ss5.bin, ss20.bin and so on), I think extending qemu that it persists nvram is the way to go. I think the initialization of the nvram happens in sun4m.c. At least it used to be there. You'd have to add some option like -nvram=3Dfile.bin which would disable -prom-env options. > To add ports I am trying to modify sun4m.c and escc.c and add fields > qemu_irq & CharDriverState to the escc_init function. Is that the > correct way to do it? I think so. Except that I'm not sure you have to modify escc.c. But I'm sitting at the airport and don't have qemu sources handy. > The point is I do not understand everything in the code (I have the > formation but not been a developer for past couple of decade..). For > example I don't understand the line: > #define CHN_C(s) ((s)->chn =3D=3D chn_b? 'b' : 'a') An ESCC port has two channels (physical ports) which are called 'a' and '= b'. Artyom > I know Mark said we should put this cg3 and other good stuff to the > updated version but I am powerless on this point. though I understand > it would be very nice to boot on openbios. > > Thanks again for your help. > > Cheers all. > Jean Michel > > > > > Artyom Tarasenko a =E9crit : > >> ss5.bin doesn't auto detect the ports. You'll have to execute some >> Forth commands at the OBP "ok" prompt to make them visible in the >> device tree. Can't tell the exact commands right now. There is a free >> book "writing device drivers" (the name might be not exact) from >> Sun/Oracle. You can try looking up the example there. >> >> Artyom >> >> Sent from a mobile phone. Please excuse my brevity and autocorrected >> typos. >> >> ----- Urspr=FCngliche Nachricht ----- >> Von: Jean-Michel SCHRAMM >> Gesendet: 15.03.2013 19:02 >> An: Artyom Tarasenko >> Betreff: adding ports to the ss5. >> >> > > > > --=20 Regards, Artyom Tarasenko solaris/sparc under qemu blog: http://tyom.blogspot.com/search/label/qemu --------------030006040208070507000207 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit


-------- Message original --------
Sujet: Re: AW: adding ports to the ss5.
Date : Sun, 17 Mar 2013 18:34:20 +0400
De : Artyom Tarasenko <atar4qemu@gmail.com>
Pour : Jean.Michel.Schramm@genavir.fr
Copie à : breuerr <breuerr@mc.net>, "mark.cave-ayland" <mark.cave-ayland@ilande.co.uk>


Hi Jean Michel,

On 3/17/13, Jean.Michel.Schramm@genavir.fr
<Jean.Michel.Schramm@genavir.fr> wrote:
> Is there a way to write to prom image ss5.bin? nvalias command does
> not work because there's no nvram?

There is a nvram. But the proprietary firmware OBP - uses a different
layout than OpenBIOS. The current implementation of nvram doesn't
persist its content after shutting down or a hard reset. But, for your
experiments a soft-reset should be enough. Just use the 'reset'
command from the OBP ok prompt.

It should be possible to add some code to qemu that it would
read/write the contents of the nvram to a file.

> Does this ss5.bin is a merely
> direct copy of the real PROM?

Yes. ss5.bin is a copy of a real PROM.

> we cannot pass command
> through qemu start like -option-rom or -prom-env if not using
> openbios.

We can not, because the layout is different.

> So is there a way to modify ss5.bin?

None that I know of. If you have to use the proprietary firmware
(ss5.bin, ss20.bin and so on), I think extending qemu that it persists
nvram is the way to go. I think the initialization of the nvram
happens in sun4m.c. At least it used to be there. You'd have to add
some option like -nvram=file.bin which would disable -prom-env
options.

> To add ports I am trying to modify sun4m.c and escc.c and add fields
> qemu_irq & CharDriverState to the escc_init function. Is that the
> correct way to do it?

I think so. Except that I'm not sure you have to modify escc.c. But
I'm sitting at the airport and don't have qemu sources handy.

> The point is I do not understand everything in the code (I have the
> formation but not been a developer for past couple of decade..). For
> example I don't understand the line:
> #define CHN_C(s) ((s)->chn == chn_b? 'b' : 'a')

An ESCC port has two channels (physical ports) which are called 'a' and 'b'.

Artyom


> I know Mark said we should put this cg3 and other good stuff to the
> updated version but I am powerless on this point. though I understand
> it would be very nice to boot on openbios.
>
> Thanks again for your help.
>
> Cheers all.
> Jean Michel
>
>
>
>
> Artyom Tarasenko <atar4qemu@gmail.com> a écrit&nbsp;:
>
>> ss5.bin doesn't auto detect the ports. You'll have to execute some
>> Forth commands at the OBP "ok" prompt to make them visible in the
>> device tree. Can't tell the exact commands right now. There is a free
>> book "writing device drivers" (the name might be not exact) from
>> Sun/Oracle. You can try looking up the example there.
>>
>> Artyom
>>
>> Sent from a mobile phone. Please excuse my brevity and autocorrected
>> typos.
>>
>> ----- Ursprüngliche Nachricht -----
>> Von: Jean-Michel SCHRAMM
>> Gesendet: 15.03.2013 19:02
>> An: Artyom Tarasenko
>> Betreff: adding ports to the ss5.
>>
>>
>
>
>
>


-- 
Regards,
Artyom Tarasenko

solaris/sparc under qemu blog: http://tyom.blogspot.com/search/label/qemu



--------------030006040208070507000207--