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: Karel Gardas
Subject: Re: [Qemu-devel] Updated 3c509 NIC patch.
Date: Thu, 20 Jan 2005 18:13:04 +0100 (CET)

On Thu, 20 Jan 2005, Antony T Curtis wrote:

> > 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.

OK, Thanks for nice explanation.

> > 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)

Interesting, now I've scanned over the detection code
(ep_look_for_board_at) and found some:

                outb(id_port, 0);
                outb(id_port, 0);

where id_port is:

#ifdef PC98
#define ELINK_ID_PORT   0x71d0
#else
#define ELINK_ID_PORT   0x110
#endif


which looks excactly as the method you describe.

> 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.

I will certainly give it a try.

Thanks a lot,
Karel
--
Karel Gardas                  address@hidden
ObjectSecurity Ltd.           http://www.objectsecurity.com






reply via email to

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