qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] ne2000 patches (now it works on win98)


From: Renzo Davoli
Subject: [Qemu-devel] ne2000 patches (now it works on win98)
Date: Sat, 27 Mar 2004 11:25:50 +0100
User-agent: Mutt/1.3.28i

I have found some bugs in the ne2k emulation:

- the 32K packet buffer is at address 16k (i.e. in the range 16k-48k)
(actually it is in the range 0-32k)
- there was no control of out-of-range access to the packet buffer
(the ugly win packet driver tests the ne2k memory by writing a pattern
at different addresses, no control=segmentation fault!)
- ioport_write EN0_ISR: the highest order bit (reset flag) must keep untouched
it is reset by the start command.
- the win driver needs the EN0_RSARLO and EN0_RSARHI management in
the ioport_read routine
(this very ugly win98_se driver instead of keeping a variable with the current
address rereads the address from the interface, very smart ;-)

I have been able to start and run win98 with vde. After the switch from
the clouded sky to the light blue background it seems that the O.S.
waits for a timeout (maybe something related to the DHCP negotiation of
the address -- my DHCP server is remote into a tunnel).
But,.... it works. (Also with multiple interfaces, -- Win98 is able to
use just one at a time, though).

The file here attached is the patch for hw/ne2000.c source file.
I have created a 48K memory but in the reality only the first 32 bytes +
the range 16k-48k is used, with an extra "if" the interface memory 
can be compacted.

Fabrice, I'd have some requests for the code....
I would like irq and iomem as well as MAC address for net interfaces to
be reconfigurable. Now I cannot put two qemu  machines on the same
virtual net as they pretend to have the same MAC.
Two questions:
- it is better to add command line options or a configuration file would
  help? It seems to me that you like command line options instead of
  configuration files: the pro is that the options are not hidden, the
  cons is that for complex configuration the command line can grow to
  unmanageable limits
- do you like me to write the code? it is just a coordination issue, it
  is useless for both to write the same code.

ciao and "happy hacking".

        renzo

Attachment: ne2000.c.diff
Description: Text document


reply via email to

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