[Top] [All Lists]

Re: [Qemu-devel] Qemu and Linux 2.4

To: <>, "Thiemo Seufer" <>
Subject: Re: [Qemu-devel] Qemu and Linux 2.4
From: "Alexander Voropay" <>
Date: Wed, 26 Sep 2007 20:25:18 +0400
Cc: <>, <>
Organization: NWPI
Original-recipient: rfc822;
References: <> <> <>
Reply-to: "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).

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

Linux version ( (gcc version 3.3.6) #2 Tue Sep 25 
18:59:10 MSD 2007
pcnet32.c:v1.30h 06.24.2004
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 netmask up
# ping
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=64 time=4.2 ms


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.

<Prev in Thread] Current Thread [Next in Thread>