On Tue, Oct 21, 2003 at 02:24:19PM +0200, Erez Doron wrote: > afaik, /proc/bus/pci/XX/YY is configuration space and not memory space it is configuration space when you read/write it and memory space when you mmap it. Look up the implementation of mmap for this file in kernel (drivers/pci/proc.c) Newest XFree86 uses this method instead of /dev/mem.
> > also: > dd if=/dev/mem skip=<physical adress> bs=4 count=1 of=<filename> > does not generate any read cycle to my pci card You can't reach PCI address space by reading /dev/mem. Look at drivers/char/mem.c:read_mem /* * This funcion reads the *physical* memory. The f_pos points directly to the * memory location. */ static ssize_t read_mem(struct file * file, char * buf, size_t count, loff_t *ppos) { unsigned long p = *ppos; unsigned long end_mem; ssize_t read; end_mem = __pa(high_memory); if (p >= end_mem) return 0; ^^^^^^^^^^^^^^^^^ > > cheers, > erez. > > > Gleb Natapov wrote: > > >Hello, > > > >On Tue, Oct 21, 2003 at 10:53:54AM +0200, Erez Doron wrote: > > > > > >>o.k., here is the story: > >> > >>we are developping a uwb (ultra wide band) network chip. > >>this should be a wireless 100-500 Mbps with Qos communication chip. ( > >>bluetooth and WiFi, beware ;-) > >> > >>the prototype i am working on has it's registers and rams mapped as > >>memory on a PCI card. > >> > >>i tried using /dev/mem to access it, but it didn't work. > >>so i tried looking at examples and builded my own driver. > >> > >> > >The new way of doing it from userspace is by mmapping /proc/bus/pci/XX/YY > >AFAIK, but /dev/mem > >works for me. You must be doing something wrong. > > > >-- > > Gleb. > > > > > > > > ================================================================= > To unsubscribe, send mail to [EMAIL PROTECTED] with > the word "unsubscribe" in the message body, e.g., run the command > echo unsubscribe | mail [EMAIL PROTECTED] -- Gleb. ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]