Re: The IO problem on multiple PCI busses

David S. Miller
2001-03-01T20:24:36Z

Benjamin Herrenschmidt writes:
> Also, the problem of finding where the legacy ISA IOs of a given PCI bus
> are is a bit different that simply mmap'ing a BAR. Some video cards
> require some access to their VGA IOs without having a BAR covering them,
> in some case it's necessary to switch the chip from VGA to MMIO mode.

Many platforms, sparc64 included, do not have an ISA IO space nor do
they provide VGA accesses at all.

If things such as XFree86 are coded for such platforms to not require
VGA accesses (the 'ati' driver is already like this when certain
build time defines are set), this could become a non-issue in this
case.

> So what would be a preferred way ? Create that fake ISA bus number and
> provide functions for looking them up, getting their IO and mem bases,
> and eventually mapping PCI busses to ISA busses ? Or does someone have a
> better idea ? The goal is to try not to change the semantics of inb/outb
> and friends so that most legacy drivers can still work using the
> "default" IO bus if they are not upgraded to the new scheme.

There is no 'fake' ISA bus number you need. There is a 'real' one,
the one on which the PCI-->ISA bridge lives, why not use that one
:-)

Then you could find such an ISA bridge, open that PCI device, then
finally perform the PCI_IOCTL_GETIOBASE thingy on it, but I don't like
this get-iobase idea at all, see my next email in this thread for why.

Later,
David S. Miller
davem@redhat.com