lkml.org 
[lkml]   [1999]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Specifying properly the PCI driver model on all linux architectur es, (ioremap(), bus_to_virt() ...)
Adrian Cox wrote:
>
> 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.

Right. For multiple buses you probably have to consider this a "cookie"
rather than a real address as well

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

Probably should get addresses from the PCI registers instead, unless
there is a portable macro which extracts the bus-specific address from
the bus address cookie

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

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.879 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site