Re: proper ioport space allocation

Stephen Williams (steve@icarus.com)
Thu, 17 Dec 1998 14:18:00 -0800


mj@atrey.karlin.mff.cuni.cz said:
> In the olden IBM days ISA cards were decoding only low 10 bits of port
> address and there still exist such cards

mj@atrey.karlin.mff.cuni.cz said:
> Anyway, these rules don't apply in PCI world, so PCI cards can freely
> use large continuous chunks of address space.

Hah!-)

PCI Local Bus Specification Appendix D Base Class 03h
(03h Subclass 00h, interface 00000000b)

"VGA Compatible controller. Memory address 0a0000h thru 0bffffh
I/O addresses 3b0h to 3bbh and 3c0h to 3dfh and all aliases of
these addresses."

So if you have a VGA device, lots of your I/O address space has just been
defined away, even in PCI. (Remember, these are PCI VGA cards!) It gets better:

PCI Local Bus Specification 6.2.5.1. Address Maps
"Devices that map control functions into I/O Space may not
consume more then 256 bytes per I/O Base Address register."

This obviously doesn't apply to memory mapped I/O, which has no size
limit. This rule clearly exists to give the BIOS a fighting chance to
place devices in the face of VGA insanity.

Now it is typical for ISA devices to be placed behind a PCI-to-ISA bridge
that does (I think) subtractive decoding so that the aliases of legacy
devices can be overridden, but I for one avoid I/O address space like the
plague.

(Things get kinda surreal when you have an ISA card that has a 0x1000byte
I/O region. I heard from a guy on an NT list that is facing such a device.)

-- 
Steve Williams                "The woods are lovely, dark and deep.
steve@icarus.com              But I have promises to keep,
steve@picturel.com            and lines to code before I sleep,
http://www.picturel.com       And lines to code before I sleep."

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