qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Updated 3c509 NIC patch.


From: Antony T Curtis
Subject: Re: [Qemu-devel] Updated 3c509 NIC patch.
Date: Thu, 20 Jan 2005 16:56:24 +0000

On Thu, 2005-01-20 at 16:07 +0100, Karel Gardas wrote:
> On Thu, 20 Jan 2005, Antony T Curtis wrote:
> 
> > On Thu, 2005-01-20 at 10:31 +0100, Karel Gardas wrote:
> > > On Wed, 19 Jan 2005, Antony T Curtis wrote:
> > >
> > > > Hi,
> > > >
> > > > I think I have found the bug... will be making a new patch soon.
> > >
> > > Great! Thanks!
> >
> > Actually, I have not only found the bug you encountered, but I have
> > found some other bugs in the implementation.
> >
> > I have also implemented a "info pnp" command.
> >
> > I have tested it with the following guests: FreeBSD 4, NetBSD 2 and
> > Linux (Mandrake 8) with up to 4 NICs configured (dummynet).
> 
> It seems you have not fixed one of issue I've discivered and fixed in my
> patch:

<snip>

Oops, I forgot to copy that file over from my working directory. Have
attached an updated diff.

> Anyway, I'm curious how have you made it working under NetBSD 2.0. I'm
> just trying boot1/2.fs and bootlap1/2.fs floppies sets but 3c509 is
> detected only in the first and it is detected on the wrong addr/irq.

It simply auto-detected it and worked. Some operating systems will
reprogram a ISA-PnP device to use different resources than what they
start with - so the port/irq it appears on after the PnP isolation
process may appear to be 'wrong'. Don't worry, it is normal.

Operating systems when using ISA-PnP should...
1. detect and then 'turn off' all ISA-PnP devices.
2. detect all non PnP devices and setup drivers.
3. 'turn on' one ISA-PnP device at a time making sure it doesn't
conflict with existing devices IO/IRQ space, reconfiguring where
neccessary.

> The reason why I'm trying this is that I'm not able to get 3c509 working
> under RTEMS, which is my goal, since ne2k emulation does not work well for
> RTEMS 4.6.x

Hmm... Looking at some RTEMS source code, I have found:

> printf("ep%d: 3c5x9 at 0x%x in PnP mode. Disable PnP mode!\n",
>                                 is->id_unit, IS_BASE );

That seems to indicate that RTEMS uses the deprecated 3Com-specific
detection, and not the ISA-PnP isolation method.

Which gives 2 options... either modify RTEMS to understand PnP 3c509...
or implement the 3Com detection method. The 3Com method requires the
device to "monitors all write access to I/O port 01x0h where x is any
hex digit." That is non-trivial for a QEmu driver to do cleanly. (which
is the reason why I didn't implement it)

I would say that your safest and most easiest way forward is to use the
3c509 in it's "powered on" configuration, and set the RTEMS driver to
use it at that IO/IRQ without the automagic probe.

> Thanks,
> Karel
> --
> Karel Gardas                  address@hidden
> ObjectSecurity Ltd.           http://www.objectsecurity.com
> 
-- 
Antony T Curtis, BSc.                   UNIX, Linux, *BSD, Networking
address@hidden            C++, J2EE, Perl, MySQL, Apache
+44-(118)-377-3247                      IT Consultancy.

Attachment: qemu-3c509b.20050120b.patch.gz
Description: GNU Zip compressed data


reply via email to

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