qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Antony T Curtis <antony.t.curtis@ntlworld.com>
To: Karel Gardas <kgardas@objectsecurity.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Updated 3c509 NIC patch.
Date: Thu, 20 Jan 2005 16:56:24 +0000	[thread overview]
Message-ID: <1106240185.75381.25.camel@pcgem.rdg.cyberkinetica.com> (raw)
In-Reply-To: <Pine.LNX.4.43.0501201602050.806-100000@thinkpad.gardas.net>

[-- Attachment #1: Type: text/plain, Size: 2954 bytes --]

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                  kgardas@objectsecurity.com
> ObjectSecurity Ltd.           http://www.objectsecurity.com
> 
-- 
Antony T Curtis, BSc.                   UNIX, Linux, *BSD, Networking
antony.t.curtis@ntlworld.com            C++, J2EE, Perl, MySQL, Apache
+44-(118)-377-3247                      IT Consultancy.

[-- Attachment #2: qemu-3c509b.20050120b.patch.gz --]
[-- Type: application/x-gzip, Size: 8906 bytes --]

  reply	other threads:[~2005-01-20 17:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.43.0501201031360.806-100000@thinkpad.gardas.net>
2005-01-20 12:17 ` [Qemu-devel] Updated 3c509 NIC patch Antony T Curtis
2005-01-20 15:07   ` Karel Gardas
2005-01-20 16:56     ` Antony T Curtis [this message]
2005-01-20 17:13       ` Karel Gardas
2005-01-20 20:15         ` Karel Gardas
2005-01-20 21:21           ` Antony T Curtis
2005-01-20 21:54             ` Karel Gardas
2005-01-19 10:51 Karel Gardas
2005-01-19 13:09 ` Antony T Curtis
2005-01-19 17:28 ` Antony T Curtis
2005-01-19 18:59   ` Karel Gardas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1106240185.75381.25.camel@pcgem.rdg.cyberkinetica.com \
    --to=antony.t.curtis@ntlworld.com \
    --cc=kgardas@objectsecurity.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).