Subject: Re: personal impression of issues on netbsd/macppc
To: Tim Kelly <hockey@dialectronics.com>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: port-macppc
Date: 11/20/2004 13:11:17
Tim Kelly <hockey@dialectronics.com> writes:

> It appeared that I/O was unavailable, and without AHC_ALLOW_MEMIO, the
> mapping couldn't occur. With it back in -current, the card has worked
> fine, or at least MW reported it was fine and hasn't said anything
> since.

Right, so the question is "Why isn't I/O avaliable"? My guess would be
that OFW doesn't initialize the BARs as required by the PCI spec, but
I don't have such a card to actually examine the problem. If that is
really the problem, then a dose of NETBSD_PCI_CONFIGURE might be in order.

> From a performance point of view, is writing to I/O space faster or
> slower than writing to memory space? Because the above code appears to
> default to using I/O even if memory space is available.

From looking around at logs and FreeBSD discussion (where
AHC_ALLOW_MEMIO came from, along with most of the rest of the ahc
driver), I/O is preferred for this card because some i386 boxes get
the memory space wrong. Memory space is generally to be preferred. On
an i386 box memory-mapped access is usually faster (due to differences
between memory instructions and I/O-accessing instructions), but on
platforms where the CPU only has one address space (everything but
i386 and maybe amd64), they should be essentially equivalent. It's
certainly possible that a host-PCI bridge could be worse at one or the
other, but there's no fundamental reason for that to be the case.

        - Nathan