From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHb58-000845-PG for qemu-devel@nongnu.org; Mon, 18 Mar 2013 10:30:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHb52-0002H1-EU for qemu-devel@nongnu.org; Mon, 18 Mar 2013 10:30:34 -0400 Received: from brest.ifremer.fr ([134.246.155.1]:36755) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHb52-0002DH-55 for qemu-devel@nongnu.org; Mon, 18 Mar 2013 10:30:28 -0400 Message-ID: <514724E6.6090406@genavir.fr> Date: Mon, 18 Mar 2013 15:29:58 +0100 From: Jean-Michel SCHRAMM MIME-Version: 1.0 References: <4753946136051117405@unknownmsgid> <20130317135145.561050yhiy36057l@vdmz1mail.ifremer.fr> <20130317160151.13356qa2i2zxwtlr@vdmz1mail.ifremer.fr> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] adding ports to the ss5. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Artyom Tarasenko Cc: "mark.cave-ayland" , breuerr , 'qemu-devel' Le 18/03/2013 14:27, Artyom Tarasenko a =E9crit : > Back to Europe from the Great Baikal lake. Nice... :-) >>> 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 persist= s >>> 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. >> >> OK, great info. I might try this when I will succeed getting new seria= l port >> to the prom. > Please publish the code to the qemu-devel list, if you make it. Arg! Unfortunately I think it is beyond my competences but I will give a=20 try. Another way would be to push Bob's upgrades, among them cg3.c to=20 the update qemu. So we could use openbios as Mark said and pass the=20 command in the script. > >> Well, I thought I had to had fields to the escc_init function because = I was >> understanding qemu_irq & CharDriverState fields as ttya and ttyb >> description. But I understand from your answser that I was confused by= the a >> & b channel for an escc port? >> But then where are the two intitialisation of ttya and ttyb? > Well the channels a and be are the ttya and ttyb (except that I'm not > sure whether the channel a is ttya or ttyb at the end). OK so it's like one Zylog port with two channels..? >> I think I lack understanting of this: >> >> slavio_serial_ms_kbd_init(hwdef->ms_kb_base, slavio_irq[14], >> display_type =3D=3D DT_NOGRAPHIC, ESCC_= CLOCK, 1); >> // Slavio TTYA (base+4, Linux ttyS0) is the first Qemu serial dev= ice >> // Slavio TTYB (base+0, Linux ttyS1) is the second Qemu serial de= vice >> escc_init(hwdef->serial_base, slavio_irq[15], slavio_irq[15], >> serial_hds[0], serial_hds[1], ESCC_CLOCK, 1); >> >> Especially the coment (no much comment in there :-) ) base+4 and base+= 0. I >> can't see where this is defined. > hwdef->serial_base is the physical address of the serial port ttyb. > And hwdef->serial_base+4 is the address of ttya. OK, I got the comment but I cannot see where this is done. I mean where=20 is it define in the code that base+4 address. The only parameter which=20 is passed to escc_init is base. > > I guess you just need a couple of more calls to escc_init with the > different base address and irq, incrementing serial_hds[] all the > time. Don't know how many ports can share the same irq line - there > may be limitations both on qemu and SunOS sides. Now that I had got the network working through a bridge, I have started=20 work on this issue this afternoon. > > Alternatively, you can use the PC rs232 ports. If SunOS 4.x does > support them. I've never saw them in the real sun4m machines. In the > sun4u device tree they are called "su". (The escc ports are called > "zs" - which I believe is the short form of "Zilog Serial"). ? I'll have a look at sun4u.c Thanks again, Cheers, Jean Michel > > Artyom > >>>> 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 fr= ee >>>>> 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 autocorrecte= d >>>>> typos. >>>>> >>>>> ----- Urspr=FCngliche 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 >>> >>> > >