From: "Gianluca Varenni" <gianluca.varenni@gmail.com>
To: <linux-kernel@vger.kernel.org>
Subject: Problem mapping small PCI memory space.
Date: Thu, 19 May 2005 12:03:43 -0700 [thread overview]
Message-ID: <02e801c55ca5$7a9d1000$1a4da8c0@NELSON2> (raw)
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
next reply other threads:[~2005-05-19 19:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-19 19:03 Gianluca Varenni [this message]
2005-05-19 19:43 ` Problem mapping small PCI memory space Richard B. Johnson
2005-05-19 20:28 ` Gianluca Varenni
2005-05-21 0:17 ` Benjamin Herrenschmidt
2005-05-21 1:09 ` Gianluca Varenni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='02e801c55ca5$7a9d1000$1a4da8c0@NELSON2' \
--to=gianluca.varenni@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.