qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Fwd: Re: AW: adding ports to the ss5.


From: Jean-Michel SCHRAMM
Subject: [Qemu-devel] Fwd: Re: AW: adding ports to the ss5.
Date: Mon, 18 Mar 2013 15:29:23 +0100
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2




-------- Message original --------
Sujet: Re: AW: adding ports to the ss5.
Date : Sun, 17 Mar 2013 18:34:20 +0400
De : Artyom Tarasenko <address@hidden>
Pour : address@hidden
Copie à : breuerr <address@hidden>, "mark.cave-ayland" <address@hidden>


Hi Jean Michel,

On 3/17/13, address@hidden
<address@hidden> 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 <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]