All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem mapping small PCI memory space.
@ 2005-05-19 19:03 Gianluca Varenni
  2005-05-19 19:43 ` Richard B. Johnson
  0 siblings, 1 reply; 5+ messages in thread
From: Gianluca Varenni @ 2005-05-19 19:03 UTC (permalink / raw)
  To: linux-kernel

Hi all.

I'm writing a driver for a PCI board that exposes two memory spaces (out of
the 6 IO address regions).

One of them is 1MB, and I can map it to user level without problems. The
other one is only 512 bytes.
If I try to open it with /dev/mem, it returns EINVAL (the 1MB memory space
is opened without any problem). If I try to expose it through mmap, mmap
succeeds, but I only see garbage at user level. At kernel level, I can
access that 512 bytes memory by using ioremap() on the physical address
returned by pci_resource_start().

Are there any lower limits on the size of a PCI memory region?

Have a nice day
GV



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-05-21  1:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19 19:03 Problem mapping small PCI memory space Gianluca Varenni
2005-05-19 19:43 ` Richard B. Johnson
2005-05-19 20:28   ` Gianluca Varenni
2005-05-21  0:17   ` Benjamin Herrenschmidt
2005-05-21  1:09     ` Gianluca Varenni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.