Re: Specifying properly the PCI driver model on all linux architectur

Adrian Cox (apc@agelectronics.co.uk)
Wed, 03 Nov 1999 10:08:30 +0000


Jeff Garzik wrote:
[ snip ]
> Bret Indrelee wrote:
> > [ snip ]
> > Actually, my understanding is that the base_address[] is assigned in the PCI
> > configuration. The configuration registers are programmed with the PCI
> > physical address, and the base_address[] is set to the system physical
> > address (which may be different.)
>
> base_address[] is a bus address

But with multiple PCI buses, the base_address cannot be a simple bus
address, because the PCI bus number must be coded in there. For example,
on alpha the PCI_HANDLE from include/asm-alpha/pci.h is or'ed into the
base_address.

As far as I can tell, the base_address[] is always correct for ioremap.
But are the following two tricks valid:

1) Using the contents of base_address[] as an offset when mmapping
/dev/mem from userspace?

2) Using the contents of base_address[] as a target address for peer to
peer DMA on PCI?

- Adrian Cox, AG Electronics

-
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/