Re: [patch 2.5] VGA IO on systems with multiple PCI IO domains

From: Benjamin Herrenschmidt (benh@kernel.crashing.org)
Date: Mon Jan 27 2003 - 12:55:04 EST


On Mon, 2003-01-27 at 11:40, Ivan Kokshaysky wrote:

> Then vgacon.c would be changed like this:
>
> ...
> - request_resource(&ioport_resource, &vga_console_resource);
> + if (legacy_ioport_remap(&vga_console_resource) < 0)
> + goto failure;
> ...
>
> And all in/out port calls would use respective resource.start+offset:
> ...
> - outb_p(6, 0x3ce)
> + outb_p(6, vga_console_resource.start + 0xe);
>
> No need for other special IO functions then.

Well, your example clearly limits us to one IO space for VGA, which
might not be what we want. The problem also exist for some fbdev drivers
which might need to tap the VGA IOs of a given PCI card (thus getting
access to the "legacy" IOs of the bus the card is on).
It would be nice to provide some more generic solution to deal with that
"ISA" problem...
Finally, in the embedded world, we frequently have to deal with "legacy"
controllers (ethernet, serial, ...) stuffed on whatever bus we have
around, at addresses that might not be usual port addresses.

It's definitely a good idea to always add a "base" to the legacy IOs as
your examples shows though. The problem remaining is how to actually
obtain this address for the various cases whe are interested in.

Ben.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jan 31 2003 - 22:00:17 EST