* [Qemu-devel] Qemu and Linux 2.4 @ 2007-09-11 12:31 Vlad Lungu 2007-09-11 12:54 ` Thiemo Seufer 2007-09-11 13:31 ` [Qemu-devel] " ralf 0 siblings, 2 replies; 11+ messages in thread From: Vlad Lungu @ 2007-09-11 12:31 UTC (permalink / raw) To: qemu-devel, linux-mips I know some of you will laugh, but: - QEMU malta emulation is not really complete, to put it mildly - the QEMU target is available only for Linux 2.6 - despite popular opinion, 2.4 ain't dead yet, at least in the embedded market I have a port of the QEMU target for Linux 2.4.34.4 (latest 2.4 kernel on linux-mips.org), with NE2000 card working (in both BE and LE modes). Still rough at the edges, but it works on stock qemu-0.9.0 with -M mips. If anyone is interested, I can send the patch by e-mail. I have no idea if I can post attachments to the list(s), that's why it's not attached. Vlad ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Qemu and Linux 2.4 2007-09-11 12:31 [Qemu-devel] Qemu and Linux 2.4 Vlad Lungu @ 2007-09-11 12:54 ` Thiemo Seufer 2007-09-11 13:39 ` Vlad Lungu 2007-09-11 13:31 ` [Qemu-devel] " ralf 1 sibling, 1 reply; 11+ messages in thread From: Thiemo Seufer @ 2007-09-11 12:54 UTC (permalink / raw) To: Vlad Lungu; +Cc: linux-mips, qemu-devel Vlad Lungu wrote: > I know some of you will laugh, but: > > - QEMU malta emulation is not really complete, to put it mildly Out of curiosity, what parts did you miss? > - the QEMU target is available only for Linux 2.6 > - despite popular opinion, 2.4 ain't dead yet, at least in the embedded > market > > > I have a port of the QEMU target for Linux 2.4.34.4 (latest 2.4 kernel on > linux-mips.org), with NE2000 card working (in both BE and LE modes). > Still rough at the edges, but it works on stock qemu-0.9.0 with -M mips. I recommend to improve the Qemu Malta emulation, and make it work with 2.4 Malta kernels. (ISTR it used to work, so it shouldn't need a lot to get there.) Thiemo ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Qemu and Linux 2.4 2007-09-11 12:54 ` Thiemo Seufer @ 2007-09-11 13:39 ` Vlad Lungu 2007-09-26 16:25 ` Alexander Voropay 0 siblings, 1 reply; 11+ messages in thread From: Vlad Lungu @ 2007-09-11 13:39 UTC (permalink / raw) To: Thiemo Seufer; +Cc: linux-mips, qemu-devel Thiemo Seufer wrote: > Vlad Lungu wrote: >> I know some of you will laugh, but: >> >> - QEMU malta emulation is not really complete, to put it mildly > > Out of curiosity, what parts did you miss? Like, for example, the PCI stuff. So I can use the network card. And yes, I am aware of YAMON. >> - the QEMU target is available only for Linux 2.6 >> - despite popular opinion, 2.4 ain't dead yet, at least in the embedded >> market >> >> >> I have a port of the QEMU target for Linux 2.4.34.4 (latest 2.4 kernel on >> linux-mips.org), with NE2000 card working (in both BE and LE modes). >> Still rough at the edges, but it works on stock qemu-0.9.0 with -M mips. > > I recommend to improve the Qemu Malta emulation, and make it work with > 2.4 Malta kernels. (ISTR it used to work, so it shouldn't need a lot to > get there.) I'm sure that improving the Qemu Malta emulation is a very noble goal, but for people that need a working 2.4 kernel NOW, my patch could be useful. Having the QEMU target in 2.6 surely helped me. Vlad ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Qemu and Linux 2.4 2007-09-11 13:39 ` Vlad Lungu @ 2007-09-26 16:25 ` Alexander Voropay 2007-09-26 16:59 ` Ralf Baechle ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Alexander Voropay @ 2007-09-26 16:25 UTC (permalink / raw) To: qemu-devel, Thiemo Seufer; +Cc: linux-mips, vlad <vlad@comsys.ro> wrote: >>> - QEMU malta emulation is not really complete, to put it mildly >> Out of curiosity, what parts did you miss? > Like, for example, the PCI stuff. So I can use the network card. PCI stuff in the QEMU/Malta works fine, but pseudo-bootrom does not perform PCI enumeration and leaves uninitialized PCI BARs. Linux MIPS/Malta 2.4 can not perform PCI enumeration too. The LANCE Ethernet driver *requres* a pre-initialized BARs. The situation even worse, since current Linux 2.4 can't be even built with NEW_PCI and PCI_AUTO options at all (due to linkage error). http://www.linux-mips.org/wiki/PCI_Subsystem There is the same PCI problem with NetBSD/evbmips and seems VxWorks/Malta. > And yes, I am aware of YAMON. AFAIK, YAMON may runs on the MIPS hardware only, and may not be redistribuded in the source or binary form. Anyway, YAMON binary does not work on the Qemu/Malta. The Galileo chip is far more complicated then Qemu emulation. It contains four DMA channels, four timers e.t.c. e.t.c. >> I recommend to improve the Qemu Malta emulation, and make it work with >> 2.4 Malta kernels. (ISTR it used to work, so it shouldn't need a lot to >> get there.) > > I'm sure that improving the Qemu Malta emulation is a very noble goal, > but for people that need a working 2.4 kernel NOW, my patch could be > useful. Having the QEMU target in 2.6 surely helped me. The only thing we need is a good bootrom (BIOS) for the MIPS/Malta (Free-YAMON ;) As a quick'n'disty solution you could initialize PCI BARs of the device number 12 (0x0b, LANCE) with GDB: (gdb) set variable {int}0xbbe00cf8=0x80005810 <--- I/O address (gdb) set variable {int}0xbbe00cfc=0x00002001 (gdb) set variable {int}0xbbe00cf8=0x80005814 <--- Mem address (gdb) set variable {int}0xbbe00cfc=0xfc200000 (gdb) set variable {int}0xbbe00cf8=0x80005804 <--- Enable Mem and I/O (gdb) set variable {int}0xbbe00cfc=0x00000003 (gdb) set variable {int}0xbbe00cf8=0x8000583c <---- IRQ=10 tied to Pin A (gdb) set variable {int}0xbbe00cfc=0xff06010a (gdb) cont Continuing. ... Linux version 2.4.35.3 (alec@ilias.nwpi.ru) (gcc version 3.3.6) #2 Tue Sep 25 18:59:10 MSD 2007 ... pcnet32.c:v1.30h 06.24.2004 tsbogend@alpha.franken.de pcnet32: PCnet/PCI II 79C970A at 0x2000, 52 54 00 12 34 56 assigned IRQ 10. eth0: registered as PCnet/PCI II 79C970A pcnet32: 1 cards_found. ... # lspci -v .... 00:0b.0 Class 0200: 1022:2000 (rev 10) Flags: bus master, fast devsel, latency 64, IRQ 10 I/O ports at 2000 [size=32] Memory at fc200000 (32-bit, non-prefetchable) [size=32] # ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up # # ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1): 56 data bytes 64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=4.2 ms -- -=AV=- ******************************************************************************************************* This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. Messages are susceptible to alteration. Orange Business Services shall not be liable for the message if altered, changed or falsified. If you are not the intended addressee of this message, please cancel it immediately and inform the sender. ******************************************************************************************************* ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Qemu and Linux 2.4 2007-09-26 16:25 ` Alexander Voropay @ 2007-09-26 16:59 ` Ralf Baechle 2007-09-27 10:06 ` Vlad Lungu 2007-09-26 17:12 ` Blue Swirl 2007-09-27 9:53 ` [Qemu-devel] Qemu and Linux 2.4 Vlad Lungu 2 siblings, 1 reply; 11+ messages in thread From: Ralf Baechle @ 2007-09-26 16:59 UTC (permalink / raw) To: Alexander Voropay; +Cc: linux-mips, qemu-devel, vlad On Wed, Sep 26, 2007 at 08:25:18PM +0400, Alexander Voropay wrote: > >>>- QEMU malta emulation is not really complete, to put it mildly > >>Out of curiosity, what parts did you miss? > >Like, for example, the PCI stuff. So I can use the network card. > > PCI stuff in the QEMU/Malta works fine, but pseudo-bootrom > does not perform PCI enumeration and leaves uninitialized PCI BARs. > > Linux MIPS/Malta 2.4 can not perform PCI enumeration too. The LANCE > Ethernet driver *requres* a pre-initialized BARs. The situation even worse, > since current Linux 2.4 can't be even built with NEW_PCI and PCI_AUTO > options at all (due to linkage error). > > http://www.linux-mips.org/wiki/PCI_Subsystem > > There is the same PCI problem with NetBSD/evbmips and seems VxWorks/Malta. Both CONFIG_PCI_NEW and PCI_AUTO were amazingly broken in both concept and implementation. It is possible to get them to work well for particular configurations but for the general case nothing else nothing but rewrite can rescue things. > >And yes, I am aware of YAMON. > > AFAIK, YAMON may runs on the MIPS hardware only, and may not > be redistribuded in the source or binary form. Alchemy boards run YAMON, too. > ******************************************************************************************************* > This message and any attachments (the "message") are confidential and > intended solely for the addressees. Any unauthorised use or dissemination Soley for all the billion internet users, I assume ;-) Ralf ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Qemu and Linux 2.4 2007-09-26 16:59 ` Ralf Baechle @ 2007-09-27 10:06 ` Vlad Lungu 0 siblings, 0 replies; 11+ messages in thread From: Vlad Lungu @ 2007-09-27 10:06 UTC (permalink / raw) To: qemu-devel Ralf Baechle wrote: > > Both CONFIG_PCI_NEW and PCI_AUTO were amazingly broken in both concept > and implementation. It is possible to get them to work well for particular > configurations but for the general case nothing else nothing but rewrite > can rescue things. > Hi Ralf, I found this the hard way :-( BTW, what's the status on the latest 2.4 patch I sent you? Vlad ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Qemu and Linux 2.4 2007-09-26 16:25 ` Alexander Voropay 2007-09-26 16:59 ` Ralf Baechle @ 2007-09-26 17:12 ` Blue Swirl 2007-09-27 9:59 ` Vlad Lungu 2007-09-27 9:53 ` [Qemu-devel] Qemu and Linux 2.4 Vlad Lungu 2 siblings, 1 reply; 11+ messages in thread From: Blue Swirl @ 2007-09-26 17:12 UTC (permalink / raw) To: Alexander Voropay, qemu-devel, openbios; +Cc: linux-mips, vlad On 9/26/07, Alexander Voropay <alec@nwpi.ru> wrote: > <vlad@comsys.ro> wrote: > > >>> - QEMU malta emulation is not really complete, to put it mildly > >> Out of curiosity, what parts did you miss? > > Like, for example, the PCI stuff. So I can use the network card. > > PCI stuff in the QEMU/Malta works fine, but pseudo-bootrom > does not perform PCI enumeration and leaves uninitialized PCI BARs. > > Linux MIPS/Malta 2.4 can not perform PCI enumeration too. The LANCE > Ethernet driver *requres* a pre-initialized BARs. The situation even worse, > since current Linux 2.4 can't be even built with NEW_PCI and PCI_AUTO > options at all (due to linkage error). > > http://www.linux-mips.org/wiki/PCI_Subsystem > > There is the same PCI problem with NetBSD/evbmips and seems VxWorks/Malta. > > > And yes, I am aware of YAMON. > > AFAIK, YAMON may runs on the MIPS hardware only, and may not > be redistribuded in the source or binary form. > > Anyway, YAMON binary does not work on the Qemu/Malta. The Galileo > chip is far more complicated then Qemu emulation. It contains four DMA > channels, four timers e.t.c. e.t.c. > > >> I recommend to improve the Qemu Malta emulation, and make it work with > >> 2.4 Malta kernels. (ISTR it used to work, so it shouldn't need a lot to > >> get there.) > > > > I'm sure that improving the Qemu Malta emulation is a very noble goal, > > but for people that need a working 2.4 kernel NOW, my patch could be > > useful. Having the QEMU target in 2.6 surely helped me. > > The only thing we need is a good bootrom (BIOS) for the MIPS/Malta > (Free-YAMON ;) Someone could port OpenBIOS or LinuxBIOS to MIPS. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Qemu and Linux 2.4 2007-09-26 17:12 ` Blue Swirl @ 2007-09-27 9:59 ` Vlad Lungu 2007-09-29 8:44 ` [Qemu-devel] U-Boot Vlad Lungu 0 siblings, 1 reply; 11+ messages in thread From: Vlad Lungu @ 2007-09-27 9:59 UTC (permalink / raw) To: qemu-devel Blue Swirl wrote: > > Someone could port OpenBIOS or LinuxBIOS to MIPS. > Well, just FYI: I sort-of-ported U-Boot to Qemu (-M mips). Network performance sucks for some reason (hard enough that tftp-booting a kernel is impossible) and I didn't have time to investigate this yet. But I guess that porting to (-M malta) should not be that hard, and I think there is some PCI support already in U-boot. Vlad ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Qemu-devel] U-Boot 2007-09-27 9:59 ` Vlad Lungu @ 2007-09-29 8:44 ` Vlad Lungu 0 siblings, 0 replies; 11+ messages in thread From: Vlad Lungu @ 2007-09-29 8:44 UTC (permalink / raw) To: qemu-devel Vlad Lungu wrote: lol, replying to myself > Blue Swirl wrote: > >> >> Someone could port OpenBIOS or LinuxBIOS to MIPS. >> > > Well, just FYI: > > I sort-of-ported U-Boot to Qemu (-M mips). Network performance sucks for > some reason (hard enough that tftp-booting a kernel is impossible) and I > didn't have time to investigate this yet. But I guess that porting to > (-M malta) should not be that hard, and I think there is some PCI > support already in U-boot. > Reports of poor network performance have been greatly exagerated. Apparently, what it happens is : - qemu doesn't respond with a next-server or server-name in DHCP, apparently - U-Boot uses broadcast in this case as the server address - things don't quite work Setting IP by hand or using tap for networking and configuring DHCP on the host correctly allows loading bt TFTP (or even nfs-booting with tap). I can boot a vmlinux with embedded ramdisk (a couple of Megs) in maybe 10 seconds. Still getting RX timeouts, but it's no big deal. I will polish the thing a little and post an update in 1-2 weeks max. Maybe we can have a bootrom for MIPS shipping with Qemu, after all. Even for malta. Vlad ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] Qemu and Linux 2.4 2007-09-26 16:25 ` Alexander Voropay 2007-09-26 16:59 ` Ralf Baechle 2007-09-26 17:12 ` Blue Swirl @ 2007-09-27 9:53 ` Vlad Lungu 2 siblings, 0 replies; 11+ messages in thread From: Vlad Lungu @ 2007-09-27 9:53 UTC (permalink / raw) To: Alexander Voropay, qemu-devel Alexander Voropay wrote: > <vlad@comsys.ro> wrote: > >>>> - QEMU malta emulation is not really complete, to put it mildly >>> Out of curiosity, what parts did you miss? >> Like, for example, the PCI stuff. So I can use the network card. > > PCI stuff in the QEMU/Malta works fine, but pseudo-bootrom > does not perform PCI enumeration and leaves uninitialized PCI BARs. > > Linux MIPS/Malta 2.4 can not perform PCI enumeration too. The LANCE > Ethernet driver *requres* a pre-initialized BARs. The situation even worse, > since current Linux 2.4 can't be even built with NEW_PCI and PCI_AUTO > options at all (due to linkage error). > > http://www.linux-mips.org/wiki/PCI_Subsystem > > There is the same PCI problem with NetBSD/evbmips and seems VxWorks/Malta. Well, that's a pretty big showstopper, don't you think? [snip] > The only thing we need is a good bootrom (BIOS) for the MIPS/Malta > (Free-YAMON ;) > > As a quick'n'disty solution you could initialize PCI BARs of the > device number 12 (0x0b, LANCE) with GDB: > > (gdb) set variable {int}0xbbe00cf8=0x80005810 <--- I/O address > (gdb) set variable {int}0xbbe00cfc=0x00002001 > (gdb) set variable {int}0xbbe00cf8=0x80005814 <--- Mem address > (gdb) set variable {int}0xbbe00cfc=0xfc200000 > (gdb) set variable {int}0xbbe00cf8=0x80005804 <--- Enable Mem and I/O > (gdb) set variable {int}0xbbe00cfc=0x00000003 > (gdb) set variable {int}0xbbe00cf8=0x8000583c <---- IRQ=10 tied to Pin A > (gdb) set variable {int}0xbbe00cfc=0xff06010a > (gdb) cont > Continuing. That's dirty alright, but not exactly quick. You kind of need gdb :-) Vlad ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Qemu-devel] Re: Qemu and Linux 2.4 2007-09-11 12:31 [Qemu-devel] Qemu and Linux 2.4 Vlad Lungu 2007-09-11 12:54 ` Thiemo Seufer @ 2007-09-11 13:31 ` ralf 1 sibling, 0 replies; 11+ messages in thread From: ralf @ 2007-09-11 13:31 UTC (permalink / raw) To: Vlad Lungu; +Cc: linux-mips, qemu-devel On Tue, Sep 11, 2007 at 03:31:31PM +0300, Vlad Lungu wrote: > I know some of you will laugh, but: > > - QEMU malta emulation is not really complete, to put it mildly > - the QEMU target is available only for Linux 2.6 > - despite popular opinion, 2.4 ain't dead yet, at least in the embedded > market It very much is for new product development. It's a long time that I've seen any 2.4-based development being started for new MIPS platforms. I basically get zero feedback for 2.4. The last patch submitted for 2.4 was on 2006-06-15 by Chris Dearman btw. Everything else since was just backported fixes from newer kernels and I've given up on that give the overwhelming feedback I keep receiving for 2.4. > I have a port of the QEMU target for Linux 2.4.34.4 (latest 2.4 kernel > on linux-mips.org), with NE2000 card working (in both BE and LE modes). > Still rough at the edges, but it works on stock qemu-0.9.0 with -M mips. Actually 2.4.35.2 / 2.4.36-pre1 are the latest. > If anyone is interested, I can send the patch by e-mail. I have no idea > if I can post attachments to the list(s), that's why it's not attached. I do take Linux 2.4 patches provided they don't destabilize the 2.4 branch. The few remaining user expect stability, not a Penguin action movie ;-) But aside of that, same submission guidelines as for 2.6. Cheers, Ralf ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2007-09-29 8:44 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-09-11 12:31 [Qemu-devel] Qemu and Linux 2.4 Vlad Lungu 2007-09-11 12:54 ` Thiemo Seufer 2007-09-11 13:39 ` Vlad Lungu 2007-09-26 16:25 ` Alexander Voropay 2007-09-26 16:59 ` Ralf Baechle 2007-09-27 10:06 ` Vlad Lungu 2007-09-26 17:12 ` Blue Swirl 2007-09-27 9:59 ` Vlad Lungu 2007-09-29 8:44 ` [Qemu-devel] U-Boot Vlad Lungu 2007-09-27 9:53 ` [Qemu-devel] Qemu and Linux 2.4 Vlad Lungu 2007-09-11 13:31 ` [Qemu-devel] " ralf
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).